Skip to content

Instantly share code, notes, and snippets.

@jameswhite jameswhite/env.cgi
Created Jan 9, 2016

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.