473,480 Members | 4,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Post Form without referrer

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

Jul 23 '05 #1
3 4410
Alex wrote:
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/...+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....

Jul 23 '05 #2
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.


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

Jul 23 '05 #3
can someone help me???

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4272
by: Jay Davis | last post by:
We've been using the excellent ClientForms module with urllib2 to read forms, fill them in, and then submit with 'response = urlopen(form.click())'. The process usually works very well. But...
5
2399
by: Dani | last post by:
Hello everybody, I have some code that disables form elements on body load, but I notice when I hit the "back" button, I need to re-enable the form elements (that is done by clicking on a radial...
4
1523
by: Ron Vecchi | last post by:
I know this has messiness written all over it but I have a question about using HttpWebRequest/Response to essentially spider a website and post information to the forms. The (very) basic goal is...
2
20160
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response....
2
3162
by: Fernando Rodríguez | last post by:
Hi, Is there a way to turn the document.referrer string into a Location like object, so I can extrac the domain and other parts of it? Thansk
5
10988
by: Nospam | last post by:
does anyone know if there is anything wrong with this code? <SCRIPT LANGUAGE="JavaScript">document.referrer.indexOf("http://www.example.com") != -1){ ...
5
10027
by: Thom Little | last post by:
In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include POST data (i.e., formatted like a form. The form data is changed dynamically by the C# page. Can anyone point me to an...
6
32706
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
2
8089
by: Aaron | last post by:
I'm trying to pull data from a website and read it into a file the I can parse. I've done the before to site without post variables but I can seem to get my statments to work with the post. Can...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.