[WTB] Help me setup simple adscendmedia file gateway php code! $10

wpbacklinks

Elite Member
Joined
Mar 27, 2010
Messages
3,738
Reaction score
1,481
Hi,

How would I get this file gateway php code to work with wordpress? Im using mediafire to host the files.

You may use this code within your PHP projects to create links on-the-fly in an encrypted form.
The code below is customized specifically for your account.

Code:
<?php
function encrypt4AM($url='', $pw='', $friendlyname='', $is_file=1){
  if ($friendlyname==''){$friendlyname='0';}else{$friendlyname=str_replace('__','_',$friendlyname);}
  if ($url==''){$encurl='0';}else{$encurl=encrypt($url);}
  if ($pw==''){$encpw='0';}else{$encpw=encrypt($pw);}
  $out = 'http://lnkgt.com/0i8194_'.urlencode($friendlyname.'__'.$encurl.'_'.$encpw.'_'.$is_file);
  return $out;
}

function encrypt($string){
  $result = ''; $key = '81941286469042';
  for($i=0; $i<strlen($string); $i++) {
    $char = substr($string, $i, 1);
    $keychar = substr($key, ($i % strlen($key))-1, 1);
    $char = chr(ord($char)+ord($keychar));
    $result.=$char;
  }
  return base64_encode($result);
}

function decrypt($string){
  $result = ''; $key = '81941286469042';
  $string = base64_decode($string);
  for($i=0; $i<strlen($string); $i++) {
    $char = substr($string, $i, 1);
    $keychar = substr($key, ($i % strlen($key))-1, 1);
    $char = chr(ord($char)-ord($keychar));
    $result.=$char;
  }
  return $result;
}
?>

Usage
First, familiarize yourself with how the file gateway works when you create a link normally (manually) via our website.
This example will mimic a link that we've created manually (http://lnkgt.com/3). As in that demo, we will be linking to a simple text file, located at:
http://rapidshare.com/files/287593924/lnkgt_example.txt

We'll use the PHP code as so:
<?php
$url = "http://rapidshare.com/files/287593924/lnkgt_example.txt";
$url = encrypt4AM($url, '', 'example_file', 1);
echo($url);
?>

This would give us a new URL like this (link):
http://lnkgt.com/0i1441_example_tex...oZmJpa2lqZGtlbWGgpqCepJCZrJKeop+eYKiwqQ==_0_1

The new URL is encrypted, so that visitors can't determine what link you are ultimately sending them to (the text file at Rapidshare, in this example). Remember that your PHP code will give different results, since a different encryption is used for each publisher account.
You can now apply this method to any and all download links on your site.

There are four options to the encrypt4AM function: URL, password, whether the link is to a file (use 0 or 1 to specify), and a "friendly name" to use at the beginning of the URL, to give it some readability ("example_file" in our example). The friendly name should concist only of letters, numbers, underscores, and dots.

will pay $10 for this simple work.

PM me or reply this thread. thanks
 
Last edited:
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock