Unstoppable Domains โ€” Expired Auctions

Only valid after 20 seconds

SpaceshipSpaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
Ok, this may be confusing but here goes.

I have a traffic exchange website. When the user surfs the websites, they earn credits and this is done with a frames page (surf.php). They can only continue to the next URL when the countdown reaches 0 (from 20) and then the link is displayed (surf.php - so it basically refreshes the page and shows another random URL). However, there is nothing stopping the user from refreshing the page. How can I make it so they HAVE to wait the 20 seconds before they can continue.

What would be good: a validation method so they have to click either the right number or letter before moving onto the next site or they will not be given any credits.

Thanks
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
Probably an image validation is the best way to go.
 
0
•••
I thought about that but the user would have to type something out to earn half a credit and I don't think they'll really be bothered.

However, I had another idea: I could have a hidden input field with a value of a random number between 1 and 4. Then they have to click the same number. eg
(Click number 3, 1 - 2 - 3 - 4). But my Javascript won't let me add query strings to the URL
 
0
•••
I see that you'v'e asked about a countdown timer http://www.namepros.com/programming/171144-countdown-timer.html

I'm guessing that you want to use this countdown timer in your application so I'm taking this into consideration.

Why don't you insert an ID into the javascript. If they're going to get ad credit, and the amount of credit along with their user ID is stored in a database, you could query it like this:
Code:
<div id="dl">
If you're seeing this message, you need to enable JavaScript.
</div>
<script language="Javascript">
xtimer=20;
function countdown() 
{
 if ((0 <= 100) || (0 > 0))
 {
  xtimer--;
  if(xtimer == 0)
  {
   document.getElementById("dl").innerHTML = '<a onclick="%78%74%69%6D%65%72%3D%32%30%3B%63%6F%75%6E%74%64%6F%77%6E%28%29%3B" href="http://www.domain-name.com/track.php?%63%6F%64%65%3D%31%32%33%34%35">Your Link</a>'; // track.php?code=12345
  }
  if(xtimer > 0)
  {
   document.getElementById("dl").innerHTML = 'Please wait <b>'+xtimer+'</b> seconds...';
   setTimeout('countdown()',1000);
  }
 }
}
countdown();
</script>
track.php would be your file that can write to the database only and say if that certain person did complete the task or not. If they did, then they get the credit, and if not, sorry.

-Steve
 
0
•••
Thanks Steve. I'm not too advanced in PHP nor JavaScript. Please can you explain what "%78%74%69%6D%65%72%3D%32%30%3B%63%6F%75%6E%74%64%6" in the URLs mean? thanks
 
0
•••
Run it through urldecode(); ;)
 
0
•••
ah, Thanks for all the help. I'm not sure what to put in track.php as I do not want people running scripts to click the link.
 
0
•••
What to do:
1- store current time() in database next to user's id
2- give user timer javascript with link
3- when user clicks link, check to see if the current time is 20+ seconds after the time stored
-- if too early, go back to step 1 and yell at the user
4- say 'click successfully tracked.' and give them the next link
 
0
•••
Thanks Eric and Jim for replying. Got distracted by a bad phone bill. :(

-Steve
 
0
•••
Why not just don't display the link until 20 seconds has passed. When they enter the page store the time in a session variable. When the page is refreshed check that variable against the current time and only display the link if 20 seconds has passed.
 
0
•••
Then they think that the page is stilll loading.
 
0
•••
Excellent So they realise their refresh trick didn't work and wait for it to finish loading at which point it refreshes and the link is displayed.
 
0
•••
Thanks very much for the help guys :)

Now getting "No input file specified" in my frames page. However, when looking at the page source, it clearly says the URL :td:

Nevermind, it's all screwed up and I cannot be bothered with this anymore!!
 
Last edited:
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Spaceship
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back