Welcome To Snipplr


You searched for: http

Everyone's Recent PHP Snippets



The following are instructions to "re-post" files that have been already been POSTed to your php script. This can help if you want to have a form (with file upload) that POSTs its data to your own script where the text elements can be handled and the...
2 1308 posted 15 years ago by benjaminpearson
This is a simple search function for the [User Groups](http://www.dabbledoo.com/design/docs/User-Groups-Module/) module for ExpressionEngine. It searches groups (names and descriptions) as well as topics and topic replies. It respects group types as...
0 1396 posted 15 years ago by lukemcr
Via: [http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/](http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/)
0 1015 posted 15 years ago by Ateneatech
Socket communication class for DirectAdmin
2 1167 posted 15 years ago by shaunjanssens
I rewrote [this snippet](http://snipplr.com/view/15402/php-password-generator/). Usage: $password1 = new Password; $password2 = new Password; echo '<p>' . $password1->generate() . '</p>'; echo '<p>' . $password2->generate(array('leng...
1 1263 posted 15 years ago by AzizLight
from http://www.w3schools.com/php/php_mail.asp
0 1048 posted 15 years ago by rwczippy
This code allows you to track each step of Magento's One Page Checkout in Google Analytics. I installed it at the bottom of my `checkout/onepage.phtml` template file. Once installed, you can set up a funnel for the following: * `/checkout/onepage/...
0 1027 posted 15 years ago by jdbartlett
Sometimes, the first or last block in a region needs to be styled different than the rest. This solution do this in simple way for Drupal 6. (originaly code from [email protected]: http://drupal.org/node/293188#comment-1282186)
2 1063 posted 15 years ago by Fake
Some valid UTF-8 characters are illegal in XML: http://www.w3.org/TR/REC-xml/#charsets This statement strips them from your strings.
0 2766 posted 15 years ago by jdbartlett
Some times you need to accept some url as input but users seldom add http:// to it, this code will add http:// to the URL if it’s not there.
1 1165 posted 15 years ago by paulgrenwood
This snippet is just an upgrade to the "http://snipplr.com/view/7396/php-file-extension-case-changer/" code. This particular code works on image files... although you can just change this line [if (preg_match("/(jpg|gif|png|bmp)/",$ext)) ] to target...
0 1627 posted 15 years ago by el-artiste
Sometimes you just need to mask a script or reject a user from a page this can be done effortlessly using a single line of code. Header location will allow you to redirect a user quickly and without them having any control over the action. A good...
1 1007 posted 15 years ago by scopefragger
Easy check (: **UPD** You can just use [version_compare()](http://ca.php.net/manual/en/function.version-compare.php) function.
1 1081 posted 15 years ago by kirik
http://code.google.com/p/jquery-jtwitter/ for examples.
2 1183 posted 15 years ago by jonniespratley
gibt die url plus storeview aus, also bspw: http://yourdomain.com/de/
0 935 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 951 posted 15 years ago by jlvallelonga
Include file that contains the array of areacodes and states. **This file is needed for the Areacode Script to work. Script here: http://snipplr.com/view/17339/area-code-lookup-script/
2 928 posted 16 years ago by arnoldb
This simple script will return what state an areacode belongs to. Be sure to get the include file that contains the array here: http://snipplr.com/view/17340/area-code-lookup-script--include-file/
1 1051 posted 16 years ago by arnoldb
Split a string containing HTTP response into a array with HTTP headers and a string with HTTP content
1 1378 posted 16 years ago by touv
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 877 posted 16 years ago by iloveitaly
[Google's "AJAX Libraries API"](http://code.google.com/apis/ajaxlibs/) is great and all, but can slow things down if you're doing a lot of refreshing/cache clearing while debugging. Here's a neat trick: stuff something like this in the `<head>` of yo...
1 1151 posted 16 years ago by jdbartlett
When you have a URL like this http://mysite/newsletters/index/2007 The find('first') method adds the 2007 value as ID parameter WTF!?
0 930 posted 16 years ago by sveggiani
3 979 posted 16 years ago by g0mer
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 1231 posted 16 years ago by nerdsane
1 927 posted 16 years ago by fackz
You can get hostname from script environment - getenv("HTTP_HOST") (?!'.$host.') matches URLs always except local links
0 1024 posted 16 years ago by kossmoss
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 1152 posted 16 years ago by kossmoss
Alternate to <a href="http://snipplr.com/view/133530">this method</a>. Have not yet tested. In settings.php, put this code:
0 974 posted 16 years ago by zachharkey
include this snippet in your sites to force InternetExplorer 8 to display your site like InternetExplorer 7 In summary, IE7 compatibility support looks as follows: IE=7 Display in IE7 Standards mode; Already supported in the IE8 Beta 1 relea...
3 1564 posted 16 years ago by tobaco