Created
January 9, 2016 01:59
-
-
Save jameswhite/aeb09f55ad6467cc6c90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use CGI; | |
use Data::Dumper; | |
my $query=new CGI; | |
my $url = $query->param('url'); | |
# print "Content-type: text/html\n\n"; | |
if( $url =~ m/imdb.com\/title\/tt([0-9]+)/){ | |
print $query->redirect("https://nzbs.in/movies?res=1&lang=EN&imdb=$1"); | |
}elsif( $url =~ m/nzbs.in\/.*imdb=([0-9]+)/){ | |
print $query->redirect("http://www.imdb.com/title/tt$1"); | |
}else{ | |
print "Content-type: text/plain\n\n"; | |
print Data::Dumper->Dump([$query]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment