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 1356 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 723 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 1228 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 1104 posted 14 years ago by jonhenshaw
I added this code in the ModuleNews.php file on line 310 - 314.
0 545 posted 14 years ago by kahlil
0 640 posted 14 years ago by ajbatac
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
0 632 posted 14 years ago by paulgrenwood
I've made some changes
2 606 posted 14 years ago by fetolio
remove multiple spaces and replace with underscore
0 594 posted 14 years ago by rombob
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
2 731 posted 14 years ago by Mithun
0 893 posted 14 years ago by traeregan
gibt die url plus storeview aus, also bspw: http://yourdomain.com/de/
0 521 posted 14 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 571 posted 14 years ago by jlvallelonga
3 765 posted 14 years ago by jpsirois
3 722 posted 14 years ago by cshaiku
Example Running: alphaID(9007199254740989); will return 'PpQXn7COf' and: alphaID('PpQXn7COf', true); will return '9007199254740989' Easy right?
1 885 posted 14 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 502 posted 14 years ago by iloveitaly
0 633 posted 14 years ago by iloveitaly
3 860 posted 14 years ago by smoover
6 723 posted 14 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 706 posted 14 years ago by nerdsane
1 515 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 673 posted 15 years ago by kossmoss
2 539 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 913 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 615 posted 15 years ago by nerdsane
Well, not the best one...
1 634 posted 15 years ago by Sn0opy