For example: localhostopenapiholidayLineQueryGetLineComment? AllianceId12 & amp; DigitalSign7aeac3d1c621c30c144f23b5a498bbda01895b70 & amp; ReqTime2013-09-0216: 23: 49.929 how to submit this address with get example: http: // localhost/openapi/holiday/Line/Query/GetLineComment? AllianceId = 12 & DigitalSign = 7aeac3d1c621c30c144f23b5a498bbda01895b70 & ReqTime = 16:23:49. 929
How to submit this address with get?
Reply content:
For example: http: // localhost/openapi/holiday/Line/Query/GetLineComment? AllianceId = 12 & DigitalSign = 7aeac3d1c621c30c144f23b5a498bbda01895b70 & ReqTime = 16:23:49. 929
How to submit this address with get?
Curl is submitted by GET by default. If it is submitted by POST, check whether curl_setopt ($ c, CURLOPT_POST, 1) is configured. This Parameter
/*** GET request ** @ param string $ url */private function http_get ($ url) {$ oCurl = curl_init (); if (stripos ($ url, "https: //")! = FALSE) {curl_setopt ($ oCurl, success, FALSE); curl_setopt ($ oCurl, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt ($ oCurl, CURLOPT_SSLVERSION, 1 ); // signature} curl_setopt ($ oCurl, CURLOPT_URL, $ url); curl_setopt ($ oCurl, CURLOPT_RETURNTRANSFER, 1); // Add proxy // curl_setopt ($ oCurl, CURLOPT_PROXY, HTTP_PROXY_IP_PORT); $ sContent = curl_exec ($ oCurl); $ aStatus = curl_getinfo ($ oCurl); curl_close ($ oCurl); if (intval ($ aStatus ["http_code"]) ==200) {return $ sContent;} else {return false ;}}
File_get_contents