redarrow Posted April 12, 2006 Share Posted April 12, 2006 How do i get the session $domain to increment so if the users ip looked at somthink twice the echo message apears thanks.My code but needs help cheers.[code]<?//start sessionsession_start();// Put varable $doamin as an ip$domain = GetHostByName($REMOTE_ADDR);// Convert varable $doamin to a session.$domian=($_session["$domian"]);// If session $domain = 2 or is 2 echo message.if($domian>=2){echo "sorry you searched twice please know register!";}?>[/code] Quote Link to comment Share on other sites More sharing options...
shocker-z Posted April 12, 2006 Share Posted April 12, 2006 <?//start sessionsession_start();// Put varable $doamin as an ip$domain = GetHostByName($REMOTE_ADDR);if (!$_SESSION["$domain"]){ $_SESSION["$domain"]=1;}else { $_SESSION["$domain"]++; if ($_SESSION["$domain"] > 2) { echo "sorry you searched twice please know register!"; }}?>That should work as far as i can see but havn't had chance to test it. Quote Link to comment Share on other sites More sharing options...
redarrow Posted April 12, 2006 Author Share Posted April 12, 2006 Thank you so much works grate have to learn that know cheers.[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.