phpPOST的提交

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS,$data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string))
    );
    $result = curl_exec($ch);

    curl_close($ch);
    return json_decode($result,true);

本文题目:phpPOST的提交
标题链接:http://ptjierui.cn/article/jcdopg.html

其他资讯

Copyright © 2024 青羊区广皓图文设计工作室(个体工商户)(郫都区郫县站) All Rights Reserved 蜀ICP备19037934号
友情链接: 网站制作 成都网站设计公司 成都网站建设公司 手机网站设计 教育网站设计方案 成都商城网站建设 重庆企业网站建设 手机网站建设 成都定制网站建设 成都网站建设 重庆网站建设 自适应网站设计 网站建设 成都网站建设 成都网站建设 营销型网站建设 网站制作报价 网站建设改版 重庆网站制作 定制网站建设 企业网站建设公司 网站制作