Download Horizon :: Staff Members :: Save Vault :: XboxMB YouTube


Old 04-12-2011   #1 (permalink)
Regular Member
Jael's Avatar
Join Date: Sep 2010
Location: 06Webs - Sir Bansalot
Posts: 1,247
Thanks: 261
Default Ip address code and recording ip

ok, i have a php page where i can send emails from, and send many emails in one hit. problem is, it can be a tool and it can be a hack, for lack of a better word. so basicly i have said dont be a indiot basicly and that this script MAY record your ip IF you agree. so i want to be able to record the ip address and maybe a a shotrt log eg clicked send button to Name@domain.com or even just record ips IF the clicked send and the value of a particular input. eg

number of emails sent : 2

Log:

ip: xxx.xxx.xxx.xxx value sent: 2

emailer: http://murq.net/emailer.php

line for Numbers of email sent:
PHP Code:
$amount $_POST['amount']; 
input box code:
PHP Code:
Number of Emails-:<input type='text' name='amount'><br><br
thanks
__________________




Twitter
•••••••••••••••••••••••••••••••••••••••••••••••••
Jael is offline Send a message via ICQ to Jael Send a message via AIM to Jael
Reply With Quote


Old 04-12-2011   #2 (permalink)

Austin's Avatar
Web Developer
Join Date: Dec 2010
Location: Washington
Posts: 1,672
Thanks: 2,764
Default Re: Ip address code and recording ip

PHP Code:
$ip $_SERVER['REMOTE_ADDR'];
$log 'log.txt' //this can be whatever location you'd like the log to show up.
$write fopen($log'a+'); //you can mess around with the modes, a+ starts at the end of a document.
fwrite($write,'IP: '.$ip.' ; Amount Sent: '.$amount."\n");
fclose($write); 
put this after your while statement. Assuming that $amount is the variable for the amount sent.

Last edited by Austin; 04-12-2011 at 09:35 AM.
Austin is offline
Reply With Quote
The following users thanked this post: Gyarados, Jael, Tracti0nz


Old 04-12-2011   #3 (permalink)
Regular Member
 
Join Date: Nov 2010
Posts: 171
Thanks: 76
Default Re: Ip address code and recording ip

Uh... I hope I'm not the only one who thinks you made absolutely no sense at all.. you need help? or are you just stating things you can do...
zy0n is offline
Reply With Quote




Old 04-12-2011   #4 (permalink)

Austin's Avatar
Web Developer
Join Date: Dec 2010
Location: Washington
Posts: 1,672
Thanks: 2,764
Default Re: Ip address code and recording ip

Quote:
Originally Posted by zy0n View Post
Uh... I hope I'm not the only one who thinks you made absolutely no sense at all.. you need help? or are you just stating things you can do...
Lol, he want's to log IP addresses after they use his emailer.
Austin is offline
Reply With Quote
The following user thanked this post: Jael


Old 04-13-2011   #5 (permalink)
Regular Member
Jael's Avatar
Join Date: Sep 2010
Location: 06Webs - Sir Bansalot
Posts: 1,247
Thanks: 261
Default Re: Ip address code and recording ip

Quote:
Originally Posted by xAB View Post
Lol, he want's to log IP addresses after they use his emailer.
thats exactly it. xAB has been stalking me trying to throw advice at me for days nah he has been a great help, i noticed u said emailer instead of bomber

getting:
Parse error: syntax error, unexpected T_VARIABLE in public_html/bomber.php on line 39

working through it now.
__________________




Twitter
•••••••••••••••••••••••••••••••••••••••••••••••••
Jael is offline Send a message via ICQ to Jael Send a message via AIM to Jael
Reply With Quote


Old 04-13-2011   #6 (permalink)

Austin's Avatar
Web Developer
Join Date: Dec 2010
Location: Washington
Posts: 1,672
Thanks: 2,764
Default Re: Ip address code and recording ip

Paste line 39.
Austin is offline
Reply With Quote


Old 04-14-2011   #7 (permalink)
Regular Member
Jael's Avatar
Join Date: Sep 2010
Location: 06Webs - Sir Bansalot
Posts: 1,247
Thanks: 261
Default Re: Ip address code and recording ip

i gave up couldnt fix it.
__________________




Twitter
•••••••••••••••••••••••••••••••••••••••••••••••••
Jael is offline Send a message via ICQ to Jael Send a message via AIM to Jael
Reply With Quote


Old 04-14-2011   #8 (permalink)

