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

Make your own URL Shortner Site in 3 minutes

Discussion in 'Black Hat SEO' started by G-S-T, Oct 25, 2011.

  1. G-S-T

    G-S-T Executive VIP Jr. VIP

    Joined:
    Jan 20, 2011
    Messages:
    1,840
    Likes Received:
    8,807
    Occupation:
    Full time IM
    Location:
    Heavy in the game
    Here is another freebie for you.

    If your tired of getting your URL's disabled by the major shortners, overcome the problem by making your own.

    You can have it up in 3 minutes.

    The index page is just a simple no frills page with a form, see below.
    [​IMG]

    Installation:

    1.Create a Database
    2.Unpack files
    3.Edit /includes/conf.php with your database details.
    4.Import the SQL from sql.txt
    5.Upload all the files to your root and boom, your done.

    Download:
    Code:
    http://www.sendspace.com/file/ic6laf
    VirusTotal:
    Code:
    http://www.virustotal.com/file-scan/report.html?id=dbb62d06917c1d1e58ca42443aa79f471d9ff366fb353c9aa2099280ab5257c8-1319579205
    Enjoy
     
    • Thanks Thanks x 22
    Last edited: Oct 25, 2011
  2. bdman

    bdman Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 12, 2009
    Messages:
    1,066
    Likes Received:
    249
    Hi, Mate thanks for sharing this useful URL shorten.

    One quick questions: Can i short my url like this? www.mydomain.com/profile/12345

    Thanks + Rep given.
     
  3. kokoloko75

    kokoloko75 Elite Member

    Joined:
    Jan 1, 2011
    Messages:
    1,628
    Likes Received:
    1,935
    Occupation:
    Design director
    Location:
    Paris (France)
    Otherwise you can be more simple by using .htaccess file :
    Code:
    Redirect /je5Hk http://www.blackhatworld.com
    Beny
     
    • Thanks Thanks x 2
  4. Choronzon

    Choronzon Power Member

    Joined:
    Apr 20, 2008
    Messages:
    559
    Likes Received:
    376
    Doesn't work, I just get the errors

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/******/public_html/*****.CO.UK/includes/lilurl.php on line 73

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/******/public_html/*****.CO.UK/includes/lilurl.php on line 123

    Both these lines contain the code : if ( mysql_num_rows($result) )
     
  5. G-S-T

    G-S-T Executive VIP Jr. VIP

    Joined:
    Jan 20, 2011
    Messages:
    1,840
    Likes Received:
    8,807
    Occupation:
    Full time IM
    Location:
    Heavy in the game


    Drop everything in your database and then import this sql, if it works let me know and i can edit the original. Make sure you edit the database name :
    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.4.5
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Oct 25, 2011 at 01:14 PM
    -- Server version: 5.1.56
    -- PHP Version: 5.2.9
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `YOUR-DATABASE`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `lil_urls`
    --
    
    CREATE TABLE IF NOT EXISTS `lil_urls` (
      `id` varchar(255) NOT NULL DEFAULT '',
      `url` text,
      `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    
    
     
    • Thanks Thanks x 1
  6. Choronzon

    Choronzon Power Member

    Joined:
    Apr 20, 2008
    Messages:
    559
    Likes Received:
    376
    Wow, genius, that worked perfectly :D Thank you very much...
     
  7. kuzzi

    kuzzi Junior Member

    Joined:
    Jun 13, 2010
    Messages:
    198
    Likes Received:
    63
    Occupation:
    PROFESSIONAL VIDEO EDTOR/MARKETER OFFLINE SEO
    Location:
    world
    great I would love to try this one.
    few questions
    can we sue it on subdomains as well like,
    a.abc.com/asd
     
  8. G-S-T

    G-S-T Executive VIP Jr. VIP

    Joined:
    Jan 20, 2011
    Messages:
    1,840
    Likes Received:
    8,807
    Occupation:
    Full time IM
    Location:
    Heavy in the game
    I have not tested it on a sub domain. It should work but you may well need to edit the htaccess file accordingly.
     
  9. kendy

    kendy Junior Member

    Joined:
    May 29, 2009
    Messages:
    101
    Likes Received:
    18
    Very nice share ! Thank you :)
     
  10. mutatedllama

    mutatedllama Regular Member

    Joined:
    Feb 8, 2011
    Messages:
    445
    Likes Received:
    462
    Thanks, but my shortened URL has two forward slashes! eg http://zcu.be//1

    How can I fix this?

    Cheers :)

    edit: to clarify, the link given is: http://zcu.be//1, but http://zcu.be/1 (with one forward slash) also works. Looking into the code to try and edit this myself but if you find it first let me know please!
    edit2: found it - line 42 of index.php. Change

    PHP:
    $url 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$lilurl->get_id($longurl);
    into
    PHP:
    $url 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).''.$lilurl->get_id($longurl);
    Notice how the '/' has been changed to '', removing the forward slash.

    Thanks again - nice little script!
     
    Last edited: Oct 25, 2011
  11. flexnds

    flexnds Power Member

    Joined:
    Jan 4, 2010
    Messages:
    643
    Likes Received:
    680
    Occupation:
    Internet Marketing, Web development, Internet Repu
    Location:
    AZ
    Great share! Now if I could only find a nice catchy short domain name.
     
  12. kokoloko75

    kokoloko75 Elite Member

    Joined:
    Jan 1, 2011
    Messages:
    1,628
    Likes Received:
    1,935
    Occupation:
    Design director
    Location:
    Paris (France)
    Look around .US domains, like : http://shrturl.us
    Also, with two letters you have : cc, fm, tw, cx, mu, nu, tl, ht, am, sn, gs, re, la, ag, bz, hn, lc, mn, sc, vc, co, in, cm, ms, mg, af, ki, nf, hk, gy, so

    Beny
     
    • Thanks Thanks x 1
  13. joaquin112

    joaquin112 Regular Member

    Joined:
    Apr 4, 2010
    Messages:
    285
    Likes Received:
    220
    Location:
    Queretaro!
    I would advice anyone against monetizing this, competition is too fierce because this is way too easy to do. When a complete noob from BHW can do something, it's something to stay away from ;) use it for personal use
     
  14. Dirty SEO

    Dirty SEO Registered Member

    Joined:
    Jun 22, 2011
    Messages:
    63
    Likes Received:
    13
    How do these make money anyway?
     
  15. kokoloko75

    kokoloko75 Elite Member

    Joined:
    Jan 1, 2011
    Messages:
    1,628
    Likes Received:
    1,935
    Occupation:
    Design director
    Location:
    Paris (France)
    This is not to monetize.
    It's to manage your own short URLs, especially for CPA, ...

    Except as to ******, monetize an URL shortener is not a good idea... (IMHO)

    Beny
     
  16. Sprouts

    Sprouts Regular Member

    Joined:
    Mar 20, 2010
    Messages:
    461
    Likes Received:
    324
    Great script.

    You can also host multiple domains like domain1.us, domain2.us, domain3.us etc on 1 hosting account all sharing one database.

    That way domain1.us/1/, domain2.us/1/, domain3.us/1/ will all go to the same url. Great if some sites are blocking some of your domains - you don't have to go and shorten the link again, you just change the domain and the link will go to the same place.
     
  17. phpbuilt

    phpbuilt Jr. VIP Jr. VIP

    Joined:
    May 16, 2011
    Messages:
    1,650
    Likes Received:
    5,208
    Occupation:
    $ from websites I own.
    Location:
    putting monkeys in paypal
    They don't really make money. Certain things require short URLs, such as twitter or any other short-message clone. The problem is people using goo.gl or bit.ly sometimes have their campaign banned and URLs destroyed by these URL shortener places who don't like being used for blackhat or SEO purposes.

    Controling your own URL shortener limits your liabilities by keeping 100% of the control of your shortened URLs in your own power.

    Furthermore (and this is something I'm considering in the future) ... if you do a whole ton of spam links to one URL and for whatever reason that spam is unsuccessful (the domain becomes deindexed, it just doesn't rank that well, you have another idea for the spam), you can instantly divert 5k, 10k, 100k, even a half million links or more all by switching a 301 from going from one destination to another.
     
  18. G-S-T

    G-S-T Executive VIP Jr. VIP

    Joined:
    Jan 20, 2011
    Messages:
    1,840
    Likes Received:
    8,807
    Occupation:
    Full time IM
    Location:
    Heavy in the game
    I wasnt gonna say, but whenever somebody rips my site, 50% of the time they go and use my url shortner.

    So as my way of saying "fuck you" for stealing my site, i just swap their links and point them to my sites. :D
     
    • Thanks Thanks x 2
  19. SuperLinks

    SuperLinks Elite Member

    Joined:
    Jul 14, 2008
    Messages:
    2,903
    Likes Received:
    847
    Location:
    New York
    Nice I'll give this a try...

    What would be even cooler is if someone on here could make a quick redesign of the homepage to make it "sparkle".

    Have the appearance of a REAL URL shortner so that if someone hit the site they'd assume it was a normal, new, URL shortning service.

    Heck, maybe you PW protect it or something along those lines so no one else uses it and have the page be in "private beta"...

    Either way, nice share....
     
  20. clutch5

    clutch5 Registered Member

    Joined:
    Oct 31, 2009
    Messages:
    74
    Likes Received:
    12
    cant download from sendspace, please reupload