You are here: Re: forwarding a form to another server « All PHP « IT news, forums, messages
Re: forwarding a form to another server

Posted by J.O. Aho on 12/20/05 21:00

andrew@transitionkiteboarding.com wrote:
> Hi there everyone.
>
> Right I have scoured everywhere to find out how to do this and I
> haven't the foggiest...
>
> I am building a shopping cart that uses an external clearing house
> [world pay].
>
> My shopping cart sequence is :
>
> Checkout page [show the contents of the cart etc] ----> Confirmation
> confirm the details of the cart, finalise totals etc -------> Forward
> to world pay for card transaction -------> On completion world pay does
> a "call back" that executes a page on my site which effectively
> confirms that the trasaction took place [puts in transax ids etc into
> my database for order management].
>
> This works great however what has happened is that sometimes world pays
> call back doesn't fire when it should have due to internet congestion
> etc the request times out. Because the order isn't confirmed until we
> get the call back needless to say this causes a problem.
>
> So what I want to do is basically put an invisible page in between our
> confirmation screen [where the user says "Yes this is correct take me
> to world pay"] and the first world pay screen [enter your card
> details].
>
> Where I am having troubles though is I want this page to be invisible.
> I need to submit the confirmation page form to this hidden page and
> then *automatically" submit the resulting form to world pay - and move
> the users' browser along as well. I don't want the user to have to
> submit the page again though and I certainly don't want to hack it with
> a onLoad="form.Submit()" type thing in Javascript on my hidden page -
> it has to be accessible for people without JavaScript switched on.
>
> I'm sure it is a case of writing the headers or soemthing but the only
> things I can find are using fsockopen which submits a request and
> downloads the results into the originating page. I want to forward the
> browser entirely.
>
> Any help would be very much appreciated.

You "invisible" page, 4 lines long:
<?PHP
header("Location:
http://www.example.com/snetopage.php?".$_SERVER['QUERY_STRING']);
exit;
?>

See to not have any white spaces before '<?PHP' and after '?>'.

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация