Re: forwarding a form to another server



andrew@xxxxxxxxxxxxxxxxxxxxxxxxxx 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
.



Relevant Pages

  • Re: [OT] nested while - how to go to the beginning of the first while?
    ... When you request the tinyurl.com URL, your browser receives and follows an HTTP 302 redirect to the original, longer URL. ... Other "URL shortening" services acknowledge this problem and insert a time delay or confirmation before redirecting the client. ... the .htm should be of no reassurance - browsers will interpret content based on the HTTP Content-type header they receive, ...
    (comp.lang.c)
  • Re: confirm in asp.net
    ... Or you could see if a confirmation is needed when rendering the first page ... and insert the javascript code that triggers this action when the event that ... browser, I creates an sql that checks something in a database, if there are ...
    (microsoft.public.dotnet.framework.aspnet)
  • [Full-Disclosure] Update: Web browsers - a mini-farce (MSIE gives in)
    ... a brief update on the status of reported sample vulnerabilities: ... independent fixes from OpenBSD team (DoS) ... no official confirmation, ... This means that VIRTUALLY EVERY BROWSER IN USE TODAY is unable * ...
    (Full-Disclosure)
  • Calling a Function inside the SendMail
    ... Hi Group - I have a function to send an email to a client after they ... that prints their input to the browser as a confirmation. ... I'd like to be able to include that print function inside my mail ... get printed to the browser AND the exact same content will be emailed. ...
    (comp.lang.php)
  • Update: Web browsers - a mini-farce (MSIE gives in)
    ... a brief update on the status of reported sample vulnerabilities: ... independent fixes from OpenBSD team (DoS) ... no official confirmation, ... This means that VIRTUALLY EVERY BROWSER IN USE TODAY is unable * ...
    (Bugtraq)