Take the 2-minute tour ×

is it possible to redirect a visitor on my php page as soon as I received a Postback/Callback? If yes can someone provide me some pointers where to start. Searched in Google for it but found nothing...


share|improve this question

2 Answers 2

up vote 1 down vote accepted

At the top of your PHP page, if you include the following:

if( strtolower( $_SERVER['REQUEST_METHOD'] ) == "post" ) {
    header( "Location: /your-target-page.htm" ); 

If you wanted to do a 301 redirect instead of the default 302, you could do:

header( "HTTP/1.1 301 Moved Permanently" ); 
share|improve this answer

As long as no other text has been sent in the response yet, all you have to do is send the redirect header, like so:


Google for php redirect and you should be able to get some hits.

Also, note that a "postback" or "callback" is just like any other web request.

share|improve this answer

Your Answer


