Jump to content

Readfile returns HTTP/1.1 404 with some existing URLs


luis.sg

Recommended Posts

Hi there.

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

http://www.ls-art.co.uk/
and
http://www.syndicarts.com/

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
"http://www.syndicarts.com/xsl/test.php"

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.

---THINGS THAT I'VE TRIED:
* 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:
http://www.rss-info.com/rss2.php?integration=php&rss=http%3A%2F%2Fstayeat.com%2Ffeed%2F&number=50&width=320&ifbgcol=FFFFFF&bordercol=D0D0D0&textbgcol=F0F0F0&rssbgcol=F0F0F0&showrsstitle=1&showtext=1
It WORKS!!!

--------------------

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.