CPA Marketing Talk - Best CPA and Affiliate Marketing Forum  

Go Back   CPA Marketing Talk - Best CPA and Affiliate Marketing Forum > >

Free Download Box Download Free Ebooks , Free Script/Tools , Free Software and Templates

Thread Tools Display Modes
Old 07-28-2011   #1
Join Date: Jul 2011
Posts: 198
Default [GET] Plugin - Url Shortener - Create Iframe Of Long Url - Lock It Or Call Any Code

This is a share of a Plugin I have coded to be used with Yourls.
Yourls is a URL Shortener script, which includes tracking. It is open-source, and free, and can be found by searching the big G.
It can be customised almost ad-nauseum, and there are already some cool plugins shared within the Yourls community.
I'm sure a search within BHW will yield tutorials on how to set up and use.

I have made some mods myself, and will be sharing them here over the next few days, along with methods I'm currently using to make bank with this plugin.

The plugin itself, when edited and added to an installation of Yourls, will shorten links, but with a twist. It will dynamically generate a presentation of the destination page, within an iframe, and, at the same time, it will call/display/execute any script or code you wish.

Folks, I don't need to tell you all about the possible uses for this - locking content, offering a short url service with "temporarily disabled" code, which you later "enable", drive-by javascript execution, drive-by installs - this is suitable for EVERY IMer, regardless of whether you "lock", or you use other BH techniques, and that's just a few of the spins you can put on this.

Look out in other sections for threads I'll start with methods. My methods involve the use of Content Lock Pro - being as I created it, it's my tool of choice

So, on to the plugin itself, and how to use it:

You will need to install YOURLS on a short domain, then visit user/plugins and create a folder, give it any name you like.

Then, edit the code below, to call your code, in the section marked "CALL YOUR SCRIPT OR CODE", and save it as a text file, named plugin.php. Then place the plugin.php in the folder you created above.

PHP Code:
Plugin Name: JohnsonD's Plugin
Plugin URI:
Description: Iframe the Long Url and Display your Locker. <a href="">Buy Content Lock Pro NOW</a>.
Version: 1.0
Author: DJ
Author URI:

global $jd_locker;
$jd_locker['do'] = false;
$jd_locker['keyword'] = '';

// When a redirection to a shorturl is about to happen, register variables
yourls_add_action'redirect_shorturl''jd_locker_add' );
jd_locker_add$args ) {
$jd_locker['do'] = true;
$jd_locker['keyword'] = $args[1];

// On redirection, check if this is a locker and draw it if needed
yourls_add_action'pre_redirect''jd_locker_do' );
jd_locker_do$args ) {
// Does this redirection need a locker?
if( !$jd_locker['do'] )

// Get URL and page title
$url $args[0];
$pagetitle yourls_get_keyword_title$jd_locker['keyword'] );

// Update title if it hasn't been stored yet
if( $pagetitle == '' ) {
$pagetitle yourls_get_remote_title$url );
yourls_edit_link_title$jd_locker['keyword'], $pagetitle );
$_pagetitle htmlentitiesyourls_get_remote_title$url ) );
$md5 md5$url );
$sql yourls_get_num_queries();

// When was the link created (in days)
$diff abstime() - strtotimeyourls_get_keyword_timestamp$jd_locker['keyword'] ) ) );
$days floor$diff / (60*60*24) );
$days == ) {
$created 'today';
    } else {
$created $days.' '.yourls_plural'day'$days).' ago';
// How many hits on the page
$hits yourls_get_keyword_clicks$jd_locker['keyword'] );
$hits $hits.' '.yourls_plural'view'$hits);
// Plugin URL (no URL is hardcoded)
$pluginurl YOURLS_PLUGINURL '/'.yourls_plugin_basenamedirname(__FILE__) );

// All set. Draw the locked page itself.
echo <<<PAGE
<!--- CALL YOUR CODE or SCRIPT HERE - what is shown is sample locker code for Content Lock Pro --->
<script type="text/javascript"
<script type="text/javascript"
  <style type="text/css">
     html, body {
        overflow: hidden;
        margin: auto;
        height: 100%;
        width: 100%;

<iframe id="jdFrame" frameborder="0" width="100%" height="100%" src="
$url" name="jdFrame"></iframe>
// Don't forget to die, to interrupt the flow of normal events (ie redirecting to long URL)
hardybents is offline   Reply With Quote
Old 05-07-2017   #2
Junior Member
Join Date: May 2017
Posts: 1

Полезная информация о строительстве и ремонте
EdwardCep is offline   Reply With Quote
Old 05-13-2017   #3
Junior Member
Join Date: May 2017
Posts: 1

Читайте много информации о стройке и ремонте
RichardUnopy is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:45 AM.

Search Engine Optimisation provided by DragonByte SEO v2.0.23 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.