
21.06.2007, 01:09
|
|
Новичок
Регистрация: 21.06.2007
Сообщений: 21
С нами:
9942865
Репутация:
11
|
|
не помогает
пробовал . что-то куда-то типа отсылает, но в ресурсе не видно, хотя через minibrowser все отсылается, значит сайт принимает подобные данные...
(для тренировки пользую _http://slotvent.com/guestbook/
в нем длинный TOP и можно отслеживать поступление данных  ),и если бы CURL был отключен на хосте - я полагаю выдавалась бы ошибка... 
вот скрипт
Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=Windows-1251">
<META content="text/html; charset=windows-1251" http-equiv=Content-Type>
</head>
<body>
<?
if (empty($aref))
{
$aref="";
}
if (empty($prox))
{
$prox="";
}
if (empty($aref)||empty($_POST['host']))
{
echo "<CENTER>
<h1>URL</h1>
<form action='index.php' method='post' name='logg'>
<table>
<tr>
<br>
<input type='text' name='host' size=60><br><br>
<td valign='top'><strong>Ссылки </strong>
<textarea cols=150 rows=10 name=aref>$aref</textarea>
</td>
</tr>
<tr>
<td ><input type='submit' name='qqqqq' value='отправить'></td>
</tr>
</table>
</form>
</CENTER>
";
exit;
}
?>
<?
set_time_limit(0);
ob_implicit_flush();
$refs=explode("\n",trim($aref));
$ZZI=0;
WHILE ( (count($refs)>$ZZI) && ($ZZI<50) )
{
echo trim($refs[$ZZI])." ok <br>";
ob_flush();
$uref=trim($_POST['host']);
$gurl=trim($refs[$ZZI]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $gurl);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_NOBODY,0);
curl_setopt($ch,CURLOPT_TIMEOUT,6);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, $uref);
curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
$file_content=curl_exec ($ch);
curl_close ($ch);
sleep(1);
$ZZI=$ZZI+1;
}
echo "<CENTER>
<h1>URL</h1>
<form action='index.php' method='post' name='logg'>
<table>
<tr>
<br>
<input type='text' name='host' size=60><br><br>
<td valign='top'><strong>Ссылки </strong>
<textarea cols=150 rows=10 name=aref>$aref</textarea>
</td>
</tr>
<tr>
<td ><input type='submit' name='qqqqq' value='отправить'></td>
</tr>
</table>
</form>
</CENTER>
";
?>
</body>
</html>
Последний раз редактировалось vitek10; 21.06.2007 в 09:39..
|
|
|