Austin's Avatar
Web Developer
Join Date: Dec 2010
Location: Washington
Posts: 1,672
Thanks: 2,764
Default Re: Ip address code and recording ip

Paste line 39 in your file. it's a syntax error, meaning you misplaced a curly bracket or something.
Austin is offline
Reply With Quote


Old 04-14-2011   #9 (permalink)
Regular Member
Jael's Avatar
Join Date: Sep 2010
Location: 06Webs - Sir Bansalot
Posts: 1,247
Thanks: 261
Default Re: Ip address code and recording ip

doesnt seem to work

Its not line 22:
Quote:
Parse error: syntax error, unexpected T_VARIABLE in /public_html/bomber.php on line 22
Quote:
<?php
$amount = $_POST['amount'];
$Subject = $_POST['Subject'];
$message = $_POST['message'];
$email = strtolower($_POST['email']);

if(isset($_POST['hack'])){

switch ($email){

case 'joel@thecaseys.id.au';
case 'admin@murq.net';

die('This email is flagged by admin, You CANNOT send emails to this address with this client.');

break;

default:
while($hack <= $amount){
$ip = $_SERVER['REMOTE_ADDR'];
$log = 'ip_log.txt'
$write = fopen($log, 'a+'); //you can mess around with the modes, a+ starts at the end of a document.
fwrite($write,'IP: '.$ip.' ; Amount Sent: '.$amount."\n");
fclose($write);
mail($email,"$Subject","$message", "From: " ."". $user. "<" . $email . ">\n");
echo "Sent +1,ฉ Copyright MurQ Net – Written by Admin, Use this at your own risk (Each line is One message sent).<br>";
$hack++;
}
}
}
}
?>
<?php
echo "Your IP Adress: " . getRealIpAddr() . "";
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
$ip=$_SERVER['HTTP_CLIENT_IP'];
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
else
$ip=$_SERVER['REMOTE_ADDR'];
return $ip;
}
?>
<form method='post'>
Email-------------:<input type='text' name='email'><br><br>
Number of Emails-:<input type='text' name='amount'><br><br>
Subject-----------:<input type='text' name='Subject'><br><br>
Message :---------:<input type='text' name='message'><br><br>
Disclaimer: By clicking Send you agree to the terms and conditions<br><input type='submit' name='hack' value='Send'><br><br>


Terms and Conditions:<br><br>Do not use this to spam, use this to email when you dont have access to your email<br>MurQ Net is not responsable for what you use this for<br>
It is Illegal to 'Spam' in some countries, Beware<br>
<br><br><br>
Instructions<br><br>
Enter your recipients email in the 'Email' feild<br>
Number of emails is the amount of times to send the email<br>
Subject is the subject of the email<br>
Message is the Message or email sent to the recipient<br><br><br>
ฉ Copyright MurQ Net – Written by Admin

</form>
<? ?>
contents of text:
Quote:
$write = fopen($log, 'a+');
Also tried:
Quote:
$write = fopen($log, 'a+')
txt file name:
Quote:
ip_log.txt
__________________




Twitter
•••••••••••••••••••••••••••••••••••••••••••••••••

Last edited by Jael; 04-14-2011 at 04:56 AM.
Jael is offline Send a message via ICQ to Jael Send a message via AIM to Jael
Reply With Quote


Old 04-14-2011   #10 (permalink)

Austin's Avatar
Web Developer
Join Date: Dec 2010
Location: Washington
Posts: 1,672
Thanks: 2,764
Default Re: Ip address code and recording ip

PHP Code:
while($hack <= $amount){ 
$ip $_SERVER['REMOTE_ADDR'];
$log 'ip_log.txt'//<------forgot a semi colon.
$write fopen($log'a+'); //you can mess around with the modes, a+ starts at the end of a document.
fwrite($write,'IP: '.$ip.' ; Amount Sent: '.$amount."\n");
fclose($write); 
mail($email,"$Subject","$message""From: " .""$user"<" $email ">\n");  
echo 
"Sent +1,ฉ Copyright MurQ Net – Written  by Admin, Use this at your own risk (Each line is One message sent).<br>";  
$hack++;  
}
}
}
}  
// remove this closing brace. 
Those are my fault, sorry i didn't catch them the first time.

Last edited by Austin; 04-14-2011 at 05:04 AM.
Austin is offline
Reply With Quote

Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:23 PM.


 

Powered by vBulletinฎ Copyright ฉ2000 - 2010, Jelsoft Enterprises Ltd.
COPYRIGHT (c) 2010 - 2013 - XboxMB - DESIGN BY:
EDENWEBS.COM