Jump to content
MakeWebGames

Streets


Naffer20

Recommended Posts

I have 'Streets.php' this was an upgraded mod i've had for years. One problem though, when they find something good they can just refresh the page an get it over & over again. What can i do to stop this?

I've tried

{

die ("Error, you cannot refresh or go back on the streets, please use a side link to go somewhere else.<br />

<a href='streets.php'>> Back</a>");

}

Doesn't work.. Help Please :D

Link to comment
Share on other sites

This is a snippet of code I got from slotmachine.php from mccodes. You'll hve to edit it to work for you but this should help you out

$_GET['tresde']=abs((int) $_GET['tresde']);
if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<100)
{
die ("Error, you cannot refresh or go back on the slots, please use a side link to go somewhere else.<br />
<a href='slotsmachine.php?tresde=$tresder'>> Back</a>");
}
$_SESSION['tresde']=$_GET['tresde'];
Link to comment
Share on other sites

Check their number of steps before this die?

Also chicka, that would only work if you link it like this:

 

$randnum = mt_rand(1,1000); //Not sure what numbers it is
<a href='steets.php?tresde='$randnum'>Streets</a>

You would need to generate that random number first.

yes your right... I just took a piece of code from roulette and posted it here to give him some idea as to how to do it..

Link to comment
Share on other sites

Dahm, still not working. I tried with the

 

$_GET['tresde']=abs((int) $_GET['tresde']);

if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<20)

{

die ("Error, you cannot refresh or go back on the streets, please use a side link to go somewhere else.

<a href='streets.php?tresde=$tresder'>> Back</a>");

}

$_SESSION['tresde']=$_GET['tresde'];

Don't work. :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...