FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » got allow_url_fopen, still don't travel :)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
got allow_url_fopen, still don't travel :) [message #174030] Thu, 19 May 2011 22:09 Go to previous message
Evolution is currently offline  Evolution
Messages: 14
Registered: April 2011
Karma:
Junior Member
So I got the allow_url_fopen turned on for my webshare but when I
combine the temperature from NOAA's xml file, I still get zero
output. It's as if the strftime and simplexml_load_file are
incompatible.

This gets no output:

<?
session_register();
session_start();
Today is
print (strftime("%A, %B %e, %Y"));
echo " in Santa Barbara where the temperature is "
$url = 'http://www.nws.noaa.gov/data/current_obs/KSBA.xml';
$xml = simplexml_load_file($url);
echo $xml->temp_f,' F<br />';
?>

but when I comment out line 4-6, I at least get the temperature.

<?
session_register();
session_start();
// Today is
// print (strftime("%A, %B %e, %Y"));
// echo " in Santa Barbara where the temperature is "
$url = 'http://www.nws.noaa.gov/data/current_obs/KSBA.xml';
$xml = simplexml_load_file($url);
echo $xml->temp_f,' F<br />';
?>

My test web page (the code directly above) is at:

http://www.geol.ucsb.edu/library/php/w3.php

Thanks for any help.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Nslookup
Next Topic: Regular Expressions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 07:22:32 GMT 2024

Total time taken to generate the page: 0.04366 seconds