b2k Posted January 21, 2008 Share Posted January 21, 2008 I'd modified this script but its give a code error, check out guys <?php if (isset($_GET{'url'})){ $url=$_GET{'url'}; $url=trim($url); if (strstr($_GET['url'],"youtube.com")){ $data = @file_get_contents($_GET['url']); @preg_match('#/watch_fullscreen\?video_id=([a-z0-9-_]+)&l=([0-9]+)&t=([a-z0-9-_]+)#i', $data, $matches); if (ereg($matches[1], $_GET['url'])) { Header("Location: http://www.youtube.com/get_video?video_id=$matches[1]&l=$matches[2]&t=$matches[3]"); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>WebVideo Grabber</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> function showurl(info){ info = info + 1; for (i=1;i<=5;i++){ if (i!=info){ document.getElementById('example_'+i).style.display = 'none'; } else {document.getElementById('example_'+i).style.display = 'inline';} } } </script> <style type="text/css"> <!-- body { font-family: sans-serif; font-size: 12px; width: 334px; margin: 40px auto 20px auto; } #url { font-size: 1em; color: #222222; background-color: #F8F8F8; width: 295px; margin: 0px 0px 4px 0px; padding: 3px; border-color: #333333 #CCCCCC #CCCCCC #333333; border-style: solid; border-width: 1px; } .submit { background-color: #000000; repeat-x top; height:22px; border:1px solid #666666; color:#FFF; font-size:12px; font-weight:bold; } #loading, #frame { padding: 6px; display: none; } .chooser_info { font-size: 10px; font-family: arial; color: #ff0000; } .chooser_info_hide { font-size: 10px; font-family: arial; color: #ff0000; display: none; } --> </style> </head> <body bgcolor="#000000"><a href="grabber.php"><img src="logo.gif" alt="WebVideo Grabber" border="0"></a><br><br> <form method=get action="" name=form> <input type="text" id="url" name="url" /><br> <select name=site onChange="showurl(document.form.site.selectedIndex);" > <option value=youtube>YouTube</option> <option value=ifilm>iFilm</option> <option value=dailymotion>DailyMotion</option> <option value=blip>Blip.tv</option> <option value=break>Break.com</option> </select> <input type="submit" class="submit" value="Save Video" /> </form> <div> <p> <font id="example_1" class="chooser_info" onClick="document.form.url.value='http://www.youtube.com/watch?v=b0l4QAkzkl4'">example link: <u>http://www.youtube.com/watch?v=b0l4QAkzkl4</u></font> <font id="example_2" class="chooser_info_hide" onClick="document.form.url.value='http://www.ifilm.com/video/2873091'">example link: <u>http://www.ifilm.com/video/2873091</u></font> <font id="example_3" class="chooser_info_hide" onClick="document.form.url.value='http://www.dailymotion.com/video/xqq55_4-joels'">example link: <u>http://www.dailymotion.com/video/xqq55_4-joels</u></font> <font id="example_4" class="chooser_info_hide" onClick="document.form.url.value='http://blip.tv/file/298628'">example link: <u>http://blip.tv/file/298628</u></font> <font id="example_5" class="chooser_info_hide" onClick="document.form.url.value='http://www.break.com/index/amateur-ghosts.html'">example link: <u>http://www.break.com/index/amateur-ghosts.html</u></font> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/87071-solved-problem-with-script/ Share on other sites More sharing options...
pocobueno1388 Posted January 21, 2008 Share Posted January 21, 2008 The error being? Link to comment https://forums.phpfreaks.com/topic/87071-solved-problem-with-script/#findComment-445290 Share on other sites More sharing options...
revraz Posted January 21, 2008 Share Posted January 21, 2008 This is wrong $url=$_GET{'url'}; should be $url=$_GET['url']; Also, I count 3 open { and only 2 closing } Link to comment https://forums.phpfreaks.com/topic/87071-solved-problem-with-script/#findComment-445293 Share on other sites More sharing options...
b2k Posted January 21, 2008 Author Share Posted January 21, 2008 Thanks....Work awesome ! Link to comment https://forums.phpfreaks.com/topic/87071-solved-problem-with-script/#findComment-445493 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.