Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Created January 9, 2016 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameswhite/aeb09f55ad6467cc6c90 to your computer and use it in GitHub Desktop.
Save jameswhite/aeb09f55ad6467cc6c90 to your computer and use it in GitHub Desktop.
#!/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