1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Hire a Freelancer' started by wpbacklinks, Oct 13, 2010.

  1. wpbacklinks

    wpbacklinks Elite Member

    Mar 27, 2010
    Likes Received:
    Affiliate Marketer

    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.

    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));
      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));
      return $result;
    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:

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

    This would give us a new URL like this (link):

    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: Oct 13, 2010