<? Php tutorial
If (! Isset ($ _ server ["http_referer"])
Echo "no referer ";
Else
Echo $ _ server ["http_referer"];
?>
If you click the link above, the referer page is displayed.
Copy the Code as follows:
Set http = createobject ("msxml2.xmlhttp ")
Http. open "get", "http://www.bkjia.com/test/referer.php", false
Http. setrequestheader "referer", "http://www.bkjia.com"
Http. send
Wscript. echo http. responsetext
However, if I use vbs to call the msxml2.xmlhttp component to access this page, no referer is returned. It's incredible. Isn't my code wrong?
So google googled "vbs forged http referer" and found that most of the content found is the same as this article. You copy and paste it without reading it. If you copy my content, I copy your content, I don't know who it is, and it's still wrong!
The first example of that article is the asp tutorial
Copy the Code as follows:
Dim http
Set http = server. createobject ("msxml2.xmlhttp ")
Http. open "get", url, false
Http. setrequestheader "referer", "http://www.fromdomain.cn /"
Http. send ()
At first, I thought that the vbs under asp is different from the vbs that I directly double-click to run. The vbs under asp is awesome and can be changed to the referer. For this reason, I also installed iis for testing and found that no referer is returned. Later, I saw the following message: "forgive me for not being familiar with asp. I can't help you. Please check other materials and refer to it." "I have no idea how to use asp, the code is for reference only. asp has not been tested ".
I really don't want to swear. If you're not familiar with it, you just need to write it. At least let's test it. The code that has not been tested can also be pasted? Later, I saw a reliable answer on Qianyi Network (this network looks good). referer cannot be changed by setting headers in asp and ajax.
Angry, now that the xmlhttp component is not working, I will use socket to write the general line! (Note: not all computers have registered the winsock component)
1 2