|
| |
|
|
| |
для: WaPPeR
(02.06.2007 в 00:19)
| | | может както можна такое с помощью curl? пробвал чота неполучается... | |
| |
|
|
| |
|
|
| | include("x.dat");
$x[0]="";
$gg=1;
$h=3;
if($x[$gg] && $gg<4){
$gg++;
}else {$h="".$h."-1";}
for($id=1; $id<$h+1; $id++)
{
$i=$id-1;
$QUERY_STRING = str_replace($x[$i],$x[$id],$QUERY_STRING);
$a=rand(0,1000);
$host = "site.ru";
$path = "/x.php?$QUERY_STRING;
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp) echo"$errstr ($errno)<br />\n";
else{
$headers = "POST $path HTTP/1.0\r\n";
$headers .= "Host: $host\r\n";
$headers .= "Accept: *\r\n";
$headers .="Accept-Charset: UTF-8\r\n"; // <<====
$headers .= "Accept-Charset: *\r\n";
$headers .= "Accept-Encoding: deflate\r\n";
$headers .= "Accept-Language: ru\r\n";
$headers .= "User-Agent: $a \r\n\r\n";
$headers .= "Content-type: application/x-www-form-urlencoded\r\n";
$headers .= "Content-Length: ".strlen($data)."\r\n\r\n";
fwrite($fp,$headers);
while($text != "\r\n") $text = fgets($fp,128);
$text = "";
while(!feof($fp)) $text .= fgets($fp,4096);
fclose($fp);
}
}
$text = str_replace("x.php","s.php",$text);
$text = str_replace("$x[$h]","$x[1]",$text);
echo $text;
Скрипт должен пролистывать страницы изменяя в адресе $QUERY_STRING = str_replace($x[$i],$x[$id],$QUERY_STRING); ,можна ли както это упростить ибо даже посылка всеголишь 3ёх раз занимает до 8-10секунд возможно есть другой метод? | |
| |
|
|
|