PDA

View Full Version : Masking IP in TXT MESSAGE


iogames
01-15-2008, 12:09 AM
I have a question:

I want to 'mask' the email address that the script sends every time that an user send a SMS to a cell phone, you can test it here: www.iogames.com/sms/ send yourself a TEXT MESSAGE [for free ;)] and you will receive a 'FROM' iogames@host195.hosmonster.com I want to change it to something more aesthetic as IOGAMES.com...

<?PHP
session_start ();
session_register ('sessioncode');
echo '
';
include 'config.php';
echo '
';
include 'header.php';
echo '
';
if (strtoupper ($code) == substr (strtoupper (md5 ('Mytext' . $sessioncode)), 0, 6))
{
}
else
{
echo 'Invalid Code!<br>
Please click <a href="http://www.iogames.com/sms/index.php">here</a> to go back.
';
include 'footer.php';
exit ();
}

echo '
';
$day = date ('mdy');
$ip = gethostbyname ($REMOTE_ADDR);
$checkuses = mysql_num_rows (mysql_query ('' . 'select * from users where ip=\'' . $ip . '\' and day=\'' . $day . '\''));
if ($alloweduses <= $checkuses)
{
echo 'Sorry, you have used all of your free messages for today. Come back tomorrow.';
exit ();
}
else
{
$query = '' . 'INSERT INTO users VALUES (\'' . $ip . '\',\'' . $number . '\',\'' . $day . '\')';
if (!($result = mysql_query ($query)))
{
exit ('Unable to Add IP Entry');
;
}
}

echo '
';
$sql = '' . 'SELECT * FROM carriers WHERE id = \'' . $carrier . '\'';
$result = mysql_query ($sql);
$row = mysql_fetch_array ($result);
$email = $row['email'];
$to = $number . $email;
$headers = 'MIME-Version: 1.0
' . 'Content-type: text/html; charset=iso-8859-1
' . 'From: "' . $from . '"
' . 'To: "Client" <' . $to . '>
' . 'Date: ' . date ('r') . '
' . 'Subject: ' . $subject . '
';
mail ($to, $subject, $message, $headers);
echo '
';
echo 'Message sent!<br><br>';
echo 'TO: ' . $to . '<br>';
echo 'FROM: ' . $from . '<br>';
echo 'SUBJECT: ' . $subject . '<br>';
echo 'MESSAGE: ' . $message . '<br><br>';
echo 'HEADERS: ' . $headers . '<br><br>';
echo 'Click <a href="http://www.iogames.com/sms/index.php">here</a> to go back and send another message.';
echo '
';

include 'footer.php';
?>

Dismounted
01-15-2008, 07:55 AM
You don't specify any $from variable.

iogames
01-15-2008, 09:34 PM
You don't specify any $from variable.

Can you give me a sample? this is the send.php file so everything that happens here is related to the transfer information...

Dismounted
01-16-2008, 04:03 AM
This is really simple actually. If you look at that code, you can see where things are added to variables (things prefixed with a dollar sign). You can also see where they are "called". You can see that "$from" is called, but the $from variable doesn't have anything in it.

Find:
$to = $number . $email;

Add Below:
$from = 'your@email.com';

iogames
01-16-2008, 05:55 PM
Well it wasn't like that :(

$from referrers to the email that the user enters in the 'Your E-Mail' field...
Try to send you a text message yourself...

--------------- Added 1200521003 at 1200521003 ---------------

You don't specify any $from variable.

Ooops sorry! it was the IP that I want to mask/disguise :(