• Как отправить post запрос на сайт?

    @PEREGINEC
    $url="http://billing.evpanet.com/user/";
       $post = array(
       'login' => 'aksenov', 
       'password' =>'123456789');
      
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $url)  ; 
    curl_setopt  ($ch, CURLOPT_HEADER, true);
    curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1) ");    
    curl_setopt($ch, CURLOPT_POST, true);   
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);      
    curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie/$login.txt");  
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie/$login.txt"); 
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);    
    $html = curl_exec($ch); 
    echo $html;
    Ответ написан
    Комментировать