29.03.2019, 13:20
Quote:
Might be something wrong within the code though...
Show us the php file where you handle this request. |
PHP Code:
<?php
if(isset($_GET['code'])) { //checks if request from SA:MP server contains code
$code = $_GET['code'];//Redefine just to look better :)
if($code == 44514) { // Compare code from SA:MP request, a.k.a password to avoid spam or unauthorized requests
if(isset($_GET['Message']) && !empty($_GET['Message'])) { //Checks if request from SA:MP server contains messag you want to send
//EmailTo[],Message[]
$emailto = $_GET['EmailTo'];
$message = $_GET['Message']; //Redefine just to look better :)
$message = str_replace("-"," ",$message); //Replace all - back to blank space as url cant contains blank spaces
mail($emailto, "Securitate cont / Account security", $message, "From: \"saveG.ro - Securitate cont / Account security\" <support@saveg.ro>\r\n" ."X-Mailer: PHP/" . phpversion());//Send an email, format: To,Subject,Message,From
echo "Email delivered"; //Response message to SA:MP server, so server knows request was valid
}
}
}
?>