Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-06-12, 02:24 PM   #1
flashingfrank
Internet! Is that thing still around?
 
Join Date: Apr 2005
Posts: 3
php hitbot detection

i have a little php problem.

i just put some hitbot detection script on my tgp, but i cant get it to work right.

i inserted a couple of links on my index page with the following code:

PHP Code:
<a href="http://domain.com/a/go.php?from=<? echo $_SERVER['HTTP_REFERER']; ?>
class="proxy">free anal movies</a>
the link leads to go.php that has the following code:
PHP Code:
<? 
mail
("proxy@domain.com""Hitbot:""From: $from\r\n"); 
?>
the variable is passed on to the go.php file, and the sending of the email is working fine, but the referer variable is not inserted in the mail.

anyone knows why it does not work?
flashingfrank is offline   Reply With Quote
Old 2006-06-13, 03:17 AM   #2
matt
Trying is the first step towards failure
 
Join Date: Apr 2003
Location: Australia
Posts: 123
Send a message via ICQ to matt
A couple of things i noticed at a glance...

Maybe this:

<? echo $_SERVER['HTTP_REFERER']; ?>

Should be

<? echo urlencode($_SERVER['HTTP_REFERER']); ?>


Or possibly this:

mail("proxy@domain.com", "Hitbot:", "From: $from\r\n");

should be

mail("proxy@domain.com", "Hitbot:", "From: " . $_GET['from'] . "\r\n");


How do you know the variable is being passed to the go.php file?
__________________
Link List Land - Linklist Creation, Design and Implementation.
matt is offline   Reply With Quote
Old 2006-06-13, 05:37 AM   #3
kaktusan
Shut up brain, or I'll stab you with a Q-tip!
 
kaktusan's Avatar
 
Join Date: May 2004
Location: Bulgaria
Posts: 113
Send a message via ICQ to kaktusan Send a message via AIM to kaktusan
as matt said:
only the mail("proxy@domain.com", "Hitbot:", "From: " . $_GET['from'] . "\r\n");

should fix the problem i think, if your server does not support register_globals in the php, otherwise it should work fine..
__________________
kaktusan is offline   Reply With Quote
Old 2006-06-13, 07:30 AM   #4
flashingfrank
Internet! Is that thing still around?
 
Join Date: Apr 2005
Posts: 3
thanks guys!
i changed the mail code and it works fine now
flashingfrank is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:07 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc