GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need a script made quick - should be easy (https://gfy.com/showthread.php?t=196753)

Mr Pheer 11-12-2003 07:40 PM

Need a script made quick - should be easy
 
I prefer it done in PHP but perl would work I suppose, just a redirect script.... contact me on AIM screen name MrPheer for more details

kad 11-12-2003 07:41 PM

g0t msn?

some_idiot 11-12-2003 07:47 PM

How many of you guys are going to ask for this today???
You gotta learn to do a quick search or pick up a basic CGI
book. ...Here is perl.

Without logging:

#!/usr/bin/perl

$URL = $ENV{QUERY_STRING};
print "Location: $URL\n\n";


With logging:

#!/usr/bin/perl

$URL = $ENV{QUERY_STRING};
open (LOG,'>>/usr/local/www/cgi-bin/reflog.txt');
print LOG "$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'} -> $URL\n";
close (LOG);
print "Location: $URL\n\n";

If you've got a wacky client (browser) you may have to send the header.

Mr Pheer 11-12-2003 07:51 PM

Quote:

Originally posted by some_idiot
How many of you guys are going to ask for this today???
You gotta learn to do a quick search or pick up a basic CGI
book. ...Here is perl.

Without logging:

#!/usr/bin/perl

$URL = $ENV{QUERY_STRING};
print "Location: $URL\n\n";


With logging:

#!/usr/bin/perl

$URL = $ENV{QUERY_STRING};
open (LOG,'>>/usr/local/www/cgi-bin/reflog.txt');
print LOG "$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'} -> $URL\n";
close (LOG);
print "Location: $URL\n\n";

If you've got a wacky client (browser) you may have to send the header.

well that would be nice if i only wanted to redirect to one URL

some_idiot 11-12-2003 07:53 PM

Quote:

Originally posted by MrPheer


well that would be nice if i only wanted to redirect to one URL

Buy that basic CGI book...

$URL = $ENV{QUERY_STRING};

In your webpage call as:

http://yourhost.com/cgi-bin/redirect.pl?http://newurl

Mr Pheer 11-12-2003 07:53 PM

nitr01972 on AIM hooked me up... thanks dude!!

Evil1 11-12-2003 07:56 PM

Quote:

Originally posted by MrPheer
nitr01972 on AIM hooked me up... thanks dude!!
No prob, $25 for a couple lines of code, who was the asshole?

hudson 11-12-2003 07:58 PM

Quote:

Originally posted by MrPheer


well that would be nice if i only wanted to redirect to one URL

its the same thing if you want to redirect to many or randomize, etc


All times are GMT -7. The time now is 08:13 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123