How to get the URL parameters after a jump via a link

Source: Internet
Author: User
Tags what interface
How to get the URL parameters after a jump via a link
This post was last edited by bing15 on 2014-09-12 14:27:23

I have a link that
Https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckurl?uin=2447168038&sid=06HuH3sMX61oW3Ql&skey=%40crypt _bcc81ca8_5e4f10a91e02160feafddb694ba29185&deviceid=e333050774658970&opcode=2&requrl=https%3a%2f% 2fopen.weixin.qq.com%2fconnect%2foauth2%2fauthorize%3fappid%3dwxdb2a2367e10c1ba6%26redirect_uri%3dhttp%253a% 252f%252fm.lbtest.imixun.com%252fweixin.php%26response_type%3dcode%26scope%3dsnsapi_base%26state%3d123% 23wechat_redirect&scene=1&username=wxid_d50xcfkfwuiu12


How to get to the URL parameter after the jump,
I can't write like this.
        $url = ' https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckurl?uin=2447168038&sid=06HuH3sMX61oW3Ql&skey=% 40crypt_bcc81ca8_5e4f10a91e02160feafddb694ba29185&deviceid=e333050774658970&opcode=2&requrl=https% 3a%2f%2fopen.weixin.qq.com%2fconnect%2foauth2%2fauthorize%3fappid%3dwxdb2a2367e10c1ba6%26redirect_uri%3dhttp% 253a%252f%252fm.lbtest.imixun.com%252fweixin.php%26response_type%3dcode%26scope%3dsnsapi_base%26state%3d123% 23wechat_redirect&scene=1&username=wxid_d50xcfkfwuiu12 ';
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_header, true);
curl_setopt ($ch, Curlopt_returntransfer, true);
curl_setopt ($ch, curlopt_followlocation, true);
$content = curl_exec ($ch);
Echo $content;

------to solve the idea----------------------
What can you return this URL for?
Direct browser, return to empty page
Curl naturally will not have to return

HTTPS is required for certificates
If you do not need a certificate, you need to have curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
But you can only get the head.
http/1.1 OK
content-type:text/html; Charset=gbk
Cache-control:no-cache, Must-revalidate
content-length:0




------to solve the idea----------------------
References:
Quote: References:

What can you return this URL for?
Direct browser, return to empty page
Curl naturally will not have to return

HTTPS is required for certificates
If you do not need a certificate, you need to have curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
But you can only get the head.
http/1.1 OK
content-type:text/html; Charset=gbk
Cache-control:no-cache, Must-revalidate
content-length:0


In Google Browser is can play, ie does not
There is a problem, in my app to request the interface, will be reported "Please open the link on the client"
I am through in itself, ah, how to prompt this, the following is the code:

$encodeUrl =urlencode (' http://m.lbtest.imixun.com ');
$url = ' https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdb2a2367e10c1ba6&redirect_uri= '. $ Encodeurl. ' &response_type=code&scope=snsapi_base&state=123#wechat_redirect ';
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_header, true);
curl_setopt ($ch, Curlopt_returntransfer, true);
curl_setopt ($ch, curlopt_followlocation, true);
curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
$content = curl_exec ($ch);
Echo $content;

We have to set referer. He was tested by Referer.
------to solve the idea----------------------
What interface does this URL have?
  • 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.