Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A basic PHP script that I simply FTP to the server and use to evaluate extensions on the server. I simply supply the extensions I require and the script does the rest of the work.
1
734
posted 15 years ago by fackz
从数æ®åº“ä¸é€‰å‡ºå¤§äºŽ3å°äºŽ13的纯å—æ¯åŸŸå,然åŽè¿›è¡Œè¿‡æ»¤ï¼Œå¾—到åŒæ‹¼åŸŸå。
å¢žåŠ ä¸€ä¸ªæ‹¼éŸ³é¢„åˆ¤æ–,过滤掉å‰ä¸¤ä¸ªå—æ¯ä¸ç¬¦åˆæ‹¼éŸ³è¦æ±‚çš„å—符串。
0
789
posted 15 years ago by zhengrenchi
Simple way to escape string for LIKE statements, useful for searches.
3
743
posted 15 years ago by robv
This example adds tags and categories to the Thesis byline, each on a new line, and with the needed classes to match the other byline items.
The byline is generated in thesis/lib/functions/content_functions.php (v1.4.2 at the time of writing) look...
5
844
posted 15 years ago by kristarella
PHP
Rewrite Drupal's File system paths to remove redundant sites/example.com (alternate settings.php method)
Alternate to <a href="http://snipplr.com/view/133530">this method</a>. Have not yet tested.
In settings.php, put this code:
0
734
posted 15 years ago by zachharkey
closes opened tags in text piece.
original code slightly modified to supress PHP warnings
NOTE: need to fix the order of closing tags to get standards compliance
0
786
posted 15 years ago by kossmoss
Returns last word of a string (words separated by blanks). if string does not have any blanks, it will return the whole string.
1
881
posted 15 years ago by fischkopp
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
1230
posted 15 years ago by tobaco
To convert links on a twitter status to a clickable url. Also convert @ to follow link, and # to search
3
1200
posted 15 years ago by mardix
PHP
Hypo CSV crawler - online banking statements downloader from Hypovereinsbank Munich, Germany using PHP & CURL CLI
updated 2013-04-18!
just replace the XXX fields with your own numbers. Then run this PHP Script from the command line (CLI mode). It will fetch the online statements from Hypovereinsbank direct banking.
The code works by tweaking CURL settings...
0
1520
posted 15 years ago by uioreanu
Instead of one element you can insert multiple at once:
array($element1, $element2, $element3)
1
1083
posted 15 years ago by kurokikaze