Welcome To Snipplr


Everyone's Recent Snippets Tagged php



1 ... 43 44 45 46 47 ... 64
This code will create a human readable string that will look more close to dictionary words, useful for captchas.
0 4055 posted 16 years ago by paulgrenwood
This function will fetch the real IP address of the user even if he is behind a proxy server.
0 1337 posted 16 years ago by paulgrenwood
If you don’t need human readable string, then use this function instead, which will create a random string you can use for user id’s etc.
1 1345 posted 16 years ago by paulgrenwood
Provide files to the user by forcing them to download.
0 1531 posted 16 years ago by paulgrenwood
With this snippet, you can encode any email address into HTML entities so that spam bots do not find it.
0 1267 posted 16 years ago by paulgrenwood
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
0 1396 posted 16 years ago by paulgrenwood
0 1300 posted 16 years ago by paulgrenwood
0 1053 posted 16 years ago by gpupo
One drawback: Removal of button leaves a small indent in first line of paragraph, probably an element:style DIV. Don't yet know how to get rid of that.
1 1062 posted 16 years ago by thesislab
Helpful for remembering useful CURLOPT constants. Taken from an example in the php manual comments.
3 1552 posted 16 years ago by DrewDouglass
This a simple wrapper for cgi, write in php, use stdin for post, and query_string env, for get =)
0 1089 posted 16 years ago by renatoelias
0 1625 posted 16 years ago by optimiseweb
2 1639 posted 16 years ago by JREAM
i know these regex stuff is rather slow, but still i like having slim documents. (don't forget to use gzip compression on all text docs)
3 1545 posted 16 years ago by iroybot
This code is not made by me : But it was used for one of my projects. This code scans for all png files in a directory and creates a 100x100 thumbnail and moves it into a specified directory. :.INCLUDES A DATA TEXT CODE WHICH PUTS THE NAMES OF ALL...
2 1279 posted 16 years ago by brandonio21
This code is not made by me : But it was used for one of my projects. This code scans for all jpeg files in a directory and creates a 100x100 thumbnail and moves it into a specified directory. :.INCLUDES A DATA TEXT CODE WHICH PUTS THE NAMES OF A...
3 1269 posted 16 years ago by brandonio21
This code is not made by me : But it was used for one of my projects. This code scans for all gif files in a directory and creates a 100x100 thumbnail and moves it into a specified directory. :.INCLUDES A DATA TEXT CODE WHICH PUTS THE NAMES OF AL...
2 1355 posted 16 years ago by brandonio21
This function will add soft hyphens after every 3rd character in words of over 10 characters. It will not leave fewer than three characters following a soft hyphen. Known bugs: Adds soft hyphens to URLs and within HTML tags.
0 1202 posted 16 years ago by DaveChild
Code explains itself. I plan to do a lot more work on it - just wanted to throw it up here for a little sharing. Feel free to take it to the next level.
1 1199 posted 16 years ago by brettbergeron
Ever wanted to give your cliant an idear on how much disk space they have remaining? The following script will tell your user how much disk space has been used and how much is remaining. In this example $diskspace refers the amount of diskspace you...
1 1425 posted 16 years ago by scopefragger
5 1778 posted 16 years ago by iTony
Display the number of people following you on Twitter using this custom Twitter badge. The code simply returns a number so you can style it however you like.
1 1474 posted 16 years ago by neal_grosskopf
0 1479 posted 16 years ago by iloveitaly
0 1092 posted 16 years ago by iloveitaly
Easy check (: **UPD** You can just use [version_compare()](http://ca.php.net/manual/en/function.version-compare.php) function.
1 1345 posted 16 years ago by kirik
This is the Aidan Lister PHP countdown, translated for use in Norway. No more 133 days untill christmas, but insted 3 months and 3 weeks.
0 1525 posted 16 years ago by stavelin
1 ... 43 44 45 46 47 ... 64