LINUX Curl GET off parameter resolution

Source: Internet
Author: User
Tags php script

LINUX Curl GET off parameter resolution

url the URL address for http://mywebsite.com/index.php?a=1&b=2&c=3
Web, using $_ Get is able to get all the arguments

curl -s  http://mywebsite.com/index.php?a=1&b=2&c=3
However under Linux, the above example $ _get can only get to parameter a

because there are & other parameters in the URL that are not available in the Linux system & will cause the process system to run in the background
must be escaped by & to $_get get all parameters
curl  -s  http://mywebsite.com/index.php?a=1\&b=2\&c=3

Of course, the simplest way to bring the entire URL together in double quotes is OK
curl -S   "Http://mywebsite.com/index.php?a=1&b=2&c=3"

# by the way, the method for post-pass parameters in Curl
curl -d  ' name=1&pagination=2 ' demoapp.sinap.com/worker.php
# so demoapp.sinap.com worker.php script in the site, you can get $_post[' name [] and $_post[' pagination] corresponding to the value      

# Add the method of curl to get site information (-S for silence  --head Indicates information)
curl -s --head  www.sina.com

Related Article

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.