youtubeのファイルをまとめて落とすスクリプト関連
ニコニコ動画の字幕と動画を保存するswfとそれっぽく表示するswf

ここが素敵なので真似しました。
Google Video YouTubeとかの動画があるページURLを入れてボタンを押すとファイルのリンクが表示されるかも。右クリックで保存推奨。
作者 ソース 現在の対応状況
ノートンとかのファイアウォールが機能してるとadの文字列が入ってるリンクが表示されない事がある。
転載改変再配布自由、使用は自己責任、というか誰かにまともに作り直して欲しい所
わかってない人が居るので解説するとgyaoの再生はdrm保護を外さない限りid必要。

携帯動画変換君
YouTubeから落とした .flvファイルをシーク可能な状態で見る
YouTubeのFLVファイルをMedia Player Classicで快適再生

"); if ( $id=="") { $id = places_text($url,"?movie=", "&"); $xml = file_get_contents("http://vision.ameba.jp/api/get/detailMovie.do?movie=".$id); $durl = places_text($xml,"", ""); $durl = str_replace("visionimg.ameba.jp", "visionmovie.ameba.jp", $durl); $durl = str_replace("/jpg/", "/flv/", $durl); $durl = str_replace("_2.jpg", ".flv", $durl); $result = $durl; return ($result); } $id = DeCrypt($id); $id = places_text($id,"nmsfs/fflvb", ".flv/"); $id = substr($id, 0, 6)."/".substr($id, 7); $id = str_replace("V", "/", $id); $result = "http://visionmovie.ameba.jp/flv/".urldecode($id).".flv"; return ($result); }; function get_askjp_url($url) { $html = file_get_contents($url); for ($i=0;($id = places_text($html,"audioid=", "&", $i))!==FALSE;$i++) { $url = "http://www.castella.audioblog.jp/playlist/".$id.".xml"; $xml = file_get_contents($url); $result[] = places_text($xml,""); $result = places_text($result, "src=\"", "\""); $result = places_text($result, "filename=", "&"); return ($result); } function get_clipcast_url($url) { $id = places_text($url, "v/"); $result = "http://clipcast.jp/videoeditor/dlvideo.php?vid=".$id."&kind=.flv"; return ($result); } function get_cliplycos_url($url) { $html = file_get_contents($url); $blogid = places_text($html, "blogid=", "&"); $articleno = places_text($html, "articleno=", "&"); $html = file_get_contents("http://clip.lycos.jp/_blog/BlogView.do?blogid=".$blogid."&articleno=".$articleno); $vid = places_text($html, "?vid=", "'"); $html = file_get_contents("http://movie.lycos.jp:8080/viewer/MovieLocation.do?vid=".$vid); $result = get_attribute($html, "MovieLocation", "url", 0); $service_id = places_text($result, "service_id=", "&"); $s_idx = places_text($result, "s_idx=", "&"); $xml = file_get_contents("http://taonucc.fmss.nefficient.jp/fms/pos_query2.php?service_id=".$service_id."&protocol=http&out_type=xml&s_idx=".$s_idx); $result = get_attribute($xml, "MovieLocation", "movieURL", 0); return ($result); } function get_cliplife_url($url) { $id = places_text($url, "content_id="); $ref = "internal"; $moji = "mtrtjkgrshbsgwr7symmkmtnkmrnknsh"; $pass = md5($id.$ref.$moji); $result = "http://stream.cliplife.jp/getclip/?content_id=".$id."&referer=".$ref."&password=".$pass."&file=cliplife.flv"; return ($result); } function get_cnet_url($url) { $html = file_get_contents($url); $result = places_text($html, "showvideo(\"", "\""); $html = file_get_contents($result); $result = places_text($html, "",""); $result = places_text($result, ""); return ($result); } function get_gametrailers_url($url) { $id = places_text($url, "?id=","&"); $html = file_get_contents("http://www.gametrailers.com/getmediainfo2.php?umid=".$id); $result = places_text($html, "&umfilename=", "&"); $result = "http://trailers.gametrailers.com/gt_fanmovies/um_".$result.".flv"; return ($result); } function get_gofish_url($url) { $id = places_text($url, "gfid=", "&"); $html = file_get_contents("http://www.gofish.com/getGFX.gfp?gfid=".$id); $result = get_attribute($html, "REF", "HREF", 0); return ($result); }; function get_guba_url($url) { $html = file_get_contents($url); $url = places_text($html, "http://free.guba.com/download/mpeg4/", "?"); $result[] = "http://free.guba.com/download/mpeg4/".$url; $url = places_text($html, "http://free.guba.com/download/psp/", "?"); $result[] = "http://free.guba.com/download/psp/".$url; $url = places_text($html, "http://free.guba.com/uploaditem/", "\""); $result[] = "http://free.guba.com/uploaditem/".$url; return ($result); } function get_gyao_url($url) { if ( strpos($url, "http://www.gyao.jp/")===0 ) { $contentsid = places_text($url, "contentsId/", "/"); if( strpos($url, "contents_id/")!==FALSE) $contentsid = places_text($url, "contents_id/", "/"); $rate = places_text($url, "rateId/", "/"); } elseif( strpos($url, "javascript:directScreen(")===0) { $contentsid = places_text($url, "javascript:directScreen('", "'"); $rate = places_text($url, ",'", "'"); } $senddata = "GET /login/judge_cookie/?contentsId=".$contentsid."&rateId=bit0000002&login_from=shityou&chapterNo=&recommend=&contents_id="." HTTP/1.1"."\r\n"; $senddata .= "Host: www.gyao.jp"."\r\n"; $senddata .= "Connection: close"."\r\n"; $senddata .= "Accept-Encoding: gzip"."\r\n"; $senddata .= "Accept: */*"."\r\n"; $senddata .= "Accept-Language: ja"."\r\n"; $senddata .= "\r\n"; $gyaosid = get_http_response("www.gyao.jp", $senddata); $gyaosid = places_text($gyaosid, "GYAOSID=", ";"); //echo "conid".$contentsid."

