Jump to content

Click Based Expiration Link


Recommended Posts

Hello,

 

I am new to PHP I typically work with .NET

 

I am trying to get this script to work that records an IP address and the number of times a user has clicked on a link to a .txt file, while expiring after a certain number of clicks (in this case, 3).  This script will record the first link click and IP address, but from there it doesn't log the additional attempts.  I would be grateful if some PHP savvy person can quickly look over this script and point out any obvious issues.

 

One line in particular i am questioning is the '&' in:

 

if (do_readfile_string(&$clicks,$filename)

 

 

 

Thanks ahead.

 

I zipped the 2 files and attached.

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

The & is generally used for passing as reference, but afaik, it needs to be in the funciton declaration. Not the function call.

 

It works either way. So it is just being passed by reference (meaning that variable will contain whatever the end result was inside the function or a reference to it anyhow)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.