PHP发送http Post Get请求
Post 方法1 curl <?php //The url you wish to send the POST request to $url = $file_name; //The data you want to send via POST $fields = [ ‘__VIEWSTATE ’ => $state, ‘__EVENTVALIDATION’ => $valid, ‘btnSubmit’ => ‘Submit’ ]; $headers = [ ‘User-Agent: NoBrowser v0.1 beta’, ]; //url-ify the data for the POST $fields_string = http_build_query($fields); ...