Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xmlhttp: How to set referrer...

Status
Not open for further replies.

MVisconte

Programmer
Jun 17, 2002
105
US
Hey gang,

I'm using xmlhttp inside local web pages (vbscript inside an html page) to consolidate a lot of web searching. I grab "data" from three or four sites w/out any problem, and put all the "data" into a series of pages for easy coffeebreak reading.

One site shows data fine if I go directly to it w/ a browser window, but if I use xmlhttp it tells me that the exact same thing I was just looking at is not available.

I have tried several ways around this, and now I would like to set a referrer when I call using xmlhttp to see if THAT makes a difference. I've been over the xmlhttp documents multiple times and can't get it figured out.

I have seen two examples, but neither have worked for me:
xobj.setRequestHeader "Referer", RefMurl
xObj.Referrer = RefMurl
"Referer" has also been replaced w/ "Referrer" and "http_referrer", etc. -- as the only instruction was that it was supposed to match "standard" environment variable values... None that I can think of seem to work.

Alternately, if anyone can give me other ideas on how these folks are bypassing my GETs, I'd appreciate the insight.

BG:
I want to get "data" from several of the pages on this site:


As an example, here is the main (outer) frame for a page that I would like to get "Data" from:


I've been to the main frame, the sub-frame, and I've tried pulling the data directly from a calculated url:


If you go to that link, you'll see a "Sorry, currently unavailable" disclaimer. (If you DO get a return, it's probably 'cuz you visited the main page and have the "data" in cache... try ctrl-reloading it or mod the URL for the previous day's date.)

Can anyone help me?
 
I seem to get it to "take" a small portion of the time. I'm testing it by pulling pages from the internet that show the users referrer page... sometimes it works, sometimes...

I'm still stuck w/ getting King to recognize my request as being a valid one...

thought I was on to something.

M.
 
No Joy. I checked what I was getting more closely...
Using
xobj.setRequestHeader "HTTP_REFERER", RefMurl

where RefMurl is my forced referrer, what is returned in the web response page ( is

HTTP_HTTP_REFERER =

I also see an entry for the local page in HTTP_REFERER:

HTTP_REFERER = file://C:\PracticeSites\Local.htm


Sigh. ANYbody have any insight?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top