fopen failed to open remote URL

fopen failed to open remote URL

Post by RnJpZWRlci » Thu, 07 Sep 2006 22:54:03


Hi,

Im trying to integrate a rss feed into my page but struggle to fetch the
dynamic generation of the rss feed

If I type this into the browser as a result the xml file is shown as
expected
http://www.yqcomputer.com/ +%28ckpp%29&path=%2F&rev=0&sc=0&isdir=1

If I use it with a php-script which opens the url with fopen etc.
it just gives me


Warning:
fopen( http://www.yqcomputer.com/ +%28ckpp%29&path=%2F&rev=0&sc=0&isdir=1):
failed to open stream: HTTP request failed! HTTP/1.0 503 Service
Unavailable in
/data/web/b6/c9/b1/proaudio.tuxfamily.org/htdocs/wiki/extensions/rss.php
on line 5


you can call it here:
http://www.yqcomputer.com/

the whole script is for now just:

<?php

$url =
' http://www.yqcomputer.com/ +%28ckpp%29&path=%2F&rev=0&sc=0&isdir=1';

$fp = fopen($url, 'r');

?>

Whats going wrong?

-----------------------------------------------------------------------
my php-configuration:

PHP Version 4.3.10-16

System Linux tequila 2.6.17.7-grsec #1 SMP Thu Jul 27 04:40:10 CEST
2006 i686
Build Date Aug 24 2005 20:10:18
Configure Command '../configure' '--prefix=/usr'
'--enable-discard-path' '--enable-fastcgi'
'--with-config-file-path=/etc/php4/cgi' '--enable-memory-limit'
'--disable-debug' '--with-regex=php' '--disable-rpath'
'--disable-static' '--with-pic' '--with-layout=GNU'
'--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype'
'--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--enable-mbstring'
'--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets'
'--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc'
'--enable-yp' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr'
'--with-openssl=/usr' '--with-zip=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--without-mm' '--without-mysql'
'--without-sybase-ct'
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php4/cgi/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2,
compress.zlib
-----------------------------------------------------------------------


thx for any input

Greetings Frieder
 
 
 

fopen failed to open remote URL

Post by Jerry Stuc » Fri, 08 Sep 2006 00:52:47


Works fine here.

503 is generally a temporary error. It could just mean the server was
overloaded.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
XXXX@XXXXX.COM
==================

 
 
 

fopen failed to open remote URL

Post by Jerry Stuc » Fri, 08 Sep 2006 03:38:00

rieder Brzele wrote:

No, but it doesn't work from my browser, either.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
XXXX@XXXXX.COM
==================
 
 
 

fopen failed to open remote URL

Post by Chris Park » Fri, 08 Sep 2006 07:15:58


Set

allow_url_fopen = On

in your php.ini file and try it again.

Chris
 
 
 

fopen failed to open remote URL

Post by Frieder Bz » Fri, 08 Sep 2006 09:29:05

hris Parker wrote:

You're right. But I can't change the config file as its not my server
Are there other possibilities to display the content of a url within a
php-script?

thx

Frieder
 
 
 

fopen failed to open remote URL

Post by Chris Park » Sat, 09 Sep 2006 06:03:42

rieder Bzele wrote:

You could try ini_set():

http://www.php.net/manual/en/function.ini-set.php

I am not sure if it will work with fopen.

Chris Parker