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 1924 posted 15 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 1187 posted 15 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 2100 posted 15 years ago by ginoplusio
This script will return the URL for the current page you're on, including category and tag pages.
3 1765 posted 15 years ago by jonhenshaw
I added this code in the ModuleNews.php file on line 310 - 314.
0 1030 posted 15 years ago by kahlil
0 1072 posted 15 years ago by ajbatac
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
0 1093 posted 15 years ago by paulgrenwood
0 1049 posted 15 years ago by paulgrenwood
I've made some changes
2 1044 posted 15 years ago by fetolio
remove multiple spaces and replace with underscore
0 1051 posted 16 years ago by rombob
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
2 1300 posted 16 years ago by Mithun
0 2863 posted 16 years ago by traeregan
gibt die url plus storeview aus, also bspw: http://yourdomain.com/de/
0 982 posted 16 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 1004 posted 16 years ago by jlvallelonga
3 1320 posted 16 years ago by jpsirois
3 1251 posted 16 years ago by cshaiku
Example Running: alphaID(9007199254740989); will return 'PpQXn7COf' and: alphaID('PpQXn7COf', true); will return '9007199254740989' Easy right?
1 1512 posted 16 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 902 posted 16 years ago by iloveitaly
0 1136 posted 16 years ago by iloveitaly
3 1389 posted 16 years ago by smoover
6 1292 posted 16 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 1286 posted 16 years ago by nerdsane
1 966 posted 16 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 1188 posted 16 years ago by kossmoss
2 929 posted 16 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 1461 posted 16 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 1178 posted 16 years ago by nerdsane
Well, not the best one...
1 1161 posted 16 years ago by Sn0opy