PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pc-moon
Forum Newbie
Posts: 3 Joined: Tue Apr 26, 2011 7:02 pm
Post
by pc-moon » Sat Apr 30, 2011 11:00 pm
hello
hope all is well
i use php5
my code :
Code: Select all
$xml = simplexml_load_file('http://feeds.bbci.co.uk/news/rss.xml?edition=int') ;
foreach($xml->channel->item as $key110 ){echo "<a href='".$key110->link."'><h3>".$key110->title."</h3></a><br>".$key110->description."<br>".$key110->pubDate."<hr>";}
also it's work on my computer
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Mon May 02, 2011 4:18 pm
Did you have a question?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
pc-moon
Forum Newbie
Posts: 3 Joined: Tue Apr 26, 2011 7:02 pm
Post
by pc-moon » Wed May 04, 2011 6:25 am
yea i wanna ask
this code work well on my computer , but not work on host or server
i mean code get data from xml file of xml formate in localhost --> my computer
but not work on my web site , it's mean didn't read from another server
thank u
eivind
Forum Commoner
Posts: 28 Joined: Tue Apr 19, 2011 7:57 am
Post
by eivind » Wed May 04, 2011 6:28 am
Maybe your web host does not allow loading files outside of the web host?
pc-moon
Forum Newbie
Posts: 3 Joined: Tue Apr 26, 2011 7:02 pm
Post
by pc-moon » Wed May 04, 2011 6:58 am
thank u so much
okey if server not allow what message is send , cause i don't know what is called to get data from another server
also i think my code need some code also , but i'm tiered , i tested curl but no resault
thank u again
McInfo
DevNet Resident
Posts: 1532 Joined: Wed Apr 01, 2009 1:31 pm
Post
by McInfo » Wed May 04, 2011 3:27 pm
The ability of simplexml_load_file() and other functions to load remote content is affected by
allow_url_fopen .