Fsockopen cannot obtain the webpage correctly. if the fsockopen function of php returns error 403, other webpages can be obtained normally, but check. ptlogin2.qq. comcheck? Regmaster & amp; uin1_872340 & amp; appid549000912 & amp; js_ver10049 & amp; js_type1 & amp; login _ fsockopen cannot obtain the webpage correctly, and error 403 is returned.
Php's fsockopen function can normally get other web pages, but get http://check.ptlogin2.qq.com/check? Region % 3 Fpara % 3 Dizone & r = 0.42962526359176423
The error 403 is returned.
If the server is on the local machine and the local machine can access the page normally, it can be seen that the website is blocked by IP addresses. Suspected to be a problem with fsockopen
I would like to ask experts if they can use the fsockopen function to obtain the webpage correctly!
Share: More
------ Solution --------------------
It's also appid and login_sig... we can't test it for you unless someone has done it before and succeeded.
------ Solution --------------------
Access through a browser.
Ptui_checkVC ('0 ','! Yzg', '\ x00 \ x00 \ x00 \ x00 \ x16 \ x0b \ xcd \ xd4 ');
Apparently a jsonp application
echo file_get_contents('http://check.ptlogin2.qq.com/check?regmaster=&uin=369872340&appid=549000912&js_ver=10049&js_type=1&login_sig=4aNczek7pQ2h04JL8nS0xfDqPQsJ-oF5czyfk1lOAY47-HswQg3rmElsCZ6QIAyO&u1=http%3A%2F%2Fqzs.qq.com%2Fqzone%2Fv5%2Floginsucc.html%3Fpara%3Dizone&r=0.42962526359176423');
Get
Ptui_checkVC ('1', 'ft8rvzgwagpfnzhulxg9loxegxgkseuv', '\ x00 \ x00 \ x00 \ x00 \ x16 \ x0b \ xcd \ xd4 ');
....
------ Solution --------------------
$host = 'check.ptlogin2.qq.com';
$param = '/check?regmaster=&uin=369872340&appid=549000912&js_ver=10049&js_type=1&login_sig=4aNczek7pQ2h04JL8nS0xfDqPQsJ-oF5czyfk1lOAY47-HswQg3rmElsCZ6QIAyO&u1=http%3A%2F%2Fqzs.qq.com%2Fqzone%2Fv5%2Floginsucc.html%3Fpara%3Dizone&r=0.42962526359176423';
$out = array(
"GET $param HTTP/1.0",
"Host: $host",
'Connection: Close',
'', ''
);
$fp = fsockopen($host, 80, $errer, $errno, 1);
fwrite($fp, join("\r\n", $out) );
while(! feof($fp)){
echo fread($fp, 1024);
}
HTTP/1.1 200 OK
Server: tencent http server
Pragma: No-cache
P3P: CP="CAO PSA OUR"
Set-Cookie: confirmuin=0; PATH=/; DOMAIN=ptlogin2.qq.com;
Set-Cookie: ptvfsession=ec74c1fdab7c67a28e60e26b39ca2cd789648df0341f311ebd4a970791b4e4af72576feb6fc4abf6e403d3a52ff4ccd5; PATH=/; DOMAIN=ptlogin2.qq.com;
Set-Cookie: ptisp=ctc; PATH=/; DOMAIN=qq.com;
Connection: close
Content-Type: application/x-javascript; charset=utf-8
ptui_checkVC('0','!WKV','\x00\x00\x00\x00\x16\x0b\xcd\xd4');
------ Solution --------------------
Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all
How do you configure this item?