Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
0
813
posted 15 years ago by paulgrenwood
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
623
posted 15 years ago by thesislab
Helpful for remembering useful CURLOPT constants. Taken from an example in the php manual comments.
3
941
posted 15 years ago by DrewDouglass
This a simple wrapper for cgi, write in php, use stdin for post, and query_string env, for get
=)
0
665
posted 15 years ago by renatoelias
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
838
posted 15 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
796
posted 15 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
716
posted 15 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
726
posted 15 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
702
posted 15 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
710
posted 15 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
803
posted 15 years ago by scopefragger
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
883
posted 15 years ago by neal_grosskopf
Easy check (:
**UPD**
You can just use [version_compare()](http://ca.php.net/manual/en/function.version-compare.php) function.
1
827
posted 15 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
954
posted 15 years ago by stavelin
This is just a simple function to get the variable without having to worry if its POST or GET, and even allows for a default value to be passed in case the variable was not found.
0
756
posted 15 years ago by mondomondomxcom
PHP
Sending multipart/alternative (text and html both together) email messages from PHP directly via sendmail
sendmail needs to be working and configured properly
uses popen and fputs
0
1217
posted 15 years ago by acosonic
This is a quick & dirty helper for pumping out those annoying little link sharing URLS. I've kept it simple, so all it does is return a URL formatted for a particular service.
To use it, just pass a string of the service name to the helper followe...
1
874
posted 15 years ago by brettbergeron