Mini Fetch Code
Mini fetch Code
< ?
$theLocation=”http://www.wired.com/”;
preg_match(“/^(https?://)?([^/]*)(.*)/i”, “$theLocation”, $matches);
$theDomain = “http://” . $matches[2];
$page = $matches[3];
$fd = fopen($theDomain.$page, “rb”);
$value = “”;
while(!feof($fd)){
$value .= fread($fd, 4096);
}
fclose($fd);
$start = strpos($value, ““);
$finish = strpos($value, ““);
$length = $finish – $start;
$value = substr($value, $start, $length);
$FinalOutput = preg_replace(“/(href=”?)(/[^"/]+)/”, “1″ . $theDomain . “2″, $value);
echo $FinalOutput;
flush ();





Yuppie 3009 days ago
http://www.win32com.de/What does this code do ?
Jake 1836 days ago
@Yuppie
Looks like it extracts code from another site