I'm trying to use vimeos API to call the name of a video via its XML file. It works file if I use this code for one xml file:
$location = "http://vimeo.com/api/v2/video/16417063.xml";
$xml = simplexml_load_file($location);
echo $xml->video->title;
but after I stored all the vimeo video ids in a database and used this code:
<?php
$seasontwo=mysql_query("SELECT s2 FROM video_ids LIMIT 1");
while($row=mysql_fetch_array($seasontwo))
{
$headline=$row['s2'];
$location = "http://vimeo.com/api/v2/video/".$headline.".xml";
$xml = simplexml_load_file($location);
echo $xml->video->title;
}
?>
I get the error:
Warning: simplexml_load_file(http://vimeo.com/api/v2/video/16417063.xml) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 429 Too Many Requests in /home/dpnews0/public_html/tnn/wordpress/wp-content/themes/twentytwelve/content.php on line 11
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://vimeo.com/api/v2/video/16417063.xml" in /home/dpnews0/public_html/tnn/wordpress/wp-content/themes/twentytwelve/content.php on line 11
Even though the xml file http://vimeo.com/api/v2/video/16417063.xml is in fact valid. Can anyone help me with this?