Url parameters when php uses curl to initiate a get request

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.