Jump to content

Recommended Posts

Hi, I am looking to bulk leech data from one site at a time from multiple pages on the site which all have the same layout so can get data between strings, any help will be much appreciated.

 

eg:

 

www.site.com/code1.html

www.site.com/code2.html

www.site.com/code3.html

www.site.com/code4.html

...

 

all with data like below:

 

#

description:

 

code1 is blah blah

 

end

#

 

Thank You

Link to comment
https://forums.phpfreaks.com/topic/115631-bulk-leeching-data-on-similar-pages/
Share on other sites

Hi, sorry here is the code, think I got a bit mixed up somewhere:

 

$sitename = ($_GET['site']);
$text = file_get_contents("$sitename", "r");

function get_between($text,$s1,$s2) {
      echo "s1".$s1;
      echo "s2".$s2;
      echo "text".$text;
      echo "midurl".$midurl;  
	$mid_url = "";
      $pos_s = strpos($text,$s1);
      $pos_e = strrpos($text,$s2);
      if ($pos_e < $pos_s){$pos_e = 99999;}
      echo "poss:".$pos_s;
      echo "pose:".$pos_e;

      for ( $i=$pos_s+strlen($s1) ; (( $i<($pos_e)) && $i <strlen($text)) ; $i++ ) {
      $mid_url .= $text[$i];
      }
      
      return $mid_url;
      }

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.