Post Form without referrer

A

Alex

Hi!!

i have a major problem, and i've been searching for a solution for
about 2 weeks, but havent found one.

i have to do a POST-Request to a server, but the server shouldnt know
my referrer. i know it would be quite easy to accomplish this with a
simple php-Script, but the problem is that i need the browser (client)
to do this POST, so that the answer comes directly back to the client,
and not first to the php-server and then to the browser.

why that? because the page i get back requests the cookie (with
document.cookie), and therefore the page has to come directly from
server.

i tried the xmlhttpconnection object to connect to the server and
manipulate the header, to send the request without a referrer, but the
answer isnt directly shown in the browser, but has to be requested from
the xmlhttpconnection, so therefore access to the cookie isnt possible.

i just need to make the browser to send the POST-Request without the
referrer, and get the answer directly back from the server, so that the
browser can access document.cookie.

another important thing is that i dont want to change the browser
settings!!!!!!

i know that you can send get-requests without referrer by using
document.location=....., but how can you do it with forms that use
post????

please help me!!!!!!

thanks Alex, if you have any further questions, please dont mind to
post them, thanks
 
C

Christopher J. Hahn

Alex said:
Hi!!

i have a major problem, and i've been searching for a solution for
about 2 weeks, but havent found one.

i have to do a POST-Request to a server, but the server shouldnt know
my referrer. i know it would be quite easy to accomplish this with a
simple php-Script, but the problem is that i need the browser (client)
to do this POST, so that the answer comes directly back to the client,
and not first to the php-server and then to the browser.

why that? because the page i get back requests the cookie (with
document.cookie), and therefore the page has to come directly from
server.

Post from PHP and include the cookie in your request headers, assuming
you can get it. If you can't, you probably shouldn't be trying.

Either way, using the HTTP request objects of PHP or JavaScript won't
give the 'page you get back' a document.cookie anyway-- JavaScript on
that page won't be executed.

Or maybe I just misunderstood.

i tried the xmlhttpconnection object to connect to the server and
manipulate the header, to send the request without a referrer, but the
answer isnt directly shown in the browser, but has to be requested from
the xmlhttpconnection, so therefore access to the cookie isnt possible.

i just need to make the browser to send the POST-Request without the
referrer, and get the answer directly back from the server, so that the
browser can access document.cookie.

The cookie is returned in a header.
http://groups-beta.google.com/group...72c18c03739dc8?q=xmlhttprequest+header&rnum=6


i know that you can send get-requests without referrer by using
document.location=....., but how can you do it with forms that use
post????


Maybe by a page that doesn't exist... by opening a window, write()ing a
document to it, and then posting from that document. Just a thought. I
have no idea if it actually works.

Of course, if you do that, you'll have no access to the document that's
returned if it's from a different domain.

please help me!!!!!!

thanks Alex, if you have any further questions, please dont mind to
post them, thanks

Why would you want to POST without a referer? Why can't you access the
cookie by normal means already? Sounds like you're trying to do
something that really oughtn't be done....
 
A

Alex

Maybe by a page that doesn't exist... by opening a window, write()ing a
document to it, and then posting from that document. Just a thought. I
have no idea if it actually works.

thanks for your answer, christopher.

your idea sounds very interesting, anyone has ever tried this out, i
tried to open a new window with newWindow = window.open
("about:blank",...) and then write code into it with
newWindow.document.write("<form...."); but the referrer is the location
of the main-site. has anyone ever made a form that sends no referrer??
i need a guru *gg*

thanks
alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top