"; //echo "gyoaid".$gyaosid."

"; $senddata = "GET /sityou/asx.php?contentsId=".$contentsid."&userNo=2007066823&rateId=bit0000002&clipBegin=&clipNo= HTTP/1.1"."\r\n"; $senddata .= "Accept: */*"."\r\n"; $senddata .= "Host: www.gyao.jp"."\r\n"; $senddata .= "Connection: Keep-Alive"."\r\n"; $senddata .= "Cookie: Cookie_UserId="."2007066823"."; GYAOSID=".$gyaosid.";"."\r\n"; $senddata .= "\r\n"; $id = get_http_response("www.gyao.jp", $senddata); $id = places_text($id, "QueryString=rpc_sequence=" ,"\""); $result = "rtsp://wms.cd.gyao.jp/gyaovod01?QueryString=rpc_sequence=".$id; return ($result); } function get_google_video_url($url) { //フルスクリーンだったら if (strpos($url,"http://video.google.com/videopopup?q=")===0) { $result = places_text($url, "docid%3D" ,"&"); $html = file_get_contents("http://video.google.com/videoplay?docid=".$result); }else { $html = file_get_contents($url); } $result[] = urldecode(places_text($html, "?videoUrl\\u003d", "&")); $result[] = urldecode(places_text($html, "googleplayer.swf?videoUrl=", "allowScriptAccess")); $result[] = urldecode(places_text($html, "id=\"macdownloaddiv\"> If the download does not start automatically, right-click If the download does not start automatically, right-click If the download does not start automatically, right-click "); $result = places_text($result,"\"flvplayer.swf?file=","\""); return ($result); } //l function get_livevideo_url($url) { //http://www.livevideo.com/ $html = file_get_contents($url); $result = places_text($html, ""); $result = places_text($result, "href=\"", "\""); $result = places_text($result, "image/", "_"); $result = "http://liveu-29.vo.llnwd.net/livevideo/video/flash8/".$result.".flv"; return ($result); }; function get_lulu_url($url) { $html = file_get_contents($url); $result = get_attribute($html, "param", "value"); $result = places_text($result,"file=","&"); $result = comb("http://www.lulu.tv/",$result); return ($result); }; //m function get_metacafe_url($url) { $id = places_text($url, "watch/", "/"); $xml = file_get_contents("http://www.metacafe.com/fplayer.php?itemID=".$id."&fs=n&t=embedded"); $result = places_text($xml, "", ""); $result = places_text($result, "url=\"", "\""); return ($result); } function DeCrypt($String) { $_loc2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./_"; $_loc6 = "FabricaCommunications.CO.LTD."; $_loc8 = ""; $_loc9 = ( $String[0] ); $String = substr($String, -strlen($String) + 1); $_loc6 = $_loc9.$_loc6; for ($_loc3 = 0; $_loc3 < strlen($String); ++$_loc3) { $_loc4 = ord( $String[ $_loc3 ] ); $_loc1 = strpos($_loc2, $_loc4); if ($_loc1 >= 0) { $_loc7 = strpos($_loc2, ord( $_loc6[ $_loc3 % strlen($_loc6) ] )); $_loc1 = $_loc1 - $_loc7; if ($_loc1 < 0) $_loc1 = $_loc1 + strlen($_loc2); if ($_loc1 >= strlen($_loc2)) $_loc1 = $_loc1 - strlen($_loc2); $_loc4 = ( $_loc2[ $_loc1 ] ); } $_loc8 = $_loc8.$_loc4; } return ($_loc8); } function get_moviecaster_url($url) { if (strpos($url,"http://f.flvmaker.com/")===0) { $result = places_text($url,"?id="); }else { if (strpos($url,"http")===0) { $html = file_get_contents($url); if (strpos($html, "mcj.php?id=")!==FALSE) $result = places_text($html,"mcj.php?id=","\""); else $result = places_text($html,"swf?id=","\""); }else $result = $url; } $result = DeCrypt($result); $result = places_text($result,"swf/"); $result = "http://moviecaster.net/".$result; //広告URLっぽかったら表示させる if (strpos($result,"ad.flv")!==FALSE) echo $result.br(); elseif (strpos($result,"Ad.flv")!==FALSE) echo $result.br(); elseif (strpos($result,"AD.flv")!==FALSE) echo $result.br(); elseif (strpos($result,"aD.flv")!==FALSE) echo $result.br(); return ($result); } function get_myspace_url($url) { //音楽はrtmpプロトコルなので無理 $id = places_text($url,"videoid=", "&"); $first = substr($id, 0, strlen($id)-5); $first = same("0", 7-strlen($first)).$first; $rev = strrev($id); $second = substr($rev, 0, 2); $third = substr($rev, 2, 2); $result = "http://content.movies.cdn.myspace.com/".$first."/".$second."/".$third."/".$id.".flv"; return ($result); }; //n function get_newgrounds_url($url) { if (strpos($url, "http://uploads.ungrounded.net/")===0) { $html = file_get_contents($url); $result = places_text($html,""); $gamename = places_text($gamename,"'","'"); $filenum = places_text($url, "view/"); $filenum = substr($filenum, 0, strlen($filenum)-3)."000"; $result = "http://uploads.ungrounded.net/".$filenum."/".$gamename; } return ($result); } function get_nicovideo_url($url) { $result=""; if (strpos($url, "watch/ut")!==FALSE) { $id = places_text($url, "watch/ut", "&"); $result = get_movie_url("http://www.youtube.com/watch?v=".$id); } elseif (strpos($url, "watch/am")!==FALSE) { $id = places_text($url, "watch/am", "&"); $result = get_ameba_url("http://vision.ameba.jp/watch.do?movie=".$id); } if (strpos($url, "watch?v=ut")!==FALSE) { $id = places_text($url, "watch?v=ut", "&"); $result = get_movie_url("http://www.youtube.com/watch?v=".$id); } elseif (strpos($url, "watch?v=am")!==FALSE) { $id = places_text($url, "watch?v=am", "&"); $result = get_ameba_url("http://vision.ameba.jp/watch.do?movie=".$id); } return ($result); } function get_nifty_url($url) { $result = places_text($url,"video.nifty.com"); $senddata = "GET ".$result." HTTP/1.1"."\r\n"; $senddata .= "Host: video.nifty.com"."\r\n"; $senddata .= "Connection: close"."\r\n"; $senddata .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6; Windows NT 5.1; SV1; .NET CLR 1.1.4334) "."\r\n"; $senddata .= "\r\n"; $html = get_http_response("video.nifty.com", $senddata); $category_id = places_text($html, "category_id=", "&"); $catalog_id = places_text($html, "catalog_id=", "&"); $user_id = places_text($html, "user_id=", "&"); $postdata = "category_id=".$category_id."&catalog_id=".$catalog_id."&user_id=".$user_id; $result = http("http://dl.video.nifty.com/player_conf.pl", "POST", "", $postdata); $result = places_text($result, "flvName=", "&"); return ($result); } //o //p function get_peekvid_url($url) { $html = file_get_contents($url); if (strpos($html,"guba")!==FALSE) { $url = get_attribute($html, "iframe", "src"); $result = get_guba_url($url); } elseif (strpos($html,"youtube")!==FALSE) { $url = get_attribute($html, "embed", "src"); $result = get_youtube_url($url); } return ($result); }; function get_photozou_url($url) { $html = file_get_contents($url); $result = places_text($html, "so.addVariable('url', '", "')", 0); return ($result); }; function get_pornotube_url($url) { $html = file_get_contents($url); $mediaid = trim(places_text($url, "?m=", "&", 0)); $category = places_text($html, ";u=", "\"", 0); $result = "http://video.pornotube.com/".$category."/".$mediaid.".flv"; return ($result); } function get_pya_url($url) { $html = file_get_contents($url); $result = get_attribute($html, "param", "value"); return ($result); } //q //r function get_raguun_url($url) { $id = places_text($url, "viewkey=", "&"); $xml = file_get_contents("http://raguun.jp/config.php?viewkey=".$id); $result = places_text($xml, "", ""); return ($result); }; //s function get_sharkle_url($url) { $html = file_get_contents($url); $id = places_text($html, "&rnd=", "&"); $result = "http://www.sharkle.com/inc/misc/about.php?rnd=".$id."&ssd=ZeleninGalaburda"; return ($result); } function get_soapbox_url($url) { $id = places_text($url, "?vid=", "&"); $result = "http://uuv2.msn.com.edgesuite.net/flash/prod/". substr($id, -2, 2)."/". substr($id, -4, 2)."/". substr($id, -6, 2)."/". $id.".flv"; return ($result); } function get_stage6_url($url) { /* $result = places_text($url,"stage6.divx.com"); $senddata = "GET ".$result." HTTP/1.1"."\r\n"; $senddata .= "Host: stage6.divx.com"."\r\n"; $senddata .= "Connection: close"."\r\n"; $senddata .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6; Windows NT 5.1; SV1; .NET CLR 1.1.4334) "."\r\n"; $senddata .= "\r\n"; $result = get_http_response("stage6.divx.com", $senddata); $result = places_text($result,"",""); $result = places_text($result,"80) { $o = $o.$os; $os=""; } } $o = $o.$os; return ($o); } function get_super_movies_url($url) { $html = file_get_contents($url); $result = places_text($html, "hp_d01(\"", "\");", 1); $result = hp_d01($result); $result = places_text($result, "value=\"", "\""); return ($result); } //t function get_timekiller_url($url) { $result = get_other_url($url); if (strpos($result,"daplayer.swf")!==FALSE) { $result = places_text($result, "videoid="); $result = $result.".flv"; } return ($result); }; function get_totallycrap_url($url) { $result = get_other_url($url); $result = places_text($result, "file=", "&"); $result = comb("http://www.totallycrap.com/",$result); return ($result); } //u function get_uncutvideo_url($url) { $html = file_get_contents($url); $result = places_text($html, "var url = \"", "\";"); return ($result); } //v function get_veoh_url($url) { $id = places_text($url, "videos/", "?"); if (strpos($id,";")!==FALSE) $id = places_text($url, "videos/", ";"); $xml = file_get_contents("http://www.veoh.com/rest/video/".$id."/details"); $result[] = places_text($xml, "fullPreviewHashPath=\"", "\""); $result[] = places_text($xml, "fullPreviewHashLowPath=\"", "\""); return ($result); } function get_videocast_url($url) { $vid = places_text($url, "?vid=", "&"); $postdata = "vid=".$vid."&method=getPlayerVideoData"; $res = http("http://videocast.yahoo.co.jp/rest/", "POST", "", $postdata); $result = places_text($res, "", ""); return ($result); } function get_videocodezone_url($url) { $result = get_other_url($url); $result = get_asx_url($result, 0); return ($result); } function get_volumeone_url($url) { $entry = places_text($url, "entry_id=", "&"); $channel = places_text($url, "channel_id=", "&"); $pageurl = "http://www.volumeone.jp/data/xml/entry_indivi.php?entry=".$entry."&channel=".$channel."&language=en"; $html = file_get_contents($pageurl); $result = places_text($html, "", ""); $result = "http://www.volumeone.jp".$result; return ($result); } function get_vsocial_url($url) { /* $html = file_get_contents($url); $result = get_attribute($html, "embed", "src", 0); $result = places_text($result, "v="); $result = "http://www.vsocial.com/varmedia/vsocial/flv/".$result."_out.flv"; return ($result); */ $id = places_text($url,"?d=","&"); $html = file_get_contents("http://www.vsocial.com/xml/player/template2.php?d=".$id); $result = places_text($html,"",""); return ($result); } //w function get_watchme_url($url) { $id = places_text($url,"mid=","&"); $result = "http://www.watchme.tv/n/b/v/".$id."/movie.flv"; return ($result); } //x //y function get_youtube_url($url) { if (strpos($url,"v=")!==FALSE ) $video_id = places_text($url,"v=","&"); elseif (strpos($url,"youtube.com/v/")!==FALSE) $video_id = places_text($url,"v/","&"); elseif (strpos($url,"youtube.com/verify_age")!==FALSE) $video_id = places_text($url,"v%3D","&"); else $video_id = places_text($url,"video_id=","&"); $senddata = "GET /watch_video?v=".$video_id." HTTP/1.0\r\n"; $senddata .= "Connection: Close\r\n"; $senddata .= "\r\n"; $t = get_http_response("www.youtube.com", $senddata); $t = places_text($t, "&t=", "\n"); $result = "http://www.youtube.com/get_video?video_id=".$video_id."&t=".$t; /* $senddata = "GET "."/get_video?video_id=".$video_id."&t=".$t." HTTP/1.0"."\r\n"; $senddata .= "Connection: Keep-Alive"."\r\n"; $senddata .= "\r\n"; $t = get_http_response("www.youtube.com", $senddata); $result = places_text($t, "Location: ", "\r\n"); */ return ($result); } //z function get_zoome_url($url) { $html = file_get_contents($url); $id = places_text($html,"http://mov.zoome.jp/mov1/diary/","_t"); $result = "http://mov.zoome.jp/mov1/diary/".$id."_m1_1.flv"; return ($result); } //標準 function get_other_url($url) { $html = file_get_contents($url); if (strpos($html, "value=\"http://www.youtube.com/")!==FALSE) { for ($i=0;($id = places_text($html,"value=\"http://www.youtube.com/v/", "\"", $i))!==FALSE;$i++) { $result[] = get_youtube_url("http://youtube.com/watch?v=".$id); } return ($result); }elseif (strpos($html, "src=\"http://video.google.com/googleplayer.swf")!==FALSE) { $result = places_text($html,"src=\"http://video.google.com/googleplayer.swf?videoUrl=", "\""); $result = urldecode($result); return ($result); }elseif (strpos($html, "src=\"http://f.flvmaker.com")!==FALSE) { for ($i=0;($id = places_text($html,"src=\"http://f.flvmaker.com", "\"", $i))!==FALSE;$i++) { $id = places_text($id,"?id="); $result[] = get_moviecaster_url($id); } return ($result); } $result = get_attribute($html, "embed", "src"); if ($result==="") return ""; elseif (strpos($result, "http")===0) return ($result); else { $homeurl = get_attribute($html, "base", "href"); if ($homeurl==="") { $homeurl = get_path($url); } return comb($homeurl,$result); } } //--------------------------------------------------------// //囲まれた文字列を返す。 function places_text($src, $before, $after="", $num=0) { if ($before==="" && $after!=="") return substr($src, 0, strpos($src, $after)); if (strpos($src, $before)===FALSE) return FALSE; $result = $src; for ($i=0;$i<$num+1;$i++) { $result = substr( stristr( $result, $before), strlen($before)); if ($result===FALSE) return FALSE; } if ($after==="" || strpos($result, $after)===FALSE) return $result; else return substr( $result, 0, strpos($result, $after) ); } //html解析 function get_attribute($html, $element, $attribute, $num=0) { $result = places_text($html,"<".$element, ">", $num); $result = places_text($result,$attribute); //http://www.web62.com/videos/mp/fashion/arzu_kaprol_100.html $result = places_text($result,"="); $result = ltrim( $result ); if (strpos($result,"\"")!==FALSE) return places_text($result,"\"","\""); elseif (strpos($result,"'")!==FALSE) return places_text($result,"'","'"); else return ($result); } //asx内のurlを取り出す function get_asx_url($url, $num=0) { $html = file_get_contents($url); return get_attribute($html, "ref", "href", $num); }; //指定回数同じ文字を出力 function same($str, $num) { $result=""; for ($i=0;$i<$num;$i++) $result = $result.$str; return ($result); }; //処理してつなげる function comb($a, $b) { //パスに合わせる if (strpos($b,"./")===0) { $a = substr( $a, strlen("./")); }else while (strpos($b,"../")===0) { $a = substr( $a, 0, -1); $a = substr( $a, 0, strrpos( $a, "/" )+strlen("/")); $b = substr( $b, strlen("../")); } //同じ部分を消してつなげる $len_a = strlen($a); $len_b = strlen($b); //短い方 if ($len_a > $len_b) $length = $len_b; else $length = $len_a; for ($i=0;$i<$length;$i++) { if (substr($a, -$i)===substr($b, 0, $i)) $b = substr($b, $i); } return ($a.$b); } //改行 function br() { echo "

