27.01.2012, 10:52
who will help me to make at registration to request email in a box i will pay him with euro in paypal.com
format(string, sizeof(string), "passkey=some_secret_password_that_nobody_can_guess_that_isnt_your_bank_account_password&email=%s&name=%s&key=%s", inputtext, pName[playerid], randkey);
HTTP(0, HTTP_POST , "www.mywebsitesite.com/email_verification.php", string, "MyHttpResponse");
<?php
if($_POST['passkey'] != 'some_secret_password_that_nobody_can_guess_that_isnt_your_bank_account_password') die();
$name = $_POST['name'];
$key = $_POST['key'];
$email = $_POST['email'];
$string = "Hello, $name.<br/><br/>This e-mail was sent to this address as it was provided during registration of an account on the SA:MP server '*****'.<br/>If you do not have a ***** account, please reply to support@*****.net.<br/><br/>If this is your account, please join the server and enter the following code when prompted:<br/><br/><b>$key</b><br/><br/>You will then be able to register.<br/><br/>The ***** Support Team";
$strHeaders = "MIME-Version: 1.0\r\n";
$strHeaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
$strHeaders .= "From: support@*****.net";
mail($email, '*****- E-mail Verification' , $string, $strHeaders);
?>
new randchar[][] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
new randkey[10];
format(randkey, sizeof(randkey), "%s%s%s%s-%i%i%i%i", randchar[random(sizeof(randchar))], randchar[random(sizeof(randchar))], randchar[random(sizeof(randchar))], randchar[random(sizeof(randchar))], random(10), random(10), random(10), random(10));
#define DIALOG_EMAIL 400
//whenever you want to show him the e-mail dialog
ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,"EMail","Enter your Email below","Ok","Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_EMAIL:
{
new Nameh[MAX_PLAYER_NAME];
new Filenameh[200];
GetPlayerName(playerid,Nameh,sizeof(Nameh));
format(Filenameh,sizeof(Filenameh),"Users/%s.ini",Nameh);
new INI:iniFile = INI_Open(Filenameh);
INI_SetTag(iniFile, "Data");
INI_WriteString(iniFile, "Email", inputtext);
INI_Close(iniFile);
return 0;
}
}
}