Hello, can someone help me to find a script that retrieve info (title, description, tags, duration, poster name with profil url) from youtube, metacafe, veoh, redtube, pornhub & others... tnx
function cURL($url,$header,$cookie,$post_data) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, $header); curl_setopt($ch, CURLOPT_NOBODY, $header); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); if($post_data){ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); }; $result = curl_exec($ch); curl_close($ch); if($result){ return $result; }else{ return curl_error($ch); }; }; PHP: A function you might use. Pass appropraite values as suggested by the names of argument variables. if you want to get some data from, say google...then $a = cURL("http://google.com",null,null,null); echo $a; PHP: If you want to send some data on google then $a = cURL("http://google.com",null,null,"search=php"); echo $a; PHP:
thank you very much for it i also google cUrl & learn something. now back to the question. "need script that retrieve info from youtube, metacafe etc"
i already understood the theory. but i need just an example so i can make it without any errors how about giv me an example of DURATION & DESCRIPTION grabbing from a metacafe link...plz
thank you it works but actually its not the best way. coz many server hav php curl extension disabled...like mine was then....in this method it loads the whole pages first (waste of time) the best way is to retrieve data from feed. example: for youtube: http://gdata.youtube.com/feeds/api/videos/VIDEOID & RegEx from there. i already made it for youtube but i dont know such feed link for metacafe, veoh, dailymotion, pornhub, redtube thats what i want now