php curl 模拟post 提交

<?php
$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;


?>

 

posted @ 2016-05-25 14:44  ╭(╯3╰)╮尝尝鲜  阅读(198)  评论(0编辑  收藏  举报