RE: [PHP] Loading a URL
| From: | Kaleb Pomeroy | Date: | Fri, 06 Jul 2007 01:54:54 +0000 |
| Subject: | RE: [PHP] Loading a URL | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258383@lists.php.net to get a copy of this message | ||
That's it. Thanks a bunch Robert
-----Original Message-----
From: Robert Cummings [mailto:robert@interjinn.com]
Sent: Thu 05-Jul-07 8:53 PM
To: Kaleb Pomeroy
Cc: php-general@lists.php.net
Subject: Re: [PHP] Loading a URL
On Thu, 2007-07-05 at 20:39 -0500, Kaleb Pomeroy wrote:
> /*I am trying to load an XML file from the following site, which btw is a working site you can
> put in the address bar.*/
> $url =
> "http://isbndb.com/api/books.xml?access_key=WC2BD24W&results=prices&index1=isbn&value1=030681496x";
> //open the url
> if(!($handle = fopen($url, "r"))){
> echo "Error opening URL <br />".$url;
> exit();
> }
> else{
> echo "It Worked";
> //actually use simpleXML and parse it, but that's not the problem.
> }
>
> /*
> *For some reason that code returns:
> *Error opening URL
> *GlÙZšÀ‡é¡„Ç;€
> —Chttp://isbndb.com/api/books.xml?access_key=WC2BD24W&results=prices&index1=isbn&value1=030681496x
> *Is there something obvious that I am missing, or what?
> */
Check your configuration to see the value of: allow_url_fopen
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'