Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
PHP Redirect with POST headers
Old 08-25-2006, 12:55 PM PHP Redirect with POST headers
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
I am trying to find a way to redirect a user while keeping the POST header vars in tact.

Here is the situation: I have a user submit a form that posts name, email and feedback comments. I want to submit this to a php page and capture the user-submitted data, no-problem there. After I capture the data, I have to redirect the user to an outside marketing vendor that submits users name and email to a newsletter signup, and in return they are redirected back to us landing on a thank-you page.

I have to redirect the user using POST data from the users IP (spam protection), but I can't accept the feedback in the GET data because of the size limits.

Any suggestions on how to accomplish this???
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
View Public Profile
 
 
Register now for full access!
Old 08-25-2006, 05:56 PM Re: PHP Redirect with POST headers
kIDJOE's Avatar
Extreme Talker

Posts: 186
Location: Hollywood, CA
Trades: 0
Hidden Fields.

The fields that the 3rd party is requestiong pass them trough your pages and when ready to redirect take the Data off your hidden fields
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

kIDJOE is offline
View Public Profile Visit kIDJOE's homepage!
 
Old 08-25-2006, 05:56 PM Re: PHP Redirect with POST headers
kIDJOE's Avatar
Extreme Talker

Posts: 186
Location: Hollywood, CA
Trades: 0
what size limits? if its a file you can create a temp directory to put the file and send a pointer instead?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

kIDJOE is offline
View Public Profile Visit kIDJOE's homepage!
 
Old 08-26-2006, 08:46 AM Re: PHP Redirect with POST headers
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Quote:
Originally Posted by kIDJOE View Post
Hidden Fields.

The fields that the 3rd party is requestiong pass them trough your pages and when ready to redirect take the Data off your hidden fields
I don't really understand what you mean. The 3rd party we're using is AWebber.com. What our form takes is users name, email and feedback comments. AWebber just needs the name and email to sign them up in our newsletter, and I need all three to record thier comments and mail them a discount coupon. There is other information I need to pass to AWebber, but it is static account info.

The "size" I'm referring to is that the comments string may overexceed the char limit if I were to have AWebber redirect back to us passing the string in the url as a GET var.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
View Public Profile
 
Old 08-26-2006, 09:48 AM Re: PHP Redirect with POST headers
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
It just sounds like you need temporary storage, so why not create a temp file for the information.

Sessions is probably the proper way for dealing with this though.

The thing is, do you have to redirect the user to the outside or have you got the information and can just pass it directly to them to be processed without user intervention, so that you avoid redirection.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
View Public Profile Visit mastercomputers's homepage!
 
Old 08-26-2006, 10:47 AM Re: PHP Redirect with POST headers
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Unfortunately, I have to have the user physically go to AWebber with the post vars so that AWebber can signup user to our newsletter, and then they are redirected back to our site of a page of our choice. The process is invisable to the user, but it helps AWebber prevent spamming and bots to abuse the system.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
View Public Profile
 
Old 08-26-2006, 02:05 PM Re: PHP Redirect with POST headers
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
I do not think it is possible to get a browser to send POST variables through PHP and header.

I think you may have to use a form as kIDJOE says, just put everything in hidden form fields with a form that posts to the site. You can use Javascript for instant submit, but place a 'Continue' button as a fallback:

Code:
<form action="http://www.thesite.com/script/" method="post" name="theform">
<input type="hidden" name="email" value="<?php echo $email; ?>" />
<!-- etc -->
<input type="submit" value="Continue" />
</form>
<script type="text/javascript">document.theform.submit();</script>
I would suggest using PHP to make the request using sockets, but you say it needs to come from the same IP so thats out...
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
View Public Profile
 
Old 08-26-2006, 11:05 PM Re: PHP Redirect with POST headers
Average Talker

Posts: 18
Trades: 0
i think theres actually a way to do it, theres a library called cURL (PHP: CURL, Client URL Library Functions - Manual) that might be able to do just that. i was in the same predicament as you, but i was able to work around it without using cURL. the library might take a bit of time to set up, and i dont think its compatible with all web installations. worth a shot though.
__________________

Please login or register to view this content. Registration is FREE
viratigo is offline
View Public Profile
 
Old 08-28-2006, 09:22 PM Re: PHP Redirect with POST headers
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
A special Thank You! to kIDJOE and Chroder for thier suggestions. The javascript auto form submit idea works like a pro!

__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
View Public Profile
 
Old 01-12-2012, 05:17 PM Re: PHP Redirect with POST headers
kIDJOE's Avatar
Extreme Talker

Posts: 186
Location: Hollywood, CA
Trades: 0
Cool! Im glad it worked!
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

kIDJOE is offline
View Public Profile Visit kIDJOE's homepage!
 
Old 01-12-2012, 05:32 PM Re: PHP Redirect with POST headers
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
Could you use contexts? If that doesn't work, would cURL?

Just some thoughts.
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is online now
View Public Profile
 
Old 01-12-2012, 06:39 PM Re: PHP Redirect with POST headers
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Errm Guys!

This thread is SIX Years old!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-12-2012, 06:51 PM Re: PHP Redirect with POST headers
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
Holy crap, I didn't even realize that was a necropost! D: Abandon thread!
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is online now
View Public Profile
 
Old 02-12-2012, 10:23 AM Re: PHP Redirect with POST headers
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by zhuzhuzhu View Post
This thread is SIX Years old????
Well spotted, did you work that out for yourself??

Or did you have some help with it??
Quote:
Originally Posted by chrishirst View Post
Errm Guys!

This thread is SIX Years old!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Closed Thread     « Reply to PHP Redirect with POST headers
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37793 seconds with 12 queries