473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Redirecting user via post

Hi

I just made a script that gets a bunch of login info and I've come across a
hurdle that I failed to think about it.. and now think I may have wasted my
time...

The login info I retreive needs to be POSTed to another site. Everything is
beautiful, except now I don't know how to go about it..

I could use Location: URL but I have to chuck on the login info in the URL
which would then be visible to the naked eye.

Is there a way to POST it.. ? Been a while since I messed with web stuff so
any help appreciated.

Please help.

TIA
Jul 17 '05 #1
5 1850
"Brendan" <bj*@adsl.onnet> wrote in message
news:40********@duster.adelaide.on.net...
Hi

I just made a script that gets a bunch of login info and I've come across a hurdle that I failed to think about it.. and now think I may have wasted my time...

The login info I retreive needs to be POSTed to another site. Everything is beautiful, except now I don't know how to go about it..

I could use Location: URL but I have to chuck on the login info in the URL
which would then be visible to the naked eye.

Is there a way to POST it.. ? Been a while since I messed with web stuff so any help appreciated.


Use the HTTP status code 307:

header("HTTP/1.0 307 Temporary Redirect");
header("Location: http://www.example.com/");

When the incoming request is a POST, the browser post to the redirected page
as well. Note that in some non-standard browsers a warning would appear.
Jul 17 '05 #2
Chung Leong <ch***********@hotmail.com> wrote:
The login info I retreive needs to be POSTed to another site. Everything

is
beautiful, except now I don't know how to go about it..

I could use Location: URL but I have to chuck on the login info in the URL
which would then be visible to the naked eye.

Is there a way to POST it.. ? Been a while since I messed with web stuff

so
any help appreciated.


Use the HTTP status code 307:

header("HTTP/1.0 307 Temporary Redirect");
header("Location: http://www.example.com/");

When the incoming request is a POST, the browser post to the redirected page
as well. Note that in some non-standard browsers a warning would appear.


My guess is this is not what the OP acutally wants. Unless he wants to
redirect the browser to the other site (in that case pointing the action
directly to the site might be easier).

My guess is that he wants to do the post from within his own php, in
that case he could take a look at curl, snoopy
(http://sourceforge.net/projects/snoopy/) or an code snipper I once
posted here
(http://groups.google.com/groups?selm...%40news.tue.nl)

--

Daniel Tryba

Jul 17 '05 #3
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:nb********************@comcast.com...
"Brendan" <bj*@adsl.onnet> wrote in message
news:40********@duster.adelaide.on.net...
Hi

I just made a script that gets a bunch of login info and I've come across
a
hurdle that I failed to think about it.. and now think I may have wasted my
time...

The login info I retreive needs to be POSTed to another site. Everything

is
beautiful, except now I don't know how to go about it..

I could use Location: URL but I have to chuck on the login info in the

URL which would then be visible to the naked eye.

Is there a way to POST it.. ? Been a while since I messed with web stuff

so
any help appreciated.


Use the HTTP status code 307:

header("HTTP/1.0 307 Temporary Redirect");
header("Location: http://www.example.com/");

When the incoming request is a POST, the browser post to the redirected

page as well. Note that in some non-standard browsers a warning would appear.


Excellent! That works great, thanks.
Jul 17 '05 #4
"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:c6**********@news.tue.nl...
Chung Leong <ch***********@hotmail.com> wrote:
The login info I retreive needs to be POSTed to another site. Everything
is
beautiful, except now I don't know how to go about it..

I could use Location: URL but I have to chuck on the login info in the
URL which would then be visible to the naked eye.

Is there a way to POST it.. ? Been a while since I messed with web
stuff so
any help appreciated.


Use the HTTP status code 307:

header("HTTP/1.0 307 Temporary Redirect");
header("Location: http://www.example.com/");

When the incoming request is a POST, the browser post to the redirected page as well. Note that in some non-standard browsers a warning would appear.


My guess is this is not what the OP acutally wants. Unless he wants to
redirect the browser to the other site (in that case pointing the action
directly to the site might be easier).


It's a bit more than that. I need to check a radio option that the user
selects, and then the form data they entered gets posted to the site
depending on what radio option they selected.
My guess is that he wants to do the post from within his own php, in
that case he could take a look at curl, snoopy
(http://sourceforge.net/projects/snoopy/) or an code snipper I once
posted here
(http://groups.google.com/groups?selm...%40news.tue.nl)


Thanks for your help.
Jul 17 '05 #5
"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:c6**********@news.tue.nl...

My guess is this is not what the OP acutally wants. Unless he wants to
redirect the browser to the other site (in that case pointing the action
directly to the site might be easier).

My guess is that he wants to do the post from within his own php, in
that case he could take a look at curl, snoopy
(http://sourceforge.net/projects/snoopy/) or an code snipper I once
posted here
(http://groups.google.com/groups?selm...%40news.tue.nl)


But then the user doesn't get redirected to the other site. If you need to
alter the form data before the redirection occurs, I think the only way is
to generate a form with the altered data in hidden fields, then submit the
form automatically using Javascript.
Jul 17 '05 #6

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

Similar topics

2
by: Robert Oschler | last post by:
I am working on a PHP 4 app that interacts with an external authorization server. The external server does "third-party" authorization of users. So I do the following: 1) Each of my PHP scripts...
3
by: tony | last post by:
I've been searching through the threads to find a solution for 401.3 error triggered by windows authentication not being able to redirect to a custom error page to no avail. It seems that ASP.NET...
4
by: jjjooooohhnnn | last post by:
Greetings, I have encountered what appears to be a fairly common problem: RedirectFromLoginPage is not redirecting to RedirectUrl. I have tried all the advice that I could on the 'net, and...
9
by: Denise | last post by:
I have posted a similar message in 2 other forums but got no response. I have spent more hours than I can count researching this. Can anyone provide some insight...? Our ASP.Net application...
3
by: Shreyas | last post by:
I am a new user writing some scripts to store data entered via a browser into a database. I have several content pages, and one "processing" page. A content page often has a form like this: ...
2
by: sklett | last post by:
not sure if that subject makes sense ;0) I've been asked to do something I've never had to do; Create a form and "hide" the url that it posts to. They don't want a user to be able to view the...
41
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to...
6
by: rpcchandu | last post by:
Hi Coders, I have to redirect from my server to the different server page by simulating the POST method submit from the Controller file, I tried using post_via_redirect, but could not succeed......
3
pradeepjain
by: pradeepjain | last post by:
hii guys, i am redirecting my website to an error page when it cannot connect to mysql database .because of this the url of the page gets changed to error page url .so the user will...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.