Email at Registration [i will pay] -
CaTaLinU - 27.01.2012
who will help me to make at registration to request email in a box i will pay him with euro in paypal.com
Re: Email at Registration [i will pay] -
milanosie - 27.01.2012
U do need php and a mailserver for this. Do you have those
Re: Email at Registration [i will pay] -
milanosie - 27.01.2012
Also, mysql is requirend since otherwise php is unudable
Re: Email at Registration [i will pay] -
CaTaLinU - 27.01.2012
i dont want the php part
just when youll enter on server
if that player is not registered
he will need to set his email
or if he is reigstere an d pMail=0 to be forced to complete that
an to be saved in %s.ini
Re: Email at Registration [i will pay] -
MP2 - 27.01.2012
I made a system that sends a verification key to the email that hey put input to complete registration. It's not the best though.
Re: Email at Registration [i will pay] -
milanosie - 27.01.2012
Quote:
Originally Posted by CaTaLinU
i dont want the php part
just when youll enter on server
if that player is not registered
he will need to set his email
or if he is reigstere an d pMail=0 to be forced to complete that
an to be saved in %s.ini
|
Well u cant just send an email from a non existing adress, u WILL need php and a mailserver +mysql or it will be EXTREMLY buggy, hard to make, and just not good
Re: Email at Registration [i will pay] -
CaTaLinU - 27.01.2012
ok
but i dont know how to make a conexion between server & site...
Re: Email at Registration [i will pay] -
MP2 - 27.01.2012
I used the HTTP() function with POST data and a .php file on my website:
pawn Code:
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");
The 'passkey' is just so nobody can go to the file in their web browser and send fake e-mails to players. It should be strange and secure, like 'a3re97bas54AG' or something. Not guessable.
Obviously you need to format the string with the relevant data, and this is the .php file:
PHP Code:
<?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);
?>
And I stored the 'randkey' in mySQL.
I used this to generate random keys:
pawn Code:
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));
Granted there will be better, more efficient ways of doing this.
Re: Email at Registration [i will pay] -
milanosie - 27.01.2012
http://*******/A8NWqX
Re: Email at Registration [i will pay] -
CaTaLinU - 27.01.2012
we are going to make off
i want just to request email on register and to work the email with yahoo.com & yahoo.ro & gmail.com
i dont care if the email is not good
i want after they write the email there to be stocked in Users/%s.ini
Re: Email at Registration [i will pay] -
Abreezy - 27.01.2012
Didn't I write up a whole mini email system for you last night? What was wrong with that?
Re: Email at Registration [i will pay] -
henry jiggy - 27.01.2012
Oh, then all you need is:
pawn Code:
#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;
}
}
}
You will need Y_INI installed. Should work. all you need to do is adapt and idendate.
And i dont want your money just give it to the guy who wrote the mini email system for you...
Re: Email at Registration [i will pay] -
Десерт - 02.02.2012
Sorry for my bad English, but how to make the registration code is sent by mail, and then enter the code in the dialog box