Results 1 to 10 of 13
Threaded View
-
28th Oct 2011, 10:05 AM #11Respected MemberWebsite's:
DL4Everything.com Soft2050.inTry this javascript for full page script
Used zpage function too
Create a new file "autoshorten.js" or anything
Add this in that
PHP Code:<!-- Soft2050 -- Auto Link Shortner through javascript
var alfoundlLinks = document.links;
for (var i=0; i<alfoundlLinks.length; i++) {
if (chkcon(shortem, alfoundlLinks[i].href)) {
alfoundlLinks[i].href = varurl + alfoundlLinks[i].href;
}
}
function chkcon(d_list, domain) {
for(var i = 0; i < d_list.length; i++) {
if(domain.toLowerCase().indexOf(d_list[i])>-1){
return true;
}
}
return false;
}
PHP Code:<script language="javascript" type="text/javascript">
var varurl = "http://localhost/index.php?link=";
var shortem = ['mediafire.com','lulzimg.com', 'msn.com', 'megaupload.com', 'rapidshare.com', 'yoursite.com', ];
</script>
Finally, add this at the end of the document (adding at top won;t work)
PHP Code:<script src="autoshorten.js" type="text/javascript"></script>
This should work for lifetalk's code or any other script which can shorten links through $_GET
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Simple Logo Needed
By CammyD in forum Graphics AreaReplies: 6Last Post: 25th May 2012, 07:51 PM -
Needed Simple Link shortenin script full page
By ECW in forum Web Application/Script SupportReplies: 1Last Post: 7th Jan 2012, 03:42 AM -
[Hiring] Coder - Simple Link Checker Script
By viruz99 in forum Completed TransactionsReplies: 4Last Post: 16th Dec 2011, 06:41 PM -
A simple clarification needed
By Funny in forum File Host DiscussionReplies: 2Last Post: 10th Aug 2011, 04:14 PM -
Simple jQuery help needed
By Netguy in forum Web Development AreaReplies: 6Last Post: 4th Jan 2011, 10:20 AM
themaRegister - register to forums...
Version 3.56 released. Open older version (or...