"; } //リンク生成 function make_link($url, $name) { if ( $url!=="" && $name!=="" ) { echo "
".$name.""; br(); } } function make_links($url, $name) { if (is_array($url)) { $size = count($url); for ($i=0;$i<$size;$i++) make_link($url[$i], $name[$i]); }else make_link($url, $name); } //URLパス取得 function get_path($url) { return substr( $url, 0, strrpos( $url, "/" )+strlen("/")); } //ファイル名取得 function get_filename($url) { return substr( $url, strrpos($url,"/")+strlen("/")); } //wwwが付いてたり付いてなかったりで処理を変えない function is_ok($url, $to) { return (strpos(str_replace("www.", "", $url), str_replace("www.", "", $to))===0); } //httpヘッダ取得 function get_http_response($host, $senddata) { $result=""; $fp = fsockopen($host, 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)
\n"; }else { fwrite($fp, $senddata); while (!feof($fp)) $result .= fgets($fp, 128); fclose($fp); } return ($result); } /* $url : http://から始まるURL( http://user:pass@host:port/path?query ) $method : GET, POST, HEADのいずれか(デフォルトはGET) $headers : 任意の追加ヘッダ $post : POSTの時に送信するデータを格納した配列("変数名"=>"値") */ function http($url, $method="GET", $headers="", $post=array("")) { /* URLを分解 */ $URL = parse_url($url); /* クエリー */ if (isset($URL['query'])) { $URL['query'] = "?".$URL['query']; } else { $URL['query'] = ""; } /* デフォルトのポートは80 */ if (!isset($URL['port'])) $URL['port'] = 80; /* リクエストライン */ $request = $method." ".$URL['path'].$URL['query']." HTTP/1.0\r\n"; /* リクエストヘッダ */ $request .= "Host: ".$URL['host']."\r\n"; $request .= "User-Agent: PHP/".phpversion()."\r\n"; /* Basic認証用のヘッダ */ if (isset($URL['user']) && isset($URL['pass'])) { $request .= "Authorization: Basic ".base64_encode($URL['user'].":".$URL['pass'])."\r\n"; } /* 追加ヘッダ */ $request .= $headers; /* POSTの時はヘッダを追加して末尾にURLエンコードしたデータを添付 */ if (strtoupper($method) == "POST") { /* while (list($name, $value) = each($post)) { $POST[] = $name."=".urlencode($value); } $postdata = implode("&", $POST); $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= "Content-Length: ".strlen($postdata)."\r\n"; $request .= "\r\n"; $request .= $postdata; */ $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= "Content-Length: ".strlen($post)."\r\n"; $request .= "\r\n"; $request .= $post; } else { $request .= "\r\n"; } /* WEBサーバへ接続 */ $fp = fsockopen($URL['host'], $URL['port']); /* 接続に失敗した時の処理 */ if (!$fp) { die("ERROR\n"); } /* 要求データ送信 */ fputs($fp, $request); /* 応答データ受信 */ $response = ""; while (!feof($fp)) { $response .= fgets($fp, 4096); } /* 接続を終了 */ fclose($fp); /* ヘッダ部分とボディ部分を分離 */ $DATA = split("\r\n\r\n", $response, 2); /* リクエストヘッダをコメントアウトして出力 */ //echo "\n"; /* レスポンスヘッダをコメントアウトして出力 */ //echo "\n"; /* メッセージボディを出力 */ //echo $DATA[1]; return $DATA[1]; } function fix_url($url) { //文字列整形 if (strpos($url, "ttp")===0) $url = "h".$url; elseif (strpos($url, "tp")===0) $url = "ht".$url; $url = str_replace("http://jbbs.livedoor.jp/bbs/link.cgi?url=", "", $url); $url = str_replace("http://pinktower.com/", "http://", $url); $url = str_replace("http://ime.nu/", "http://", $url); $url = str_replace("http://ime.st/", "http://", $url); $url = str_replace("http://nun.nu/", "http://", $url); return ($url); } //ムービーURL取得 function get_movie_url($url) { if ( is_ok($url, "http://video.google.com/")) return get_google_video_url($url); elseif ( is_ok($url, "http://youtube.com/")) return get_youtube_url($url); elseif ( is_ok($url, "http://www.gyao.jp/") || strpos($url, "javascript:directScreen(")===0) return get_gyao_url($url); elseif ( is_ok($url, "http://nicovideo.jp/")) return get_nicovideo_url($url); elseif ( is_ok($url, "http://vision.ameba.jp/")) return get_ameba_url($url); elseif ( is_ok($url, "http://raguun.jp/")) return get_raguun_url($url); elseif ( is_ok($url, "http://jimaku.in/")) return get_jimaku_in_url($url); elseif ( is_ok($url, "http://video.nifty.com/")) return get_nifty_url($url); elseif ( is_ok($url, "http://stage6.divx.com/")) return get_stage6_url($url); elseif ( is_ok($url, "http://stage6.client.jp/") || is_ok($url, "http://stage6viewer.web.fc2.com/")) return get_stage6_viewer_url($url); elseif ( is_ok($url, "http://eyevio.jp/")) return get_eyevio_url($url); elseif ( is_ok($url, "http://photozou.jp/")) return get_photozou_url($url); elseif (is_ok($url, "http://fileman.n1e.jp/") || is_ok($url, "http://adult.n1e.jp/") || is_ok($url, "http://pet.n1e.jp/")) return get_fileman_url($url); elseif ( is_ok($url, "http://soapbox.msn.com/")) return get_soapbox_url($url); elseif ( is_ok($url, "http://www.pornotube.com/")) return get_pornotube_url($url); elseif ( is_ok($url, "http://uncutvideo.aol.com/")) return get_uncutvideo_url($url); elseif ( is_ok($url, "http://clip.lycos.jp/")) return get_cliplycos_url($url); elseif ( is_ok($url, "http://www.livevideo.com/")) return get_livevideo_url($url); elseif ( is_ok($url, "http://clipcast.jp/")) return get_clipcast_url($url); elseif ( is_ok($url, "http://www.zoome.jp/")) return get_zoome_url($url); elseif ( is_ok($url, "http://videocast.yahoo.co.jp/")) return get_videocast_url($url); elseif ( is_ok($url, "http://cliplife.jp/")) return get_cliplife_url($url); elseif ( is_ok($url, "http://gametrailers.com/")) return get_gametrailers_url($url); elseif ( is_ok($url, "http://www.gamevideos.com/")) return get_gamevideos_url($url); elseif ( is_ok($url, "http://www.ebitv.jp/")) return get_ebitv_url($url); elseif ( is_ok($url, "http://blog.ask.jp/vcaster/") || strpos($url, "castella.audioblog.jp/")!==FALSE) return get_askjp_url($url); elseif ( is_ok($url, "http://www.volumeone.jp/")) return get_volumeone_url($url); elseif ( is_ok($url, "http://www.watchme.tv/")) return get_watchme_url($url); elseif ( is_ok($url, "http://kami-douga.com/")) return get_kami_douga_url($url); elseif ( is_ok($url, "http://super-movies.com/")) return get_super_movies_url($url); elseif ( is_ok($url, "http://www.douga-ch.net/")) return get_douga_ch_url($url); elseif (is_ok($url, "http://moviecaster.net/") || is_ok($url, "http://f.flvmaker.com/")) return get_moviecaster_url($url); elseif (is_ok($url, "http://pya.cc/")) return get_pya_url($url); elseif (is_ok($url, "http://www.gofish.com/")) return get_gofish_url($url); elseif (strpos($url, "peekvid.com/")!==FALSE) return get_peekvid_url($url); elseif (is_ok($url, "http://www.veoh.com/")) return get_veoh_url($url); elseif (is_ok($url, "http://eefoof.com/")) return get_eefoof_url($url); elseif (is_ok($url, "http://grinvi.com/")) return get_grinvi_url($url); elseif ( is_ok($url, "http://ifilm.com/")) return get_ifilm_url($url); elseif ( is_ok($url, "http://sharkle.com/")) return get_sharkle_url($url); elseif ( is_ok($url, "http://www.guba.com/")) return get_guba_url($url); elseif ( strpos($url, "dailymotion.com")!==FALSE ) return get_dailymotion_url($url); elseif ( is_ok($url, "http://newgrounds.com/") || strpos($url, "http://uploads.ungrounded.net/")===0) return get_newgrounds_url($url); elseif ( is_ok($url, "http://videocodezone.com/")) return get_videocodezone_url($url); elseif ( is_ok($url, "http://onlineanime.keiichianimeforever.com/")) return get_keiichianimeforever_url($url); elseif ( is_ok($url, "http://videos.streetfire.net/") || is_ok($url, "http://video.freevideoblog.com/")) return get_streetfire_url($url); elseif ( is_ok($url, "http://grouper.com/") ) return get_grouper_url($url); elseif ( is_ok($url, "http://www.totallycrap.com/") ) return get_totallycrap_url($url); elseif ( is_ok($url, "http://vsocial.com/") ) return get_vsocial_url($url); elseif ( is_ok($url, "http://razoric.com/") ) return get_razoric_url($url); elseif ( is_ok($url, "http://bolt.com/") ) return get_bolt_url($url); elseif ( is_ok($url, "http://devilducky.com/") ) return get_devilducky_url($url); elseif ( is_ok($url, "http://lulu.tv/") ) return get_lulu_url($url); elseif ( is_ok($url, "http://blip.tv/") ) return get_blip_url($url); elseif ( is_ok($url, "http://videos.timekiller.com/") ) return get_timekiller_url($url); elseif ( strpos($url, "castpost.com/")!==FALSE ) return get_castpost_url($url); elseif ( strpos($url, "metacafe.com")!==FALSE) return get_metacafe_url($url); elseif ( is_ok($url, "http://kornerson.com/")) return get_kornerson_url($url); elseif ( strpos($url, "cnet.com/video/")!==FALSE) return get_cnet_url($url); elseif ( strpos($url, "myspace.com/")!==FALSE) return get_myspace_url($url); //対象ページのurlがたくさんあるので elseif (strpos($url,"zboard/zboard.php")!==FALSE) return get_bestyz_url($url); elseif ( strpos($url, "http://")===0 || strpos($url, "https://")===0) return get_other_url($url); } //-------------------------------------------------------- //メイン部分 $url = $HTTP_GET_VARS["senddata"]; echo "senddata:
".$url."

