Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 12 13 14 15 16 ... 147
**Example of use:** <a href="http://www.php.net/manual/en/index.php"><img src="<?php echo get_favicon('http://www.php.net/manual/en/index.php') ?>" alt="Favicon" title="See PHP documentation" width="16" height="16" /></a>
0 1229 posted 11 years ago by phpdev
Helps to find out browser version and type your website visitor is using.
0 736 posted 11 years ago by apphp-snippets
This code allows to get the IP address from which the user is viewing the current page.
0 913 posted 11 years ago by apphp-snippets
This is a hook_block_info and hook_block_view template that will allow you to quickly create blocks in a Drupal module. When you use this all you have to do is create a directory "blocks" in the module and then create block.block_name.php in the dire...
0 641 posted 11 years ago by brownrl
Populate Fields from Post Data Add this to functions.php
0 619 posted 11 years ago by paddy1228
Script per copiar els fitxers canviats en una revisió git al servidor remot via sftp, using PHP Secure Communications Library (phpseclib): http://sourceforge.net/projects/phpseclib/. Útil per usar amb 1and1.
0 786 posted 11 years ago by marcniko
The following codes populate the country list into dropdown box based on browser's languages. The country information is getting from geolocation.com
0 735 posted 11 years ago by Hexahow
Check the email validity with filter_var and checkdns
1 718 posted 11 years ago by NaetoH
Checks if two given arrays equal each other as php doesn't have a built in function for this.
0 620 posted 11 years ago by MaxHudson
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix... I did not create this snippet but found it extremely useful so I th...
0 828 posted 11 years ago by tacudtap
For some reason tidy inserts new lines before/after <![CDATA[ content in XML files. Since I like the benefits of a reformatted, readable XML... ... i run tidy first, then remove the spaces before/after the CDATA block:
0 814 posted 11 years ago by iroybot
To keep up on important incidents on your site without having to dig through server logs the alternative can be custom logs.
0 654 posted 11 years ago by COBOLdinosaur
**Example of use:** $bIsConnected = check_internet_connection(); $sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.'; echo $sText;
0 1655 posted 11 years ago by phpdev
Code to verify is PDO extension is installed.
0 1156 posted 11 years ago by avenirer
user authentification
0 583 posted 11 years ago by mortu
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 840 posted 11 years ago by goddess
To set cookie use "cookie('name of your cookie','cookie data','expire date ')" it will set your cookie in the user browser . To get the saved cookie use "cookie('name of your cookie')" it will give you the value of the cookie which you saved in the...
0 612 posted 11 years ago by kameshsoft
This useful function will convert a time in seconds to a time in years, months, weeks, days, and so on.
0 1359 posted 11 years ago by goo
Here is a set of functions that can be very useful: Give this script the url of a webpage, and it will save all images from this page on your server.
1 1338 posted 11 years ago by goo
Izvorni kod za web aplikaciju u kojoj smo implementirali validaciju jednokratne zaporke koju generira uređaj YubiKey.
0 408 posted 11 years ago by DSTG_Kwan
Thanks Dan Gayle. http://www.dangayle.com/import-feeds-wordpress-fetch-feed/
2 959 posted 11 years ago by adambundy
Return true if URL is online.
0 595 posted 11 years ago by goo
Return URL Title. Return URL if any problem.
0 758 posted 11 years ago by goo
Script File launched every 3 minutes to check WebSite status. It uses AWSSDKforPHP library http://docs.amazonwebservices.com/AWSSdkDocsPHP/latest/DeveloperGuide/php-dg-setup.html
0 656 posted 11 years ago by cduquev
Return a pure 10-digit phone number if the number given is 10 digits or 11 digits.
0 1203 posted 11 years ago by chrisvogt
Add an ID to the body tag.
0 642 posted 11 years ago by almendro
Get Current URL Path on Apache / IIS
2 1089 posted 11 years ago by rickygri
javascript image uplaod
0 1732 posted 11 years ago by laxman2021
[register_nav_menus](http://codex.wordpress.org/Function_Reference/register_nav_menus,"register_nav_menus") [wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu") [in_category](http://codex.wordpress.org/Function_Ref...
0 689 posted 11 years ago by hell0world
message alert, javascript alert
0 558 posted 11 years ago by laxman2021
1 ... 12 13 14 15 16 ... 147