Jump to content


Photo

Readfile returns HTTP/1.1 404 with some existing URLs


  • Please log in to reply
1 reply to this topic

#1 luis.sg

luis.sg
  • New Members
  • Pip
  • Newbie
  • 1 posts
  • LocationBarcelona

Posted 04 August 2006 - 10:46 AM

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...lt/readfile.php attempts to open
"http://www.syndicart...m/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.syndicart...m/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....le=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


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

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 04 August 2006 - 12:19 PM

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??

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users