Short URL
Short URL allows you to create shorter URL’s and keeps track of how many times a link has been clicked. It’s useful for managing downloads, keeping track of outbound links and for masking URL’s.
You could use it to turn this;
to this;
Features include a simple password protected admin page which allows you to add, edit and delete redirecting URL’s as well as clear the counters for every link. You may also add a description to the link which only you can see.
![]() |
|



July 13th, 2007 at 11:03 am
Hi all!
Looks good! Very useful, good stuff. Good resources here. Thanks much!
Bye
Dodgy GeezerJuly 26th, 2007 at 4:59 am
thank you for making this! if you had an adsense ad id click on it
Dodgy GeezerJuly 26th, 2007 at 4:59 am
oh wait you do im clicking on it
Dodgy GeezerJuly 28th, 2007 at 2:44 am
I had this working fine on my blog and my hosting for some reason decided my httaccess was creating a problem and deleted it ugh. I readded this:
RewriteRule ^u/([0-9]+)$ wp-content/plugins/u
but the url redirect is now not working and no matter what I do with it I can’t get it to redirect a url. It tells me
Page Not Found
Sorry, the page you tried to access cannot be found.
I know I am missing something and it would be appreciated if someone could point it out as this worked well for redirects on the blog rather then long urls.
I am using WordPress 2.2.1 — 0.29 seconds. It has been working fine till the httaccess was deleted and now trying to get things in order.
Dodgy GeezerJuly 30th, 2007 at 7:49 pm
You should have RewriteRule ^u/([0-9]+)$ wp-content/plugins/u.php as opposed to just with the u. Hope this fixes it for you, if not.. write again :)
The Genuine ArticleAugust 5th, 2007 at 4:36 am
Hi
It is healthy, I shall come on your site more often, thank.
G’night
Dodgy GeezerAugust 5th, 2007 at 11:51 am
great script helps me to track my urls
Dodgy GeezerAugust 22nd, 2007 at 5:53 pm
Hi
Great website! Bookmarked! I am impressed at your work!
G’night
Dodgy GeezerAugust 28th, 2007 at 5:17 pm
does this script allows multiple url once ? if no please make it multiple. and mail me please.
Dodgy GeezerAugust 28th, 2007 at 10:08 pm
You mean does it allow you to redirect to more than one url at a time? Nope cos it would be annoying ;)
The Genuine ArticleAugust 28th, 2007 at 10:15 pm
i mean can i just paste all the links i need to change in one row and than i get the short link in a row
eg :
http://www.example.com/fie/fasd/dasd.zip
http://www.example.com/fie/fasd/daaadssd.zip
http://www.example.com/fie/fasd/dasd.rar
and i get them back as
http://www.harleyquine.com/u.php?1
http://www.harleyquine.com/u.php?2
http://www.harleyquine.com/u.php?3
if this is the 50th url i am adding than
http://www.harleyquine.com/u.php?50
like that.
eg: http://www.rapidsafe.net
Dodgy GeezerAugust 29th, 2007 at 6:19 pm
Hmmmm nope, but an interesting idea. Batch adding. Will look into it when I get time.. time is a precious thing.
The Genuine ArticleAugust 29th, 2007 at 7:42 pm
um if its possible can you share the codes with me if you can i can ask my friend to try and multiple this one. i you want i can even send it to you when done. i need this urgent so please do something about it.
Dodgy GeezerOctober 18th, 2007 at 11:19 pm
Nice little script. Is there a way to rename the script so the redirect is something like this?
http://yourempliyeehandbook.com/your-employee-handbook.php?1
I’d like to preserve my keywords in the redirect.
Also: Do search engines spider the redirect URL or the regular one?
Thanks!
gary
Dodgy GeezerNovember 3rd, 2007 at 6:20 am
Hello,
Your script works OK. Is there a way to make the short URL look like this one? (http://www.harleyquine.com/u/20). That is, without u.php?x, your site is using u/x that is shorter :)
Dodgy GeezerNovember 21st, 2007 at 2:21 am
this seems to work fine except one problem i’m having with it. i’ve got the u.php file in my root folder and a couple .swf files i’ve masked in my html code. it works to link those .swf files on pages they are embedded on within my root folder, but if i have a page in a different folder, ex. root/movies/ and have a page inside that movie folder it won’t link the same .swf from the root folder to that page. so i have my index.php in my root with the u.php and the .swf. when i load that index.php it embeds the file fine. the .swf is my navigation bar so i want it spread across all pages of my site but only saved in that root folder. on the root index.php page i’ve got …src=”./u.php?1″… and like i said the .swf loads fine. in the root/movies/ folder i’ve got the same .swf linked as such …src=”../u.php?1″ but it doesn’t load. i’ve even tried using the full url path instead with the same results. of course i’ve got the path_to_script set as “http://www.mysite.com/u.php” and the link in the database set as “http://www.mysite.com/nav.swf” which is set as the “http://www.mysite.com/u.php?1″. any ideas why this isn’t working?
Dodgy GeezerNovember 21st, 2007 at 3:24 am
nevermind i figured it out. it has to do with the ac_fl_runcontent js plugin. in the arguments if i rename “movie” etc to the u.php link it won’t load the content. kind of thwarts the idea of hiding the file paths in the src= code since one can just look at the path in the ac_fl_runcontent. alas, another hurdle.
Dodgy GeezerNovember 23rd, 2007 at 7:48 am
Yeah you can rename it. Just rename it to “whatever.php”. Then in $path_to_script make the file name change in both php files. Offhand I can’t remember if those are the only occurrences of the u.php name but in any case wherever you see u.php just rename it to the new file and that should do it. I like to rename these things too in case someone checking my source code is familiar with the php script.
Dodgy GeezerNovember 30th, 2007 at 8:14 am
Is there anyway that I can set without Required Login but still able to view/post/delete links?
Dodgy GeezerJanuary 9th, 2008 at 7:13 pm
I’m running the script for affiliate sites and the redirect sometimes takes a while due to the affili links being a bit slow.
Is there anyway of displaying text on the u.php while the page loads e.g. “please wait while we take you to the shop” or whatever.
I have been messing around with it but to no avail!
Dodgy GeezerJanuary 23rd, 2008 at 9:21 pm
Hi!
First of all, Harley, thx. for the script.
I have a question about it, though. I’m trying to insert a popunder script into the u.php page. The explanation is simple: I’d like to gain something from the redirect service I’ll provide. So the popunder is supposed to open my site in the background.
The problem is I can’t manage to make it work. I’m not a coder myself so I don’t understand this entirely. When I browse directly to the u.php page, the popunder works very good. But when I enter a redirection url (u.php?13), the popunder doesn’t open.
Harley and any of this script users, if you got any ideas on how to do this, please share it here. We could use some extra visitors, I think.
Thank you!
Btw, this is the popunder script:
//specify URLs to randomly select from and pop-under
var popunder=new Array()
popunder[0]=”http://cafebar.ro/”
//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var
winfeatures=”width=1024,height=768,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0″
//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=0
///No editing beyond here required/////
function get_cookie(Name) {
var search = Name + “=”
var returnvalue = “”;
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(”;”, offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie(’popunder’)==”){
loadpopunder()
document.cookie=”popunder=yes”
}
}
function loadpopunder(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],”",winfeatures)
win2.blur()
window.focus()
}
if (once_per_session==0)
Dodgy Geezerloadpopunder()
else
loadornot()
January 23rd, 2008 at 9:23 pm
Hi!
Dodgy GeezerFirst of all, Harley, thx. for the script.
I have a question about it, though. I’m trying to insert a popunder script into the u.php page. The explanation is simple: I’d like to gain something from the redirect service I’ll provide. So the popunder is supposed to open my site in the background.
The problem is I can’t manage to make it work. I’m not a coder myself so I don’t understand this entirely. When I browse directly to the u.php page, the popunder works very good. But when I enter a redirection url (u.php?13), the popunder doesn’t open.
Harley and any of this script users, if you got any ideas on how to do this, please share it here. We could use some extra visitors, I think.
Thank you!
January 24th, 2008 at 10:49 pm
Hi Danu,
The problem is that in the u.php the redirect is done using PHP as opposed to Javascript. This ensures that every visitor no matter whether they have javascript enabled or not will be redirected. The problem with the php header method is that you can’t have any output before the redirect is called so your pop-under won’t work that way. You could in effect change the header command to a Javascript redirect but then it’ll work for some but not for a growing population of web users who turn off javascript.
I have a suggestion.. pop-unders and pop-ups are pretty much defunct these days since Firefox and IE put in automatic blocking but one thing you could do would be to use the even more defunct method of frames.. just like About.com. It’s quite tasteful and although annoying sometimes it’s much better than popups appearing out of no-where. It would require putting html code into the u.php and simply shifting the php variable. I do custom work for 5 euro an hour if you’re interested but since you seem to know quite a bit yourself you could do a DIY job on it ;)
The Genuine ArticleFebruary 25th, 2008 at 6:40 am
Hi Harley, the redirect in your script returns a 302 code, is this intentional?
Cheers,
Dodgy GeezerG
February 29th, 2008 at 10:15 pm
Hi G,
No its not intentional, the script uses a regular PHP redirect or if you use nice links then an htaccess redirect. If you want to make it a permanent redirect then modify the htaccess code. Strange that you even see these background errors :S
The Genuine ArticleMarch 11th, 2008 at 4:28 pm
Nice script, Harley. Thanks!
Dodgy GeezerMy short URL list is becoming long…
is there way to make listing more compact?
I mean eliminate blank lines in table?
March 22nd, 2008 at 11:14 pm
Nope, I didn’t get it. And I don’t have time to look into it, either.
Dodgy GeezerI’ll gladly pay you if I’d had a paypal or something…
But I don’t, so I guess I’ll have to use it like this. Maybe I find some more complez script like this when I’ll have more time.
Thanks for the info, though!
April 1st, 2008 at 11:39 pm
Me again, with a suggestin, this time.
Dodgy GeezerIf you intend to release new versions of this script, consider adding an option to arange links, in the admin’s page, by the visits they had and by name.
It will help when searching for phishing sites - I’ve found a new entry which got, in 3 days, almost 2000 clicks and when I’ve checked it leaded me to a fake page of some canadian online bank !? I’ve deleted it, of course, but because it was somewhere in the middle of the list I’ve seen it late. If I’d had an option to arrange the columns by clicks I would have seen it from the first place., that’s the ideea.
April 10th, 2008 at 7:08 am
Veeeeerryyyy Goooooddddd….. ;-D
CONGRATULATIONS My friend, this is the best script, you is the best…
Dodgy GeezerApril 10th, 2008 at 10:34 am
Hiya Boulat,
If you know a bit of html you could always open up the script and change the way it displays. Everything is well spaced out in the original to make it quicker to see the individual entries but I can see how that’d be annoying if you have a lot of short URL’s.
The Genuine ArticleApril 10th, 2008 at 10:36 am
Ello Danu,
Will think about your suggestion and also about adding a search box to find links quickly. Pretty much finished school these days so you’d think I’d have more time eh? Yah right. Anyhoo my scripts are all in need of an update..
The Genuine ArticleApril 10th, 2008 at 10:37 am
Grintaci thanks :D nice to have a pleasant comment to wake up to.
The Genuine ArticleApril 10th, 2008 at 7:50 pm
Hiya, Harley!
Dodgy GeezerI’ve managed to do the redirect through a frame…I was having the impresion it will be more complicated… it wasn’t. Anyway, won’t enter the details since you already know how to do it.
However, if you want to implement it into the future releases, this is what I’m using to redirect: http://rapidshare.com/files/106414860/frame_redirect.rar.html . I’ve also found somewhere a simple javascript that can sort the rows (urls, clicks etc.) by name, but I can’t remember the site.
Anyway, I hope it helps you in developing this script. Just keep it small, fast and free :)
Cheers!
April 12th, 2008 at 12:26 am
Hi, m8!
Dodgy GeezerI’ve done the frame redirection. It was easier then I thought. Anyway, this is what I’m using: http://rapidshare.com/files/106414860/frame_redirect.rar.html It displays a frameset, on top one with the banners (customizable size) and the other is the redirected site.
I’m telling you this in case you want to improve the script with this feature. Hope it helps!
Cheers!
April 21st, 2008 at 12:09 pm
This looks great. :D
Dodgy GeezerApril 21st, 2008 at 7:19 pm
Hi Danu,
I’m taking the ordering thing and putting it in the new version. As for frameset well this script can work in all kinds of setups but I’ll never implement a frameset thingy cos it’s very outdated and I personally hate them :D except iframes.. they can be useful on the odd occasion. Anyhoo am collecting data for updates on all my scripts and will be updating.. momentarily.
The Genuine ArticleApril 22nd, 2008 at 5:22 pm
Well, is your script :)
Dodgy GeezerI don’t like frames myself but since I don’t know much php… I’m very happy with what I have now.
Good luck with your scripts!
May 3rd, 2008 at 4:09 pm
Hello,
Does somebody know how can I make it count unique hits (by IP)? I want to count the total number of clicks (as it is now) and the number of unique hosts that visited the address. I don’t know much about MySQL. I will be most grateful, if somebody cares to contribute for the development of this script.
Dodgy GeezerMay 24th, 2008 at 1:24 am
Hey,
I was wondering if it was possible to make the script work without having to login. For example, I would like for visitors to be able to make their urls shorter not just me.
Thanks
Dodgy GeezerJune 12th, 2008 at 2:21 pm
Hi Harley,
I admire your work. But update your shot-url script all url and data show in 1 page only. Try to create 15 or 20 link in 1 page and after this “next page” link show on bottom.
like your beauty you have good hobby. keep smiling…! Ohh Yess
Dodgy GeezerJuly 17th, 2008 at 2:46 pm
hey can u please make it work as batch url shortener i.e we enter 10-15urls and once and we get a 10-15 shorten url’s …please make this
Dodgy Geezer