• I want certain links on my site to change for either each session or after one has been clicked.

    For example: link a points to google.com for session 1, on session 2 I want link a to point to yahoo.com.

    Alternatively: link a points to google.com. When user 1 clicks on it, user 1 continues to google.com. For user 2, the link now points to yahoo.com. If user 2 does not click, then the link continues to point to yahoo.com.

    I hope that makes sense. Anyway, I’m sure there is a way to do this programmatically, but I’m hoping someone can point me to a plugin that might do it also. I have considered some of the ad rotator plugins, but I’m not sure if they would do the job.

    Hopefully, someone can help. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would forget about the session concept, and only resolve the link target when it is clicked. Capture the onclick event in javascript and have it do an AJAX request to your website to get the target URL. The .php file that receives the AJAX call updates an index in the database and returns as text the url obtained by indexing into an array or table indexed modulo the table size.
    This way every click serves out a different url in rotation.

    About a year ago, I was planning to launch a train ticket purchase website that I encountered this problem in the middle of the work, and since I did not know if I could get help from the WordPress forum, I had to start the website….

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘dynamic link update per session’ is closed to new replies.