Hi! I am new to the world of coding, but am slowly learning.
I am working on an internet scavenger hunt- so people search for a hidden icon on different sites all over the net. they are given a list of links to the sites participating and a riddle to help them find the right page on the site.

What I need: I need to code the icons so when clicked the user is returned to my site and it logs that that icon has been found. This is the main thing I need to get done.
If it is possible I would also like to be able to give the users the option of saving their favorite sites maybe with a comment or adding a note option... and it would be nice if I could also show the sponsors how many people have found their icon.

I have it set up with registration and logins already... how do I go about finishing this project?

6 Years
Discussion Span
Last Post by mschroeder

It seems that the main thing that you need is a standard htm link associated with the icon on each sponsor site pointing back to a page on your site (a href=yourpage.php?sponsor=xxx>icon.jpg</a>). This will get them back to your site and tell you which sponsor they came from. That allows you to keep count.

With respect to saving their favorite sites, you will know where they have come from so you could theoretically save that to a database on your site along with their ID information if you wanted to do this through your site. If what you wanted to do was to let them bookmark the sponsors site in their browser, I'm not sure how you can do that. There is javascript available to bookmark the page that you are currently on but it is too late to do that once they link to your page. You can also use ctrl-d (or ctrl-t in Opera) to initiate the bookmarking process. Depending how free you are to add code to their pages, you could implement the javascript on their page along with your link or you could just prompt them to use ctrl-d / ctrl-t to bookmark that page. Probably a little bit of overkill since they can choose to bookmark it themselves if they want it.


I need it to save which icons were found for the person looking for them- there are about 200 sites for them to find the icon on, so I need to be able to record that they have found each one in the list... even if it just puts the site name and not the web address into a database.
I dont know if this would need to be in javascript or jquery to be able to do it? I only have basic PHP knowledge.

for the icons themselves I know it needs to be something like www.mysite.com/sites_found.php?siteid=xxx
but how do I get from that to it recording that that particular searcher found that particular icon?


If they are logged into your site, you can use the session or the cookie you are using to make the connection between their account and whatever link is incoming. If they are not logged in or do not have an account, provide them with a quick login/registration process and then immediately add whatever they clicked on to their account.

On a tangent instead of using siteid=[integer] I'd probably be more inclined to use a hash with a unique salt, so that a user couldn't just visit your URLs in order, by changing the siteid to the next number. Salting the hash would ensure that unless they guessed the salt, they could not replicate your hash either. This is assuming that the site ids are auto-incrementing integers of course.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.