Faucet List With Timer

https://andysavage.github.io/Faucet-List-Page
faucetlist.org

Initially using Jules via the GitHub repo.
research and planning—DeepSeek via OpenRouter
moved dev to Droid (CLI), then Claude.

Overview

This would be a useful addition to the clickforcharity.net site (or as a stand-alone page) so that users can get the most out of faucets, etc. Using a list site that is now gone, I found I could double the income for the time spent. It saves wasting time visiting sites that are not yet ready or forgetting to visit ones that are. Much more efficient.

  • It’s a user-filled list of sites with a timer set for each one.
  • No need to remember which ones are ready or to keep lots of tabs open.
  • Can set up a few with our referral links to start with
  • If users keep the page open, that will get us better site stats for the ad networks and advertisers.
  • We can see which sites are most popular.
  • Links will have ‘clickforcharity’ in the HTTP_REFERER header, so sites will see they are getting traffic from us.

Purpose

The aim of this tool is to attract users to the site. They don’t need to be donating their income to our projects; just visiting the site is supportive as well.

  • To give all users a way to increase their faucet and PTC, etc., income that doesn’t cost them anything.
  • To help existing ClickForCharity members to be more efficient in their tasks.
  • To increase site visits, which in turn gives us access to better income sources
  • To advertise the system to the new users who are not clicking for charity.
  • To improve our ad revenue. Users will likely load this page before going to the others, so we will get higher ad revenue being the first of the day.
  • To fill target sites with our referrer URL so they see they are getting hits from us.

Timer Accuracy

As was alluded to in the redundant part below, the browser throttling can screw up timers that are using setTimeout/setInterval, so we use real time instead. If there are still problems, this chat has some suggestions: chatgpt.com

Below Is Redundant

There is a page set up on the site using a custom plug-in (now gone—screenshot instead). It will only work properly for logged-in users, so I also need to find a way to make it only available to logged-in users. Maybe the existing YouZer plug-in can do that; I don’t want to install the Members plug-in just for that.

Done:

  • Ability to add their own links.
  • Ability to remove entries.

To Do:

  • Since writing the below items, the timers have stopped working altogether. Could be after upgrading the PHP version. See notes below this list.
  • The plug-in also causes the Gutenberg editor to give the error “Updating failed.” The response is not a valid JSON response when saving with the shortcode entered. When I put in something else instead of [faucet_script], it is fine. The link may give some insight.
  • Sites that are ready (timer) could go to the top of the list, and the button color changes to indicate this. Here is something that might do it.
  • I noticed that timers tend to go slow on some web pages and need refreshing. The timer needs to be accurate. This might help. (I know it’s JavaScript, but the principles might apply.) The link was lost due to the spellchecker; see the new section “timer accuracy” above.
  • Ability to edit entries.
  • Default entries when a new instance is created (i.e., a new user), i.e., we populate it with a few faucets with our referral links.
  • Is it possible to make it so that each site only appears once in the database? The present system makes a new entry for each site that each user puts in. Most users will have mostly the same sites overall. I can see the database getting huge otherwise.
  • Ideally it should just be a link as entered by the user—just a text string held in the database and made into a link rather than making a URL that calls a PHP function on the server.

Notes

There appear to be syntax errors in the plug-in. phpcodechecker.com found some:

  • Error: There is 1 more closing parenthesis ‘)’ found
    This count is unaware if parenthesis are inside of a string
  • Error: There are 4 more closing curly braces ‘}’ found
    This count is unaware if curly braces are inside of a string
  • PHP Syntax Check: Parse error: syntax error, unexpected ‘else’ (T_ELSE), expecting end of file in your code on line 96
    • }else{

extendsclass.com found no errors, though, showing it is good to use more than one!

Files

I saved out as much as I could of two old sites that had something like what we needed before they closed. They might save some time (they might also waste some; it’s a gamble, I suppose!)

Changelog

2021-09-14: Log started.
Incorporated PHP changes made by WPMUdev when imported to the test site on their server:”Note: I had to fix your Faucet List plugin, as it was causing some issues on our hosting; the exact issue is that the plugin was using PHP short tags ‘<?=’ instead of ‘<?php’, as our hosting doesn’t support the PHP short tags.”

2021-11-01 –
Fixed deletion of tables when the plug-in is disabled and re-enabled.