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

  #4  
Старый 08.08.2008, 13:23
Isis
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме:
16641028

Репутация: 2371


По умолчанию

PHP код:
<?php
    set_time_limit
(0);
    
ob_start();
    
ob_implicit_flush(0);

    
$url    'http://freehost.com.ua/about/cat/';
    
$post    'sb=Голосовать&cat[]=345';
    
$file    file('proxy.txt');
    
$prox    explode(':'$file[0]);
    
$proxy    $prox['0'];
    
$port    $prox['1'];

    
$ct        curl_init();
    
curl_setopt($ctCURLOPT_URL$url);
    
curl_setopt($ctCURLOPT_RETURNTRANSFER1);
    
curl_setopt($ctCURLOPT_HEADER1);
    
curl_setopt($ctCURLOPT_REFERER$url);
    
curl_setopt($ctCURLOPT_USERAGENT'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
    
curl_setopt($ctCURLOPT_FOLLOWLOCATION1);
    
curl_setopt($ctCURLOPT_PROXY$proxy.':'.$port);
    
$cont curl_exec($ct);
    
curl_close($ct);

    
$newp    str_replace($proxy.':'.$port''file_get_contents('proxy.txt'));
    if(
$prf    fopen('proxy.txt''w+'))
    {
        
fwrite($prf$newp);
        
fclose($prf);
        echo 
'Меняем proxy...<br/>';
        
$contents ob_get_contents () ;
        
ob_end_clean() ;
        print 
$contents;
        echo 
'<script type="text/javascript">location.href="index.php"</script>';
    }
    else
    {
        
'Сменить proxy не удалось<br/>';
    }
?>