• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

Headers

I am not sure where to ask this question, but anyway.

I am writing a simple browser.
I can do most things with it, except i have one problem.

On sites that require you to click on a link then in that new window click enter (Pay to click sites etc) i cannot get to work.

I read somewhere in the http protocol that there is a header called referer, do i need to use this?
Basically, i just want to be able to connect to pages and do it like IE does..
What data do i need to send to the servers in order to get these sites to realise that i have come from another url, and that i am not going straight to the enter url on these types of sites.


Thank you
0
wormboy__6
Asked:
wormboy__6
  • 3
  • 3
  • 3
  • +2
1 Solution
 
jhurstCommented:
There is a header called REFERER, not that it is mis-spelled, there is an R missing.  This should be of the form:
Referer: url
where url is the url of the refering page.

I am not convinced that this is your problem, but this is what referer does.
0
 
wormboy__6Author Commented:
Yes, i realise that this is what the header referer does, but i dont think that is my problem either.

How do the sites know whether you have been to the first url then..the one before the 'enter' url?
0
 
jhurstCommented:
I have a script at:
http://209.245.58.156/env.cgi
that you may want to test with.  It returns everything that is available to it, as such you can use it to see what a browser that does work set and you do not.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
wormboy__6Author Commented:
ok, but how is this going to help me to work out how to display urls properly eg Pay to CLick sites etc
0
 
FAQCommented:
Would you mind posting the code that sends HTTP requests so I can take a look at it? What language are you writing the browser in?
0
 
jhurstCommented:
also, give us the pages where you are having problems.
0
 
freshmeatCommented:
?
wormboy is writing a browser, i think it is not related to cgi topic
but anyway, i am doing the same thing in C++, i don't know how to post form in my exe

waiting for experts
:)
0
 
FAQCommented:
copy the relevant section of source code and past. Namely the section where you're composing the text string to send as HTTP header to the server
0
 
FAQCommented:
BTW, you might want to check this page out, it's from W3C (It's standard RFC822 specification, and describes all the HTTP Request Headers). What you're looking for is under the Referer section

http://www.w3.mag.keio.ac.jp/Protocols/HTTP/HTRQ_Headers.html
0
 
wormboy__6Author Commented:
ok...ive worked out how to do it thank you all.
0
 
oskaCommented:
I'm happy
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now