Last active
August 29, 2015 13:56
-
-
Save deejayy/9088440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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: [email protected]\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