Page 1 of 1

http_get()

Posted: Fri Oct 13, 2006 11:07 am
by SpecialK
Has anyone used the function http_get()?

I am trying to figure it out based on the website,

http://ca3.php.net/manual/en/function.http-get.php

The problem is I don't understand how the options should be passed as an array with not being able to find an example

Code: Select all

http_get ( [string url [, array options [, array &info]]] )
Should they just be inserted into an array, then that array be passed?

Code: Select all

$options['http_auth'] = "$user:$pass";

http_get("192.1.1.100",$options);
I am doing this for an entire backend so it will be internal to another IP but the person in charge of the http.conf files doesn't want to alter any files. This is one of the options so a user can log in php, then php can send the authentication using the webserver and even fake the host name so it can be accessed without leaving the local network and no conf files will change.

[This is similar problem to the Apache one I posted in that forum viewtopic.php?t=56987, but can't use those options due to restrictions that have been imposed]

Posted: Fri Oct 13, 2006 1:10 pm
by John Cartwright
Should they just be inserted into an array, then that array be passed?
Yes. At first glance you are doing everything correctly.