473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Different XMLHttpRequest Object status on the same file??

I use a simple php script to get remote and local xml rss feeds in order to make a simple rss reader. The problem is that i get a 404 XMLHttpRequest status from javascript when the php script tries to read the internal xml file, while getting a 403 when i try to read external files. How is this possible??? I mean javascript sees the connection to the php file, not the other files.

Expand|Select|Wrap|Line Numbers
  1. <?
  2. global $rssurl;
  3. $rssurl=$_GET['url'];
  4. $fp=fopen($rssurl, "r");
  5. $contents=file_get_contents($fp); //fetch RSS feed
  6. fclose($fp);
  7. echo "$contents";
  8. ?>
  9.  
Sep 14 '07 #1
2 1229
pbmods
5,821 Expert 4TB
Heya, Newholborn.

file_get_contents() takes a filename, not a resource.
Sep 14 '07 #2
gits
5,390 Expert Mod 4TB
hi ...

since this seems to be a php-question i moved it here from the js-articles-section ....

kind regards
Sep 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Henri Sivonen | last post by:
I got the following error: Error: " nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" .... with Firefox when using XMLHttpRequest. What's happenening? Is the object being garbage collected...
12
by: knocte | last post by:
Hello. I have always thought that the eval() function was very flexible and useful. If I use it, I can define functions at runtime!! However, I have found a case where eval() does not work...
7
by: SE | last post by:
Hi all, Apologies if this has been done before. I am trying to do some stuff with XMLHttpRequest in mozilla but no dice. I have finally pared everything down to the minimum to see what is...
76
by: kwilder | last post by:
This works, but it doesn't load the latest version of the xml if it was just modified without closing and reopening the browser. Here's the scenario: I have an xml doc called results.xml. It...
42
by: Greg | last post by:
Hi, I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox...
10
by: HugeBob | last post by:
Hi All, I'm having a problem with a web app I'm writing. I have a form for which I'm going to validate one of the fields. I use AJAX to retrieve XML containing a list of valid entries. My app...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.