<?php /** * Created by PhpStorm. * User: machenike * Date: 2016/7/8 * Time: 13:39 */ header("content-type:text/html;charset=utf-8"); $url = " ";//灌水地址 根据人家提交的url 确认字段名称 $data = array ( "answer"=>"admin","fullname"=>"123123","content"=>"123" );//灌入的数据 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // 设置请求为post类型 curl_setopt($ch, CURLOPT_POST, 1); // 添加post数据到请求中 curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 执行post请求,获得回复 $response= curl_exec($ch); curl_close($ch); print_r($response);
08-15
08-15
08-15