http_get()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
SpecialK
Forum Commoner
Posts: 96
Joined: Mon Sep 18, 2006 3:49 pm

http_get()

Post 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]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
Post Reply