Note that there are some explanatory texts on larger screens.

plurals
  1. POphp script cant read xml data with colon (:)
    primarykey
    data
    text
    <p><strong>I tried to read youtube xml data width php but stuck because youtube uses colon (:)in his API To be precise, here is script I use:</strong></p> <pre><code>$video = array('/some arrays here,separated width commas/');// array of youtube videos $v = preg_replace("/[^A-Za-z0-9\-\_]/","",$_GET["v"]); // make sure "v" parameter is sanitized if(!empty($v) &amp;&amp; in_array($v,$video)){ //check if parameter "v" is empty and is yours video echo('&lt;object width="853" height="505"&gt;&lt;param name="movie" value="http://www.youtube.com/v/'.$v.'&amp;hl=en_US&amp;fs=1&amp;hd=1&amp;color1=0xe1600f&amp;color2=0xfebd01"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/'.$v.'&amp;hl=en_US&amp;fs=1&amp;hd=1&amp;color1=0xe1600f&amp;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="853" height="505"&gt;&lt;/embed&gt;&lt;/object&gt;'); }else{ foreach($video as $v){ echo(' &lt;div class="tube"&gt;&lt;a href="/pages/tube.php?v='.$v.'" class="thickbox"&gt;&lt;img style="border:2px solid #000;margin:5px;" alt="" src="http://i1.ytimg.com/vi/'.$v.'/default.jpg"/&gt;&lt;/a&gt;'); $xmlData = simplexml_load_string(file_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$v.'?fields=title,yt:recorded'));//it should be working if I add fields just separated width commas $title = (string)$xmlData-&gt;title; $recorded = (string)$xmlData-&gt;recorded;//It should be yt:recorded but I understand that cant use : here! { echo '&lt;p&gt;'.$recorded.' '.$title.'&lt;/p&gt;&lt;/div&gt;'; } } } </code></pre> <p>It works fine width just title. Is it possible to read somehow yt:recorded</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload