最新消息: 新版网站上线了!!!

php curl post远程删除

<?php
/**
 * @author 懒人 <service@kuitao8.com>
 * @since 2.0
 */
header("Content-type:text/html;charset=utf-8");
function GetCurl($url,$message){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS,$message);
    curl_setopt($curl,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_exec($curl);
}
$post = array(
  //  'pid'=>$_GET['pid']
    'pid'=>20
 
);
$resp = GetCurl("http://app.kuitao8.com/android_connect/delete_product.php",$post);
$resp = json_decode($resp);
echo $resp;
//var_dump($resp);
//header('Content-type: application/json');
//echo json_encode($resp);

转载请注明:谷谷点程序 » php curl post远程删除