Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged url



Many scripts rely on `$_SERVER[SCRIPT_URL]` which is sometimes missing. This function detects it from other server variables and fixes the missing field.
1 1584 posted 14 years ago by drwitt
This is how to use the $sf_request in a view to build the current base url, including the application file used to build the script.
0 893 posted 14 years ago by cburyta
The first function make short urls. The second function decode a short url with CURL. It gets the http header of the short url page. If the header contains a "Location:" header, then it's a redirect, and the decoded url is the url in the "Location"...
1 1629 posted 14 years ago by ginoplusio
This script will return the URL for the current page you're on, including category and tag pages.
3 1373 posted 14 years ago by jonhenshaw
I added this code in the ModuleNews.php file on line 310 - 314.
0 714 posted 15 years ago by kahlil
0 796 posted 15 years ago by ajbatac
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
0 807 posted 15 years ago by paulgrenwood
I've made some changes
2 741 posted 15 years ago by fetolio
remove multiple spaces and replace with underscore
0 756 posted 15 years ago by rombob
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
2 927 posted 15 years ago by Mithun
0 1946 posted 15 years ago by traeregan
gibt die url plus storeview aus, also bspw: http://yourdomain.com/de/
0 688 posted 15 years ago by nico65
this function formats a web address for use in a link.<br> echo formatWebAddress("google.com");<br> http://www.google.com/
1 718 posted 15 years ago by jlvallelonga
3 988 posted 15 years ago by jpsirois
3 907 posted 15 years ago by cshaiku
Example Running: alphaID(9007199254740989); will return 'PpQXn7COf' and: alphaID('PpQXn7COf', true); will return '9007199254740989' Easy right?
1 1133 posted 15 years ago by localhorst
this function processes a URL that 'should' be a full url (i.e. http://something.com/dfsdfs/) and makes sure it contains http:// for easy inclusion as a link into a href attribute
0 660 posted 15 years ago by iloveitaly
0 827 posted 15 years ago by iloveitaly
3 1045 posted 15 years ago by smoover
6 909 posted 15 years ago by bgriffiths
this is how to automatically get short urls for your blog posts in wordpress, What you need is to decide which tinyurl service you will be using and get its api URL, for example rinyurl.com , bit,ly, tr.im, here are the api URLS for the mo...
0 898 posted 15 years ago by nerdsane
1 683 posted 15 years ago by fackz
Affects <A> tags for links starting with $link Example: LinkReplacer ($text, 'http://www.snipplr.com') affects to <a href="http://www.snipplr.com">Snipplr</a> and <a href="http://www.snipplr.com/blog">Snipplr Blog</a>
0 866 posted 15 years ago by kossmoss
2 688 posted 15 years ago by blubadger
Alternative to [http://snipplr.com/view/12616/strip-url-to-its-domain-name/](http://snipplr.com/view/12616/strip-url-to-its-domain-name/, "this snippet"), as it didn't come out clearly in the comments. Update - Edited based on gdvickery's commen...
3 1115 posted 15 years ago by duniyadnd
Is.Gd is a URL-shortening service much like TinyURL. Using PHP’s cURL library, you can create shortened URLs on the fly with ease. “is.gd” is much shorter than “tinyurl.com” so if you need the URL to be as short as possible, use this method...
0 769 posted 15 years ago by nerdsane
Well, not the best one...
1 802 posted 15 years ago by Sn0opy