Call to Undefined Function http_get

I"m just trying to run a simple example for http_get() and it's failing
with an undefined function error.

<?php
$response = http_get("http://www.example.com/", array("timeout"=>1),
$info);
print_r($info);
?>

Is there something I need to install to get this function to work?

Matt
Matt F [ Mi, 23 Mai 2007 23:58 ] [ ID #1720973 ]

Re: Call to Undefined Function http_get

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt F wrote:
> I"m just trying to run a simple example for http_get() and it's failing
> with an undefined function error. [snip]
> Is there something I need to install to get this function to work?

You need the HTTP extension: http://us3.php.net/manual/en/ref.http.php

- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVLtbqTO+fYacSNoRAh09AJ9xMq7UPKFDU4a+SdjMuLzH0MnKbwCf ft6x
oyjrGHDR6Og+5ggWoIns3sw=
=DPMA
-----END PGP SIGNATURE-----
edwardzyang [ Do, 24 Mai 2007 00:08 ] [ ID #1720974 ]

Re: Call to Undefined Function http_get

On Wed, 23 May 2007 18:08:27 -0400, Edward Z. Yang <edwardzyang [at] thewritingpot.com> wrote:
:
: Matt F wrote:
: > I"m just trying to run a simple example for http_get() and it's failing
: > with an undefined function error. [snip]
: > Is there something I need to install to get this function to work?
:
: You need the HTTP extension: http://us3.php.net/manual/en/ref.http.php
:

Okay, now I don't get any error message, but I'm not getting any output
either.
Matt F [ Do, 24 Mai 2007 17:51 ] [ ID #1722331 ]

Re: Call to Undefined Function http_get

Matt F wrote:
> On Wed, 23 May 2007 18:08:27 -0400, Edward Z. Yang <edwardzyang [at] thewritingpot.com> wrote:
>
> Okay, now I don't get any error message, but I'm not getting any output
> either.

I ended up using curl instead.
matt [ Fr, 25 Mai 2007 01:07 ] [ ID #1722338 ]
PHP » alt.php » Call to Undefined Function http_get

Vorheriges Thema: formmail
Nächstes Thema: mysql versus pear db versus pear mdb2 versus pdo