I'm having a problem with some PHP code I'm trying to use. I keep getting an "unexpected T_STRING" error? This is the code on my test page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include 'http://www.weather.gov/xml/current_obs/KTPA.xml';
$current_observation = new SimpleXMLElement($xmlstr);
echo $current_observation->location[0]->plot;
echo $current_observation->weather[0]->plot;
echo $current_observation->temperature_string[0]->plot;
echo $current_observation->wind_string[0]->plot;
?>
What I'm wanting to do is pull weather data from this National Weather Service XML file, and display it in a way similar to how the NWS is doing it on that page. However, the above code returns this message: "Parse error: syntax error, unexpected T_STRING in http://www.weather.gov/xml/current_obs/KTPA.xml on line 1". Is this something I can fix? I'm new to PHP, so any help you can provide will be appreciated.