A picture address decomposition program (for PHP Thief program), _php tutorial

Source: Internet
Author: User

A picture address decomposition program (for PHP Thief program),


Title, return an array, you can get the image address of the base URL, relative address, name, etc., see the following example:

<?error_reporting (e_all ^ e_notice); $imgurl = ' http://files.jb51.net/file_images/article/ 201408/201408232212306.png '; $imgurl _dir= '/img/2014/07/02/14520384.gif ';//echo getimg ($imgurl, './img '); Var_dump ( Url_set_value ($imgurl)); Var_dump (Url_set_value ($imgurl _dir));/** * Function Name:url_set_value * User:don * Date: 14-8-2 * Time: Morning 12:43 */function Url_set_value ($url) {$a =explode ('/', $url); $url _set=array (); for ($n =0; $n 
   

Operation Result:

Array (4) {["Base_url"]=> string "files.jb51.net" ["Img_dir_path"]=> string "/file_images/article/ 201408 "[" Img_path "]=> string" 201408232212306.png "[" Img_ful_path "]=> string"/file_images/article/" 201408201408232212306.png "}array (3) {[" Img_dir_path "]=> string ()"/img/2014/07/02 "[" Img_path "]=> string (12 "14520384.gif" ["Img_ful_path"]=> string "/img/2014/07/0214520384.gif"}




http://www.bkjia.com/PHPjc/868223.html www.bkjia.com true http://www.bkjia.com/PHPjc/868223.html techarticle a picture address decomposition program (for PHP Thief program), title, return an array, you can get the image address of the base URL, relative address, name, etc., see the following example: Error_rep ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.