Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 83 84 85 86 87 ... 147
use 'custom_more' as custom field
2 938 posted 14 years ago by screamwork
Add the following code to the end of the functions.php file. Et voilà !
1 1188 posted 14 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 912 posted 14 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 1084 posted 14 years ago by iloveitaly
Use the facebook api to grab how many \\\'likes\\\' a url has had.
5 1788 posted 14 years ago by dtbaker
Simple piece of PHP to get the contents of a specified tag from an XML file and return it
3 1876 posted 14 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 1479 posted 14 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 983 posted 14 years ago by smsmatrix
1 771 posted 14 years ago by ivorpad
like array_search but compares against a specific key in each element of the array
2 1153 posted 14 years ago by iloveitaly
This code goes into the index.php
1 857 posted 14 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 849 posted 14 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 929 posted 14 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 1010 posted 14 years ago by seloh77
0 687 posted 14 years ago by lalaalaaa
This code so for placing images inside the wordpress template.
0 784 posted 14 years ago by gera3d
get custom fields value in wordpress theme
1 1140 posted 14 years ago by maximaker
Display anything based on the time of day
3 999 posted 14 years ago by vagrantradio
This was used to accomplish a deferent background on a secondary page within the website.
0 826 posted 14 years ago by gera3d
0 888 posted 14 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 1049 posted 14 years ago by alessio2
Here's a handy (relatively undocumented) tip. PHP supports the following method of assigning strings (borrowed from Perl)
0 840 posted 14 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 1033 posted 14 years ago by richt
Меня часто спрашивают как с помощью CodeIgniter получить доступ к $_GET параметрам. Для этого нужна всего лишь одна строчка кода в контроллере:...
1 1007 posted 14 years ago by stancox
1 718 posted 14 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 1453 posted 14 years ago by keevkilla
1 ... 83 84 85 86 87 ... 147