Activity Stream
48,167 MEMBERS
63169 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Banned
    Website's:
    Seecure.me

    Default [PHP] Grab all img links from html/webpage

    /*
    For ibby
    */

    PHP Code: 
    <?
        $request_url 
    ='http://www.besthostingforums.com/';
     
        
    $ch curl_init();
        
    curl_setopt($chCURLOPT_URL$request_url);    // The url to get links from
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);    // We want to get the respone
        
    $result curl_exec($ch);
     
        
    $regex='|<img.*?src="(.*?)"|';
        
    preg_match_all($regex,$result,$parts);
        
    $links=$parts[1];
        foreach(
    $links as $link){
            echo 
    $link."<br>";
        }
        
    curl_close($ch);
     
    ?>
    Outputs->
    _Vick Reviewed by _Vick on . [PHP] Grab all img links from html/webpage /* For ibby */ <? $request_url ='http://www.besthostingforums.com/'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    vaporhostn.com
    small quick fix for better use...
    Call a website from url & hotlinks all files for right click save as...

    Code: 
       <?php
        if ($_GET['url']){
         $request_url = $_GET['url']();
        } else {
         echo "No url has been entered";
        }
      
        $ch = curl_init(); 
        curl_setopt($ch, CURLOPT_URL, $request_url);    // The url to get links from 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);    // We want to get the respone 
        $result = curl_exec($ch); 
      
        $regex='|<img.*?src="(.*?)"|'; 
        preg_match_all($regex,$result,$parts); 
        $links=$parts[1]; 
        foreach($links as $link){ 
            echo "<a href='$link'>$link</a><br>"; 
        } 
        curl_close($ch); 
     ?>

  4.     
    #3
    Member
    Website's:
    csoffensive.com fagbag.me
    nice and quick +1

  5.     
    #4
    Member
    Website's:
    Nerdy-Tutorials.com Mp3viddown.com Filmlab.eu
    Quote Originally Posted by _Vick View Post
    /*
    For ibby
    */

    PHP Code: 
    <?
        $request_url 
    ='http://www.besthostingforums.com/';
     
        
    $ch curl_init();
        
    curl_setopt($chCURLOPT_URL$request_url);    // The url to get links from
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);    // We want to get the respone
        
    $result curl_exec($ch);
     
        
    $regex='|<img.*?src="(.*?)"|';
        
    preg_match_all($regex,$result,$parts);
        
    $links=$parts[1];
        foreach(
    $links as $link){
            echo 
    $link."<br>";
        }
        
    curl_close($ch);
     
    ?>
    Outputs->
    THANKS!

    Added the [img] tag
    PHP Code: 
    <? 
        $request_url 
    ='http://www.besthostingforums.com/'
      
        
    $ch curl_init(); 
        
    curl_setopt($chCURLOPT_URL$request_url);    // The url to get links from 
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);    // We want to get the respone 
        
    $result curl_exec($ch); 
        
    $regex='|<img.*?src="(.*?)"|'
        
    preg_match_all($regex,$result,$parts); 
        
    $links=$parts[1]; 
        foreach(
    $links as $link){ 
            echo 
    "[IMG]" $link "[/IMG]</br>"
        } 
        
    curl_close($ch); 
     
    ?>



    Quote Originally Posted by Loonycgb2 View Post
    small quick fix for better use...
    Call a website from url & hotlinks all files for right click save as...

    Code: 
       <?php
        if ($_GET['url']){
         $request_url = $_GET['url']();
        } else {
         echo "No url has been entered";
        }
      
        $ch = curl_init(); 
        curl_setopt($ch, CURLOPT_URL, $request_url);    // The url to get links from 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);    // We want to get the respone 
        $result = curl_exec($ch); 
      
        $regex='|<img.*?src="(.*?)"|'; 
        preg_match_all($regex,$result,$parts); 
        $links=$parts[1]; 
        foreach($links as $link){ 
            echo "<a href='$link'>$link</a><br>"; 
        } 
        curl_close($ch); 
     ?>
    dont know how to work urs...

  6.     
    #5
    Member
    Website's:
    vaporhostn.com
    page.php?url=websiteurl

    it is called from the url

  7.     
    #6
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Theres a bug in the image only which you posted



    Make it check for actual url. If url doesn't exist and url starts with "/" then add base url of the website. If url doesn't contains "/" and also doesn't starts with "http://" then add the base link + actual path of the page you are grabbing

  8.     
    #7
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    What's the use of this?

    Defendos BETA3 Released! Thread - Official Website

  9.     
    #8
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com
    yay, regex!

    i prefer to not use "." (any character)

    Code: 
    #<img[^>]?src="([^"]+)"#
    local, i dunno really, maybe he wanted to take images off a site, automatically put them in img tags for him to copypasta, then post them wherever.
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. detect updates on a webpage and extract the file hoster links.
    By Mitt281 in forum Web Application/Script Support
    Replies: 0
    Last Post: 6th Nov 2012, 09:26 PM
  2. Webpage Image Links Finder
    By Bright in forum Web Development Area
    Replies: 12
    Last Post: 20th Feb 2012, 02:45 AM
  3. Hiding Your HTML Webpage Sourcecode from noobs
    By soft2050 in forum Tutorials and Guides
    Replies: 17
    Last Post: 13th Jun 2011, 06:09 PM
  4. Is there a way to just grab the File name only off FS Links?
    By The90sKid in forum Technical Help Desk Support
    Replies: 6
    Last Post: 1st Jan 2011, 10:23 AM
  5. CSS/HTML Help - Auto-size webpage to fit any screen?
    By iL < in forum Technical Help Desk Support
    Replies: 0
    Last Post: 17th Nov 2009, 04:10 AM

Tags for this Thread

BE SOCIAL