Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3634894
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:50:10+00:00 2026-05-19T00:50:10+00:00

My local server reads the RSS fine, but when I upload it I’m getting

  • 0

My local server reads the RSS fine, but when I upload it I’m getting this error:

Warning: fopen(http://webservice.weatherzone.com.au/rss/wx.php?u=13145&lt=aploc&lc=6439&fc=1) [function.fopen]: failed to open stream: HTTP request failed! in /var/www/vhosts/---------------------- on line 105
Error reading RSS data.

I cannot post the URL to the site because I’m still working on it and its a security issue. And I’m not able to modify the php.ini file…

This is the code where it is called:

$xml_parser = xml_parser_create();    
$rss_parser = new RSSParser();    
xml_set_object($xml_parser,&$rss_parser);    
xml_set_element_handler($xml_parser, "startElement", "endElement");    
xml_set_character_data_handler($xml_parser, "characterData");    
**$fp = fopen("http://webservice.weatherzone.com.au/rss/wx.php?u=13145&lt=aploc&lc=6439&fc=1","r")    
   or die("Error reading RSS data.");**    
while ($data = fread($fp, 4096))    
   xml_parse($xml_parser, $data, feof($fp))    
       or die(sprintf("XML error: %s at line %d",    
           xml_error_string(xml_get_error_code($xml_parser)),    
           xml_get_current_line_number($xml_parser)));    
fclose($fp);    
xml_parser_free($xml_parser);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:50:10+00:00Added an answer on May 19, 2026 at 12:50 am

    Do not use fopen() to read files from Web.

    Try cURL instead, if installed:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $content = curl_exec($ch); // xml-code in $content
    curl_close($ch);
    

    http://www.php.net/manual/en/book.curl.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our git server will be local, but we want an server where our local
I start a .Net server side program on my local workstation, but soon it
Is it possible to install/register another local server instance in any SqlServer version, besides
I currently use my local web server to allow costumers to preview some applications
I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the
I've got an old classic ASP site that connects to a local sql server
I test my app only on local cassini web server, and I get strange
I can run the server on my local machine and connect to it on
I have a small server program that accepts connections on a TCP or local
I'm running MySQL 5 on a linux server on my local network. Running windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.