Get query string problems when a curl request is initiated in php

Source: Internet
Author: User
When a get request is sent using curl, cannot the url be followed by a query string ?????? Why can't I access the page with it ?? When a get request is sent using curl, cannot the url be followed by a query string ?????? Why can't I access the page with it ??

Reply content:

When a get request is sent using curl, cannot the url be followed by a query string ?????? Why can't I access the page with it ??

The requirements for URLs are not bad for browsers.
The code to know what you did.

Curl, get, and post are all correct. check if your code is correct.

How did you use it?curlIt's impossible! Look at yourcurl_setoptHow is it set?

// You must splice the $ _ GET information into the url to function httpGet ($ url) {$ curl = curl_init (); curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, true ); curl_setopt ($ curl, CURLOPT_TIMEOUT, 500); curl_setopt ($ curl, timeout, false); curl_setopt ($ curl, expires, false); curl_setopt ($ curl, CURLOPT_URL, $ url); $ res = curl_exec ($ curl); curl_close ($ curl); return $ res ;}

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.