Показать сообщение отдельно

  #5  
Старый 16.12.2009, 04:09
mandebist
Новичок
Регистрация: 10.09.2009
Сообщений: 3
С нами: 8772399

Репутация: 0
Unhappy

PHP код:
<?

set_time_limit
(0);
error_reporting(E_ERROR | E_PARSE);

function 
curl($url,$post)
    {
    
$ch = curl_init();  
    
curl_setopt($ch, CURLOPT_URL, $url); 
    
curl_setopt($ch, CURLOPT_HEADER, 1);
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
    
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
    
curl_setopt($ch, CURLOPT_REFERER, "http://fotostrana.ru/");
    
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
    
curl_setopt($ch, CURLOPT_POST, 1);
    
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    
$res_curl = curl_exec($ch);
    
curl_close($ch); 
    return 
$res_curl;
    }; 

$email = "444";
$pass = "444";
$url = "http://fotostrana.ru/user/login/";
$post = "submitted=1&user_email=".$email."&user_password=".$pass;
echo 
htmlspecialchars(curl($url, $post));  

for(
$i=1;$i<99;$i) {
  
$qwe=$i++;


$url = "http://fotostrana.ru/tlogprofile/comment/add?tlogId=15540678&display=room&comment_text=test".$qwe."&ajax=true";
$res = connect($url,$post);

print 
$result;
flush();
print 
$qwe."\n";
flush();

sleep(1);
 }


?>
Немогу разобратся что нетак помогите плиз ...
 
Ответить с цитированием