Did you include those two $_GET statements before that?antmar904 wrote:the i frame was working but when i put in iframe attributes (width/height) its giving me a : Unknown player: $player ERROR
autmated login
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
Re: autmated login
yes i did here is what i have:
Code: Select all
<?php
$player = $_GET["LoginName"];
$key = $_GET["SessionKey"];
echo('<iframe src="http://184.82.171.17:80?LoginName=$player&SessionKey=$key" width="1200" height="700"></iframe>');
?>
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
I see what's happening. You reversed the quotes so that the whole echo string was in single quotes instead of double quotes. When PHP sees a $var inside single quotes, it treats that as a literal and leaves it as-is. When it sees a $var inside double quotes, it replaces that with the actual value. So replace those two outer single quote marks with doubles and all the inner doubles with singles. Also you can drop the :80 port number since 80 is the default port for http.antmar904 wrote:yes i did here is what i have:
Code: Select all
echo('<iframe src="http://184.82.171.17:80?LoginName=$player&SessionKey=$key" width="1200" height="700"></iframe>');
Code: Select all
echo("<iframe src='http://184.82.171.17?LoginName=$player&SessionKey=$key' width='1200' height='700'></iframe>");
Code: Select all
echo("<iframe src='http://184.82.171.17?LoginName=" . $player . "&SessionKey=" . $key . "' width='1200' height='700'></iframe>");
echo('<iframe src="http://184.82.171.17?LoginName=' . $player . '&SessionKey=' . $key . '" width="1200" height="700"></iframe>');
Re: autmated login
got it i don't know how i messed up on the quotes.
also is there a way to integrate the email validation into the create new account api?
also is there a way to integrate the email validation into the create new account api?
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
Use the AccountsEdit API command to set a random ValCode for the player. Then use the mail() command in PHP to send that to them.antmar904 wrote:also is there a way to integrate the email validation into the create new account api?
Re: autmated login
can you help me out with this i wouldn't even know where to begin and i would really like to implement this for extra security.
thank you again.
thank you again.
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
Have you implemented code to create a new player account?antmar904 wrote:can you help me out with this i wouldn't even know where to begin and i would really like to implement this for extra security.
Re: autmated login
yes I have but using your example API and tweaking it.
I would like for a validation box to appear after the user hits the submit button on the new account creation page so then the user would have to check there email for the validation code and enter it into the validation box to verify there identity.
Any help is much appreciated and I do understand that you have been going outside your realm of support.
Thank you
I would like for a validation box to appear after the user hits the submit button on the new account creation page so then the user would have to check there email for the validation code and enter it into the validation box to verify there identity.
Any help is much appreciated and I do understand that you have been going outside your realm of support.
Thank you
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
You can create a random validation code like this to duplicate the internal system than Poker Mavens uses:antmar904 wrote: I would like for a validation box to appear after the user hits the submit button on the new account creation page so then the user would have to check there email for the validation code and enter it into the validation box to verify there identity.
Code: Select all
$ValCode = "";
for ($i = 0; $i < 8; $i++) $ValCode = $ValCode . strtoupper(dechex(rand(0, 15)));
If you want Poker Mavens to handle the login/validation process then use the AccountsEdit API command to set the ValCode field like this:
Code: Select all
$params = "Password=$pw&Command=AccountsEdit" . "&Player=" . urlencode($Player) . "&ValCode=" . $ValCode;
$api = Poker_API($url,$params,true);
Code: Select all
$to = $Email;
$subject = "Validation code for our poker site";
$message = "Enter validation code " . $ValCode . " on the Login dialog to activate your account.";
$other = "From: [email protected]";
mail($to, $subject, $message, $other);
Re: autmated login
thank you, so i got it to the point that when the user fills out the register form it then creates the validation code and emails a 8 char code to them.
how would i then verify if that is the right verification code for that particular user also deny log in until there email has been validated?
how would i then verify if that is the right verification code for that particular user also deny log in until there email has been validated?