When sending a get request, does the url not contain a query string, but only a domain name + path? My example is as follows. after adding the query string, it cannot be used ??? {Code...} the url parameter problem when php uses curl to initiate a get request:
When sending a get request, does the url not contain a query string, but only a domain name + path? My example is as follows. after adding the query string, it cannot be used ???
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php");//curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php?mid=14&my_calfee=1")curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HEADER, 0);$kk = curl_exec($ch);curl_close($ch);print_r($kk);
Reply content:
When sending a get request, does the url not contain a query string, but only a domain name + path? My example is as follows. after adding the query string, it cannot be used ???
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php");//curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php?mid=14&my_calfee=1")curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HEADER, 0);$kk = curl_exec($ch);curl_close($ch);print_r($kk);
Get is the url parameter passing
The above is the url parameter issue when php uses curl to initiate a get request. For more information, see PHP Chinese website (www.php1.cn )!
Related articles:
Use curl in PHP to send requests (GET requests and POST requests)
Instructions for PHP to use the curl function to send Post requests
PHP development skills (8)-CURL request code details