I hive one xml document from local radio station, that shows now playing song name, rate, time, topic id and title it (link), and I'm trying to show it as text in my page with this script:
<?php
$data = $xml=simplexml_load_file("http://ift.tt/X2AM6r");
echo $xml->artist . " - ";
echo $xml->title . "<br>Įvertinimas:";
echo $xml->rating . "<br>";
?>
Problem: on this test tool, it works, but on my web server it doesn't... Error on my web server:
Parse error: syntax error, unexpected '$data' (T_VARIABLE) in
/home/raidwars/domains/http://ift.tt/X2AMmL on line 1
PHP version 5.5
P.S. Oh I forgot, the „Įvertinimas“ is like "Rate"
No comments:
Post a Comment