/*
About
-----
This directory contains extra files to make the 'fancy urls' feature even more
fancier, by eliminating the 'index.php'-part of the URL
Installation
------------
1. Copy all files in this directory (except for index.html) to your main nucleus dir
(where your index.php and action.php file are)
If you have an already existing .htaccess file (most ftp-programs don't show hidden files
by default, so don't start uploading it without checking your server). If you do, download
that old one first, and copy the contents of the new .htaccess file (from the fancyurls
folder) in your old one, and upload that...
2. Edit this file so that $CONF['Self'] points to your main directory.
NOTE: this time, and only this time, the URL should NOT end in a slash
3. Also edit the $CONF['Self'] variable in your index.php, if you don't want to
end up with index.php/item/1234 urls when people come via that way
4. Enable 'Fancy URLs' in the Nucleus admin area (nucleus management / edit settings)
5. Off you go!
If it doesn't work:
-------------------
Remove the files again (don't forget the hidden file .htaccess). Voila.
*/
// remember: this URL should _NOT_ end with a slash.
$CONF['Self'] = 'http://www.momoso-net.com/~ms08';
?>
内容はとても簡単で、表示したい携帯専用サイトをCGIに教え、CGIがDoCoMoに偽装して当該サイトからHTMLを読み込み起動しているブラウザに返す。
で!どんなことをするかというと
001 $buffer = $ENV{'QUERY_STRING'};
002 ($arg1,$arg2,$arg3) = split( /&/ , $buffer);
003 if(length($arg1) == 0) {
004 $arg1 = "https://www.momoso-net.com";
005 }
006 if(length($arg2) == 0) {
007 $arg2 = "";
008 }
009 if(length($arg3) == 0) {
010 $arg3 = "";
011 }
012 $command = "curl -A DoCoMo/1.0/SO506iC/c20/TB/W30H16 -s $arg1"; <- SO506iCに偽装
013 @result = `$command`;
014 push @html, @result;
015
016 print "Content-type: text/html\n\n";
017 foreach ( @html ) {
018 chomp;
019 $_ =~ s/<object/<a/g;
020 $_ =~ s/data/href/g;
021 $_ =~ s/ type="video\/3gpp">/>PC Link/g;
022 $_ =~ s/<\/object>/<\/a>-File Name:/g;
023 print $_;
024 }
025
てなコードを書けばいいのでしょう。
ちなみに019行〜022行は携帯で見るために書かれた3gp動画のオブジェクト記述にちょっと手を加えてPCからクリックしてダウンロードできるようにした。
FOMAで撮影した動画なんかこれですね?????
ちなみにPSPでも見れるかもしれません。
くれぐれも怪しいことには使わないほうがぶなんです。