Post
Topic
Board Micro Earnings
Re: [Question] Alpha Faucet Script | Integrated with Short links
by
corpsejunior
on 06/07/2017, 11:35:56 UTC
I received a couple of PM wondering how to migrate the script to another URL Shortener.
Although I'm a very newbie in PHP, it's just a hobby, I've managed to do it.
Here's how I've done it. It assumes you already have the AlphaFaucet script up and running.


First, you need to generate an API key for your Mellow-Ads account.
Login to you account in Mellow-Ads, then you go to menu Account > Accout Details > API Settings.
Generate an API key and save it for yourself.
Then here's the link.php that I'm using : https://pastebin.com/aL6v3VDY

In link.php you will find in "zap.in" lines (21,26 and 30) in the code a variable YOU_API_KEY_HERE_WITHOUTQUOTES, replace YOU_API_KEY_HERE_WITHOUTQUOTES in all 3 instances with your API key.

I have also added a little trick of getting the country name of the visitor, maybe in case I want to redirect each visitor to a another URL Shortener according to his country, in order to optimize the payout. The if-else/try-catch are there, you just need to change the $api_url variable to the wanted URL, they all route to zap.in URL so far.
Also I added another folder /claims in order to track how many times each IP address has passed through the URL Shortener.

After all this, overwrite the link.php already existing in the links/ folder of your website with the new one.

Now you have it all.


EDIT: if you are in production, you may want to test the new link.php before overwriting the link.php in production.
For this, just save the file as link2.php and upload it in the same folder as link.php
Then on your browser input : http(s)://yoursite/links/link2.php if the zap.in page appears go ahead and solve the captcha, it will return back to verifier.php file and it will say "thank you Smiley" then you're good to move the file to production.