I'll show you how to get push notifications to your phone (iOS / Android) or computer directly for anything you like.
You can use this for:
- Conversion/Event Notifications from Affiliate Networks
- Alert messages incase of server downtime
- YouTube Video checkers
- Anything else important to you
In this tutorial I'll cover getting conversion / earning notifications from affiliate networks so you get the general idea.
[hide]
We'll be using a great program called Pushover (
https://pushover.net) for this purpose. It's a great app that enables you to get push notifications which you can send.
1.
You can register here: https://pushover.net/login
2. As soon as you've finished your registration, go to
Apps & Plugins in the top menu, or click this link:
https://pushover.net/apps
3.
Create New Application/Plugin (Link:
https://pushover.net/apps/build). The name of the application will be on your screen on your phone/computer whenever you get a incoming push notification. All other fields are optional.
4. Accept the terms and click on the "Create Application" button.
You now have created your account and your "application" you will use to send to and receive push notifications from.
5. Time to get the clients for either iOS, Android or Computer (or all):
https://pushover.net/clients
6. Once you have downloaded your desired client from above, sign in with your account and register your device (straight forward process in the app).
You must allow the app to send notifications (duh).
Now you are almost ready to receive notifications. We now need two values.
The first one is your
USER TOKEN (You'll find it on the index page of
https://pushover.net when you're logged in).
The second one is your
APP TOKEN (You'll find it on the app details page,
https://pushover.net/apps after clicking on your app).
To get notifications from affiliate networks about any leads you get, the first thing you have to do is to create a file called postback.php or whatever.php on your server, in a location which is accessible through a browser (webroot).
The content of postback.php is:
PHP Code:
<?php
$user = "YOUR USERKEY"; //REPLACE THIS WITH YOUR USER TOKEN
$token = "YOUR APP TOKEN"; //REPLACE THIS WITH YOUR APP TOKEN
$message = $_GET['p']."$ earned!"; //YOUR MESSAGE (right now reads GET parameter "p" for your lead amount, completely customizable)
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => $token,
"user" => $user,
"message" => $message,
),
CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true,
));
curl_exec($ch);
curl_close($ch);
?>
Just insert your tokens above (commented in code) with the values you get from the previous steps and upload it to your server if not done already.
The code sends a request to pushover servers with your value. (
Note: for it to work, your server/hosting needs php curl extension installed,
https://www.digitalocean.com/community/q...stallation).
You can now test your notifications. Just visit
http://yourwebsite.com/postback.php?p=1 in your browser and see if you get a notification on your phone. Now if you have done everything right, you should see it. Now you navigate to your favorite CPA network and go to the
Postback Settings.
Depending on the macros every network has, you input this into the field:
http://yourwebsite.com/postback.php?p=
[payout]
Replace
[payout] with your macro. You can find those values on decent networks on the postback settings page. Then save it.
From now on, every conversion that occurs on the network will be sent directly to your phone to look at. That's for the people that are checking out their earnings every minute :). However, you can use this for many more things, especially when you have your own services or tools, so you can always notify yourself programmatically incase anything important happens.
If you have any questions, just let me know. Enjoy!
Pushover documentation for programmers:
https://pushover.net/faq#library
[/hide]