"; if ($url==="") { echo "

"; }else { //url整形 $url = fix_url($url); //ムービーURL取得 $result = get_movie_url($url); //リンク作成 make_links($result,$result); } ?>


2007/4/28:eyevio.jp。なんでこんなに重かったり動画が見れなかったりするんだろう。
2007/4/23:stage6.client.jp及びstage6viewer.web.fc2.com。動画サイトではないがまあ一応
2007/4/18:video.nifty.com。解像度が高くて良いかも
2007/4/12:videocast.yahoo.co.jp(Yahoo!ビデオキャスト)。普通。
2007/4/8:stage6修正。
2007/3/24:clip.lycos.jp。面倒臭い・・・。
2007/3/19(2):ameba vision修正
2007/3/18:uncutvideo.aol.com
2007/3/15(3):gofish.com
2007/3/15(2):metacafe.com作り直し。
2007/3/15:sharkle.com作り直し。
2007/3/14(2):veoh.com作り直し。
2007/3/14:stage6作り直し。
2007/3/9:ameba vision 大人フィルタ。
2007/3/8(2):raguun.jp。なかなか。
2007/3/8:jimaku.in独自サーバ形式。
2007/3/7:livevideo.com。なんとなく。
2007/3/1:jimaku.in。特になし。
2007/2/27:photozou.jp。毒にも薬にもならない。
2007/2/9:ニコニコ動画仕様変更に対応。
2007/2/4:soapbox.msn.com。
2007/1/31(2):gamevideos.com。アドレスを表示してくれる辺り行儀が良い。海外なので重いけど
2007/1/31:zoome.jp
2007/1/24:vsocial修正
2007/1/21(3):gametrailers.com/usermovies.php。まっとうなゲーム系が多いと思いきや・・・
2007/1/21(2):metacafe修正
2007/1/21:ニコニコ動画。youtubeとameba共に機能するはず。
2006/10/21:guba.com修正
2006/8/30(2):guba.comを修正
2006/8/30:cliplife.jp。 発表以降余り取り上げられない所がなんとも
2006/8/23(2):clipcast.jp。特に言う事無し。
2006/8/23:ebitv.jp。ここひょっとして全部落としてから再生始めてるんじゃないだろうか。
2006/8/10:pornotube.com修正。
2006/8/6:stage6.divx.com。普通に右クリックで保存できるけど一応
2006/7/26:なんとなくyoutubeを永遠リンクに。
2006/7/20(2):vision.ameba.jp。クソ早くて好感が持てます。個人的に期待大。
2006/7/20:watchme.tv。既に終わった感が漂ってますががんばって欲しい所です
2006/7/13:veoh.com。落ちてくるのはプレビュー。要リネーム。mpcじゃ画像が出ない
2006/7/10:トニオさん
2006/7/9:pornotube.comに対応(videoのみ)。趣味に合う動画が無くて見てないので動くかどうかは知らない。
2006/7/4:eefoof.comに対応
2006/6/30:daily montionが落とせなくなったのを直した
2006/6/30:http://f.flvmaker.com/からのmoviecasterに対応した
2006/6/27:gyaoが取得できなかったのを直した。
2006/5/14:最近のgoogle videoを落とせるようにした。何で今まで気付かなかったんだろう。
2006/5/13: Peekvid(羅列型)とそれで使ってる guba.comに対応。やたら高解像度で気持ちが悪い…。
2006/5/11(2):履歴を上方向にした。
2006/5/11: volumeoneに対応。動画ページの左下にあるPERMALINKをクリック→COPYを押すとクリップボードに入るURLを入れて下さい。なんでこんな面倒くさい仕様なんだろう。
2006/5/5:コード整理
2006/5/4:gyaoの取得方法を少し変更。直接getasfに突っ込めば動くんじゃないですか。
2006/5/1:youtubeの制限されてる動画に対応 ( こういうの) ワザと空けてるのかたまたま残ってるのかわかりませんがどう見てもセキュリティ穴です
2006/4/29(2):metacafeの仕様変更。
2006/4/29:youtubeの仕様変更。新プレイヤーのURLも可能なはず。一々html取得しなきゃならないのは嫌だなぁ。
2006/4/28: Ask Vキャスターに対応。 ビデオが複数あるページでも 全部取得します どんな暗号が使われてるのかと思ったら。
2006/4/14:googlevideo用コード修正
2006/4/11:myspace.comに対応。なんだあの暗号。
2006/4/3:ムービーキャスターid取得が甘かったので直した。
2006/3/31:コード整理。
2006/3/25(3):コード整理。
2006/3/25(2):ムービーキャスターの動画が埋め込まれてるページに対応。ブログによって動かない事も。
2006/3/25: moviecaster.netに対応。死ぬかと思った。
2006/3/24:google video で落とせないのがあったので対応
2006/3/22(4):totallycrap.comに対応。
2006/3/22(3):更新するのが面倒くさいのでリダイレクト版を停止。
2006/3/22(2):色々対応。 現状
2006/3/22:関数とのやり取りの方式を変更。google videoからmac、ipod、psp用動画取得。
2006/3/17(2):youtubeの仕様が元に戻った模様。神様ありがとう。
2006/3/17:youtubeの仕様変更。それっぽいアドレスにファイルが無いか一つ一つ探っていくという多分間違った作り。めちゃくちゃ重い。解決方法を募集したいところ。
2006/3/15:コード修正した際にファイルマンが取得できなくなってた。ついでに犬猫動画の方にも対応。
2006/3/14:castpost.com、grouper.com、vsocial.comに対応したつもり。ただしgrouper.comから落とせるのはプレビューのみ。登録した後専用ツールを使ってダウンロードするみたい。(怖いので未確認)
2006/3/13:gyaoのgetasf対策の余波を食らった模様。asxへのリンクに変更。NetXferで。
2006/3/11:全体を整理。何もしてない関数を消した。
2006/3/10:videocodezone.com(海外PV)とstreetfire.net(車)に対応してみる。streetfireのリンクはmmsプロトコルなので普通にはDLできない。「Switch to flash player」のアドレスからflvファイルは落とす事が出来る。
2006/3/8:keiichianimeforever.comからyoutubeのアドレス取得。
2006/3/7:sharkle.comの新しいファイルを落とせるように。目分量なんで上手く出来てないかも。
2006/3/6:dailymotion.comのmp4。送った文字列の表示。
2006/3/5:ポップアップ解除が面倒くせえのでgyaoに対応。javascript:directScreen('cnt0011907','bit0000002');とかでもいけます。 NetXferとかで落とした後drm2wmvでも使ってください。
2006/3/2:newgrounds.comの取得方法を勘違いしてたので修正
2006/3/1:youtubeで見れないのでも落とせるようにした。
2006/2/28:metacafe.comに対応。汎用的にそれっぽいアドレスを取得。
2006/2/27:newgrounds.comに対応。友人は一体幾つこういうサイトを知っているのだろう。
2006/2/26:bestyz.com(PV専門サイトっぽい)に対応。友人のリクエスト。取得ファイルはtxtやhtmlやwmのフリをしたwmv。mmsプロトコルの場合はgetasfでも使ってください。ユーザー個別ベージはページフォーマットがバラバラなので対応しません。
2006/2/26:sharkle.comとdailymotion.comに対応。かなりムリヤリ。sharkle.comから取得した動画はFLV Playerだと小さく表示される。謎。
2006/2/25:google videoが動かなくなってたので修正。
2006/2/24:裏ファイルマンに対応。というかみんなエロ好きなんだな……。
2006/2/15:youtubeの個別ページアドレスがまた変わっていた模様。
2006/2/14:google videoのフルスクリーン時のアドレス ( こういうの)に対応
2006/2/11:youtubeのムービーがあるページのURLが変わってたので対応。
2006/2/10:youtubeの こういうアドレスやそれからリダイレクトされる こういうアドレスに対応。
2006/2/6:google videoの時上にflv下にaviへのリンク表示、文字列分割コードが微妙に腐ってたので修正。
2006/2/5:ifilmでflv形式で配布されてるファイルに対応。 こういうの。でもそのままでは再生変換できない? FLV Playerだと再生できる。On2 VP6でエンコされたファイルが再生できるなら可能?
2006/2/4:ifilm及びpya(swfのみ)に対応、コード修正、したらばからのリンクで動作
2006/2/3:grinvi及びファイルマン(swfのみ)に対応、youtubeのアドレスにwwwが含まれてないと動作しなかったのを修正、ttp〜、http://ime.nu/〜、http://ime.st/〜、http://nun.nu/〜で動作
2006/2/2:コード整理、リダイレクト版
2006/2/1:google video及びyoutubeのダウンロードに対応、公開