TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   email link validation (need hekp) (http://www.talkphp.com/absolute-beginners/2649-email-link-validation-need-hekp.html)

kororo203 04-17-2008 02:18 AM

email link validation (need hekp)
 
er.. i got a problem...

can think of how i can get a link to be valid... i know that i can make use of parse url and split to get the info about the url but how about redirecting it to my site.. how would it be a valid link

take this for example...

http://linlk/link/link

now i'm gonna add a hash code for the account activation..


http://linlk/link/link/hashcode
then i'm gonna split it,...

now how can i make this code be a link to my logon site..
consider that my login site is
www.site/logon.php
the adding the code www.site/logon.php(linkandhashcode)

er.. don;tknow how it will work

thanks in advance.. your help is deeply appriciated

EyeDentify 04-17-2008 06:48 AM

Well just put together a string that you send to the new users email. You could put it together like this perhaps ?
PHP Code:

<?PHP

$szValHash 
md5(microtime());

$szMyLoginUrl 'http://www.mysite.com/login.php?hash=';

$szValUrl $szMyLoginUrl $szValHash;


// Insert $szValUrl where you want to echo the url.

echo('<A HREF="' $szValUrl '" target="_blank">Validate your new account</a>');
?>

Above echo will print something like this:
Code:

<A HREF="http://www.mysite.com/login.php?hash=1f3870be274f6c49b3e31a0c6728957f" target="_blank">Validate your new account</a>
I hope thats whats your after.

Good luck :)

kororo203 04-17-2008 07:33 AM

hehhehe i think i got that part already butmy problem is really ob how to get the url from the browser address bar.. i had search already in google and yahoo and most of them said that using the parse_url is not a reliable method... but they had suggested using $_GETS where i find it a bit complicated because on most example that i had seen the url is already stored in a variable and they don't say it on the tutorial on how to get it in the address bar.. btw thanx so much...

all helps are appreciated

sjaq 04-17-2008 07:45 AM

$_SERVER['REQUEST_URI']?

kororo203 04-17-2008 07:48 AM

$page = $_SERVER['REQUEST_URI'];
echo $page;

hehehe this works fine thanx....


All times are GMT. The time now is 07:32 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0