faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

14 of 62 people (23%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

What is the PHP equivelent of ColdFusion's <CFHTTP> tag? (Both GET and POST operations)
ColdFusion allows automated Form entry and retrieval of resulting data with CFHTTPPARAM--is there a

Mar 15th, 2008 22:33
dman, ha mo, Mikko Räsänen, Ayse Geertsma, Steve Williamson, Vip Malixi, http://www.ttnr.org


> There is none. PHP is separating inputs more and more so I don't
> think there will ever be one. If you want to get all the input (for
> you Get and Post) vars at once, you should set
> the 'register_globals' in your php.ini to 'On'. Read the (online)
> manual for security issues with global registered vars.

No, no, no and no.
Setting 'register_globals' to 'On', is a __high_security_risk__, which 
at worse, can crash your php-server, by a malicious user.
Instead of using either $_GET or $_POST - use $_REQUEST. It also takes 
$_COOKIE.
At ( 
http://dk2.php.net/manual/en/reserved.variables.php#reserved.variables.
request ) you can read more about $_REQUEST, which were introduced in 
PHP 4.1.0.
If the link doesn't work - go to www.php.net and search 
for 'predefined variables'.
Enjoy! ;)