\n\n\nYahoo Yql data.uri Primer Tutorial\n\n"; $erroneousbits = "

Sorry, but " . urldecode($selname) . " is too big a media file to display.


"; $formbits = "

Yahoo Yql data.uri Url


\n
Url of media file:

"; if ($selname != "") { $pageContent = file_get_contents("https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20data.uri%20where%20url%3D%22" . $selname . "%22&format=json&diagnostics=true&callback="); $json_output = json_decode($pageContent); // .true // Confirm that results were returned before parsing if(!is_null($json_output->query->results)){ foreach($json_output->query->results as $event){ if (strpos($event, "data:") !== false) { $things = explode("/", urldecode($selname)); $sbits = "\n"; $firstbits = str_replace("", $sbits . "", $firstbits); echo $firstbits; echo "

" . urldecode($selname) . " looks like above.
\n"; $firstbits = ""; $erroneousbits = ""; } else if (strpos($event, "26049") !== false) { $erroneousbits = "

Sorry, but " . urldecode($selname) . " is not an existant media file.


"; } } } } else { $erroneousbits = ""; } echo $firstbits; echo $erroneousbits; echo $formbits; ?>