Skip to content

Commit

Permalink
Remove CoinURL as a supported service
Browse files Browse the repository at this point in the history
The company went out of business, https://coinurl.com and https://cur.lv
no longer work :(
  • Loading branch information
HeroCC committed Dec 5, 2019
1 parent cda8c4c commit ea2abe3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This plugin allows you to redirect all shortlinks through a link monetizer.
Currently, the following shorteners are supported:
* [AdFly](https://adf.ly/?id=2777408), trigger: `a/`
* [AdFoc.us](https://adfoc.us/?refid=287608), trigger `f/`
* [CoinURL](https://coinurl.com/index.php?ref=5e7f93ae61a2bf890b40bd470929998b), trigger `c/`
* [ouo.io](https://ouo.io/ref/0IqYvHOo), trigger `o/`

Going to a shorturl with a trigger before it will automatically forward the url through the selected service (ex *sho.rt/a/test*). If it recognizes a trigger but there is no associated service it will not monetize the link.
Expand All @@ -35,12 +34,6 @@ To properly setup this plugin, you need to manually change the IDs from the defa
2. Navigate to [this url](http://adfoc.us/tools/site-links)
3. Your ID is the number after '?id='

### CoinURL
1. Ensure you have a valid account and are logged in
2. Navigate to [this url](https://coinurl.com/profile-dynamic.php)
3. Click the 'Show code' button (both work)
4. Your ID is the part after 'var id =' without the double quotes

### ouo.io
1. Ensure you have a valid account and are logged in
2. Navigate to [this url](https://ouo.io/manage/tools/full-page-script)
Expand Down
6 changes: 1 addition & 5 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@

if( !defined( 'YOURLS_ABSPATH' ) ) die();

define( 'TRIGGERS', array('a/', 'f/', 'c/', 'o/') ); // Add any possible trigger to use here
define( 'TRIGGERS', array('a/', 'f/', 'o/') ); // Add any possible trigger to use here

define( 'ADFLY_ID', '2777408' ); // Replace this with your Adfly ID
define( 'ADFOCUS_ID', '287608' ); // Replace this with your Adfoc.us ID
define( 'COINURL_ID', 'ab87bdb66600433a8bd4fd87aabd896a' ); // Replace this with your CoinURL ID
define( 'OUO_ID', '0IqYvHOo' ); // You get the drill

define( 'ADFLY_DOMAIN', 'https://adf.ly' ); // If you have a custom Adfly domain, replace this with it
define( 'ADFOCUS_DOMAIN', 'https://adfoc.us' ); // Same for this
define( 'COINURL_DOMAIN', 'https://cur.lv' ); // CoinUrl doesn't allow custom domains, but just incase it is configurable
define( 'OUO_DOMAIN', 'https://ouo.io' );

yourls_add_action( 'loader_failed', 'check_for_redirect' ); // On url fail, check here
Expand All @@ -39,8 +37,6 @@ function redirect_to_advert( $url, $code ) {
if ( doAdvert ) {
if ( redirectService == 'f' ) { // Use adfocus
return ADFOCUS_DOMAIN . '/serve/sitelinks/?id=' . ADFOCUS_ID . '&url=' . $url;
} else if ( redirectService == 'c' ) { // Use CoinURL
return COINURL_DOMAIN . '/redirect.php?id=' . COINURL_ID . '&url=' . rawurlencode($url);
} else if ( redirectService == 'a' ) { // Adfly
return ADFLY_DOMAIN . '/' . ADFLY_ID . '/' . $url;
} else if ( redirectService == 'o' ) { // OUO.io
Expand Down

0 comments on commit ea2abe3

Please sign in to comment.