Skip to content

Instantly share code, notes, and snippets.

@deejayy
Last active August 29, 2015 13:56
Show Gist options
  • Save deejayy/9088440 to your computer and use it in GitHub Desktop.
Save deejayy/9088440 to your computer and use it in GitHub Desktop.
<?php
if($_SERVER['REMOTE_ADDR'] == 'IP cimed') {
$sql = mysql_connect("IP", "Felhasználónév", "Jelszó");/
mysql_select_db('account');
if (!$sql) {
echo "Kapcsolat hiba!";
} else {
$mysql_query = mysql_query("SELECT login, email from account", $sql);
while($email = mysql_fetch_assoc($mysql_query)) {
$message = sprintf("<p>Hi, %s!</p>\r\n<p>Welcome To MT2SRV.HU</p>", $email['login']);
mail($email['email'], "MT2SRV.HU Üdvözöllek", $message, "From: noreply@mt2srv.hu\r\nContent-type: text/html\r\n");
}
}
} else {
echo "Nem férhetsz hozzá az oldalhoz!";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment