Email at Registration [i will pay]
#1

who will help me to make at registration to request email in a box i will pay him with euro in paypal.com
Reply
#2

U do need php and a mailserver for this. Do you have those
Reply
#3

Also, mysql is requirend since otherwise php is unudable
Reply
#4

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
Reply
#5

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.
Reply
#6

Quote:
Originally Posted by CaTaLinU
View Post
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
Reply
#7

ok
but i dont know how to make a conexion between server & site...
Reply
#8

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.
Reply
#9

http://*******/A8NWqX
Reply
#10

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
Reply
#11

Didn't I write up a whole mini email system for you last night? What was wrong with that?
Reply
#12

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...
Reply
#13

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)