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...
Quote:
<?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';
?>
|