Jump to content


This topic is now archived and is closed to further replies.


Readfile returns HTTP/1.1 404 with some existing URLs

Recommended Posts

Hi there.

I am trying to retrieve a document hosted in a different domain. I own
both of them:


Since the first one doesn't allow me to do XML/XSL transformations, I
use the second one for that. I wanted to use Readfile to retrieve the
results of a transformation I do in "syndicarts" and then show them in
a page hosted in "ls-art".

This is the scenario:

---LS-Art domain:
http://www.ls-art.co.uk/xslt/readfile.php attempts to open

It returns this:
Warning: readfile(http://www.syndicarts.com/xsl/test.php): failed to
open stream: HTTP request failed! HTTP/1.1 404 Not Found in
/vhost/vhost1/l/s/-/ls-art.co.uk/www/xslt/readfile.php on line 11

This is the code I use (readfile.php):

ini_set('allow_url_fopen', 'on');
readfile ("http://www.syndicarts.com/xsl/test.php");

---Syndicarts domain:
I have this file http://www.syndicarts.com/xsl/test.php, which performs
a transformation and shows the results. I've tried to retrieve a static
page, called results.html in the same folder with the same results.

* Changing permissions to the target file. It has read permission.
* I've tried to retrieve the contents of http://www.syndicarts.com/ (it
is index.php). It works fine... so it is not that this domain doesn't
allow remote access. I have tried to move test.php to the root folder,
since there was no problem retrieving the default page. It didn't work.
I have created a subdomain pointing to "xsl" folder, and changing
test.php to index.php. It doesn't work.
* I have tried to open a stream from another website:


I have tried to find an answer for this and I've seen many people with
the same problem. What I don't get is, why can I open some documents
but I can't open this one? Does the target file need to have some kind
od special code or return the data in a special way?

Please, any help with this would be much appreciated. The last option
could be to host the documents that need transformation in
"Syndicarts", but I would like to keep everything on its place.

Thank you very much,

Luis Serrano
Web Developer
Ls-Art.com / Ls-Art.co.uk / Syndicarts.com / WTraveller.com

Share this post

Link to post
Share on other sites
1. contact your host and ask them.
2. contact the company of the third party and try there support.
3. The best advice could be to rebuild it yourself
4.  sessions??

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.