PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1847
Number of posts: 5013

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: variable http referrers $http_referrer = getenv( "HTTP_REFERER" Posted by Jonathan on 22 Jul 2003 at 10:03 AM
: 1. Thanks
: 2. Could you write all my script, because I don't know where and how
: add your code [$ip = getenv ("REMOTE_ADDR");]??
Sure, but what is that $whosentyou variable? Don't see where that's coming from..

<? 
$email = $_REQUEST['email']; 
$message = $_REQUEST['message'];
$ip = getenv("REMOTE_ADDR");
if (!isset($_REQUEST['email'])) { 
header( "Location: http://www.test.gr/members/sendmail.html" ); 
} 
elseif (empty($email) || empty($whosentyou)) { 
?> 

<html> 
<head><title>&#931;&#966;&#940;&#955;&#956;&#945;</title></head> 
<body> 
<center><h1>&#931;&#966;&#940;&#955;&#956;&#945;</h1></center> 
<p><center> 
&#927;&#965;&#959;&#965;&#960;&#962;, &#958;&#949;&#967;&#940;&#963;&#945;&#964;&#949; &#957;&#945; &#963;&#965;&#956;&#960;&#955;&#951;&#961;&#974;&#963;&#949;&#964;&#949; &#949;&#943;&#964;&#949; &#964;&#951;&#957; email address &#963;&#945;&#962; &#949;&#943;&#964;&#949; &#954;&#940;&#960;&#959;&#953;&#959; &#940;&#955;&#955;&#959; 
&#960;&#949;&#948;&#943;&#959;. <br> 
&#928;&#945;&#961;&#945;&#954;&#945;&#955;&#959;&#973;&#956;&#949; &#960;&#945;&#964;&#942;&#963;&#964;&#949; &#964;&#959; &#960;&#955;&#942;&#954;&#964;&#961;&#959; BACK &#964;&#959;&#965; &#960;&#961;&#959;&#947;&#961;&#940;&#956;&#956;&#945;&#964;&#959;&#962; &#960;&#949;&#961;&#953;&#942;&#947;&#951;&#963;&#951;&#962; <br>&#954;&#945;&#953; 
&#948;&#959;&#954;&#953;&#956;&#940;&#963;&#964;&#949; &#958;&#945;&#957;&#940;. 
</center></p> 
</body> 
</html> 

<? 
} 
else { 
mail( "webmaster@test.gr", "&#913;&#943;&#964;&#951;&#963;&#951; &#947;&#953;&#945; &#960;&#961;&#972;&#963;&#946;&#945;&#963;&#951; &#963;&#964;&#951; &#963;&#949;&#955;&#943;&#948;&#945; &#964;&#951;&#962; &#957;&#959;&#956;&#959;&#952;&#949;&#963;&#943;&#945;&#962;", 
"$message\n&#913;&#960;&#972; &#960;&#959;&#973; &#960;&#955;&#951;&#961;&#959;&#966;&#959;&#961;&#951;&#952;&#942;&#954;&#945;&#964;&#949; &#947;&#953;&#945; &#964;&#959; &#963;&#953;&#964;&#941; &#956;&#945;&#962;? $whosentyou\n\n&#913;&#960;&#972; &#960;&#959;&#973; &#948;&#949;&#957; 
&#960;&#955;&#951;&#961;&#959;&#966;&#959;&#961;&#951;&#952;&#942;&#954;&#945;&#964;&#949; &#947;&#953;&#945; &#964;&#959; &#963;&#953;&#964;&#941; &#956;&#945;&#962;? $whodontsentyou\nIP Address: $ip\n", 
"From: $name <$email>" ); 
header( "Location: http://www.test.gr/eyxaristoume.htm" ); 
} 
?> 

You need to put $ip somewhere in the email as you want it.  BTW, PHP isn't really my thing, I'm a Perl programmer who can do some simple PHP stuff because of the similarities, so while I'm pretty sure what I've done there is OK, no promises.  

Hope this helps,

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.