URL brander

I am trying to create an Adfly URL shortener with PHP using Adfly’s API like this one: http://kingdom-leaks.com/url.php. I have been using the PHP code here: https://github.com/calclavia/Adfly-Drupal-Module/blob/master/wordpress/adfly-injector.php. I just need help implementing it into my HTML code.
Here is my HTML code:

[code]

URL Brander body{padding-top:0px;padding-bottom:40px;background-color:#eee}.main-form{max-width:330px;padding:15px;margin:0 auto}.main-form-header{margin-bottom:10px}.main-form input[type="url"]{position:relative;font-size:16px;height:auto;padding:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:10px}.main-form input[type="url"]:focus{z-index:2}.alert{margin-bottom:10px}

Brand your URL


©2015 LeaksWin & Kingdom Leaks,
All Rights Reserved.
<?php include 'adfly.php';?> [/code]

Can anyone help?

Well, not sure what your issue is with this. But, here is how it is done normally behind the scenes…

You grab the text for the URL or just about ANYTHING you want.
You create what is called a UID or UNID which stands for Unique Identifier for the string.
You store the UID and the URL or other text into your database.

Then, in your HTML display of it, you place whatever for the text and the behind-the-scenes URL
would point to your site with the UID stored in it. Something like http://www.yourdomain.com/adfly/9DB83
where the 9DB83 was the UID for that URL. Then, when they click on it, your site’s page would decode
the last section and use the PHP Header() function to redirect to the correct website.

Does that make sense? It is fairly simple to do… Let us know if you need further help with it…

Sponsor our Newsletter | Privacy Policy | Terms of Service