Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 83 84 85 86 87 ... 147
use 'custom_more' as custom field
2 1026 posted 15 years ago by screamwork
Add the following code to the end of the functions.php file. Et voilà !
1 1363 posted 15 years ago by math89
Following our recent work on an [API for Cloudworks](http://freear.org.uk/node/40) I thought I\'d post this simple demo, which uses cURL and json_decode. [Email us](mailto:cloudworks AT open.ac.uk?subject=API) for an API key. (15-24 June 2010.)
0 1005 posted 15 years ago by nfreear
Assumes that the record has a `name` field which represents the name of the location and always has a defined two character `country` field.
0 1244 posted 15 years ago by iloveitaly
Use the facebook api to grab how many \\\'likes\\\' a url has had.
5 2621 posted 15 years ago by dtbaker
Simple piece of PHP to get the contents of a specified tag from an XML file and return it
3 2875 posted 15 years ago by ollie101
On Zend Framework you can add options on Select Element on Form.php or Controller Action, and after you can disable it, on Form.php or Controller.php too.
1 1616 posted 15 years ago by postNuKe
Send SMS via www.smsmatrix.com SMS Gateway using PHP See more examples at <A HREF="http:/www.smsmatrix.com">SMS/Voice/TTS Gateway</a>
0 1129 posted 15 years ago by smsmatrix
1 866 posted 15 years ago by ivorpad
like array_search but compares against a specific key in each element of the array
2 1251 posted 15 years ago by iloveitaly
This code goes into the index.php
1 938 posted 15 years ago by gera3d
Questo snippet modifica la posizione della data del post se questo è più vecchio di trenta giorni dalla data di pubblicazione.
0 947 posted 15 years ago by gavello
This example triggers the admin theme when on any of the user/* pages (login, edit, etc.). Put the name of your admin theme in {admin-theme-name} so there's a safe fallback in case variable_get doesn't find the admin_theme.
0 1020 posted 15 years ago by jonathanpglick
I used to program in classic ASP and would sometimes check if a certain word or letter would be in a string with instr. if instr(haystack, needle)>0 then DO SOMETHING end if If the needle starts on the first position of the haystack, instr...
0 1144 posted 15 years ago by seloh77
0 775 posted 15 years ago by lalaalaaa
This code so for placing images inside the wordpress template.
0 879 posted 15 years ago by gera3d
get custom fields value in wordpress theme
1 1340 posted 15 years ago by maximaker
Display anything based on the time of day
3 1110 posted 15 years ago by vagrantradio
This was used to accomplish a deferent background on a secondary page within the website.
0 929 posted 15 years ago by gera3d
0 1004 posted 15 years ago by karmacode
* Creates thumbnail from image * thumbnail dimensions can be set as parameters * accepts JPG, JPEG, GIF, PNG * preserves transparency for GIF and PNG on thumbnails * call function like this: createthumb(images/original.jpg, thumbs/thumb.j...
3 1265 posted 15 years ago by alessio2
Here's a handy (relatively undocumented) tip. PHP supports the following method of assigning strings (borrowed from Perl)
0 908 posted 15 years ago by Snaver
Save the source provided to /app/view/helpers/timezone_select.php To use the below helper, just put this code into your view: echo $timezoneSelect->select('timezone', 'Please select your timezone', 'Europe/London'); Also, don't forget to...
1 1151 posted 15 years ago by richt
Меня часто спрашивают как с помощью CodeIgniter получить доступ к $_GET параметрам. Для этого нужна всего лишь одна строчка кода в контроллере:...
1 1125 posted 15 years ago by stancox
1 803 posted 15 years ago by jmaties
A source to help you interpreting URLs in plain text as a HTML link. It's an improvement of what was proposed here : http://snipplr.com/view/2371/regex-regular-expression-to-match-a-url/
3 1729 posted 15 years ago by keevkilla
1 ... 83 84 85 86 87 ... 147