PHP,如何在向一个网页POST提交数据后,得到返回的数据如果不嫌麻烦,请写出详细方法

解决方案 »

  1.   

    POST过的数据和放回的数据是要一定一样的吗,如果是一样的,那$_POST[]不是就可以得到的吗,或者select数据库得到
      

  2.   


    $post_data =   
                 array(  
                         'cclist=5AAAA',  
                         'date=0',  
                         'irname=',  
                         'fullpath=',  
                 );  
       
         $post_data = implode('&',$post_data);  
       
         $url='http://mathuat.us/check/shopavon.php';  
       
         $ch = curl_init();  
         curl_setopt($ch, CURLOPT_POST, 1);  
         curl_setopt($ch, CURLOPT_URL,$url);  
         curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);  
         ob_start();  
         curl_exec($ch);  
         $result = ob_get_contents() ;  
         ob_end_clean();  
       
     echo $result;  来自于http://blog.csdn.net/militala/article/details/5961184
    试试吧,PHP模拟POST提交就这些办法
      

  3.   

    和Ajax 吧
    $.Ajax(url"test.php",
    type:"post"
    ...success:function(d){
     alert(d);//这里处理返回数据。
    });