PHP Doku:: HTTP Funktionen - ref.http.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteHTTPHTTP Funktionen

Ein Service von Reinhard Neidl - Webprogrammierung.





HTTP Funktionen


6 BenutzerBeiträge:
- Beiträge aktualisieren...
henke dot andersson at comhem dot se
14.01.2006 22:01
If you want to make outgoing http connections with php, concider the curl extension.
woei at xs4all dot nl
30.11.2005 16:57
Actually, if you want to redirect a user why let HTML or JavaScript do it? Simply do this:

7.07.2004 20:39
Regarding what the guy before said.  We've experienced problems where certain firewalls have encrypted the HTTP_REFERER meaning that it doesnt always contain the place you've come from.

Better to track where the user has come from either in a form post or in the url.

28.04.2004 4:05
in reference to toashwinisidhu's and breaker's note, a more effective way would be to use meta-tag redirect, for example.

= ""; // target of the redirect
$delay = "3"; // 3 second delay

echo '<meta http-equiv="refresh" content="'.$delay.';url='.$url.'">';


The meta goes in the head of the HTML.
This method does not require javascript and is supported by most browsers and is rarely, if ever, filterd out.
toashwinisidhu at yahoo dot com
21.04.2004 12:55
The method given below may not sometimes work.
The following method has always worked with me:
just put the following 3 lines in your PHP code

<body onload=setTimeout("location.href='$url'",$sec)>

$sec is the time in second after which the browser would automatically go to the url. Set it to 0 if you do not want to give any time.
You can use this function on the events of various html/form objects (eg.-onclick for button).eg.
<input type=button value="Go to" onclick=setTimeout("location.href=''",0)>
Use this to one step back
<input type="button" value="Back" onclick=history.go(-1)>
jeffp-php at outofservice dot com
5.01.2001 5:37

You'll usually access variables from forms sent via POST method by just accessing the associated PHP global variable.

However, if your POST data is not URI encoded (i.e., custom application that's not form-based) PHP won't parse the data into nice variables for you.  You will need to use $HTTP_RAW_POST_DATA to access the raw data directly. (This should return a copy of the data given to the PHP process on STDIN; note that you wan't be able to open STDIN and read it yourself because PHP already did so itself.)

PHP Powered Diese Seite bei
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)