Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 83 84 85 86 87 ... 147
Add the following code to the end of the functions.php file. Et voilà !
1 905 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 686 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 830 posted 14 years ago by iloveitaly
Use the facebook api to grab how many \\\'likes\\\' a url has had.
5 1501 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 1591 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 1204 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 751 posted 14 years ago by smsmatrix
1 603 posted 14 years ago by ivorpad
like array_search but compares against a specific key in each element of the array
2 902 posted 14 years ago by iloveitaly
This code goes into the index.php
1 680 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 657 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 729 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 739 posted 14 years ago by seloh77
0 518 posted 14 years ago by lalaalaaa
This code so for placing images inside the wordpress template.
0 581 posted 14 years ago by gera3d
get custom fields value in wordpress theme
1 890 posted 14 years ago by maximaker
Display anything based on the time of day
3 784 posted 14 years ago by vagrantradio
This was used to accomplish a deferent background on a secondary page within the website.
0 611 posted 14 years ago by gera3d
0 690 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 803 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 641 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 813 posted 14 years ago by richt
Меня часто спрашивают как с помощью CodeIgniter получить доступ к $_GET параметрам. Для этого нужна всего лишь одна строчка кода в контроллере:...
1 781 posted 14 years ago by stancox
1 544 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 1193 posted 14 years ago by keevkilla
0 665 posted 14 years ago by iloveitaly
1 ... 83 84 85 86 87 ... 147