<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/php/tags/php</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 23:22:49 GMT</pubDate>
<item>
<title>(PHP) Update_User_Record - konfeldt</title>
<link>http://snipplr.com/view/71573/updateuserrecord/</link>
<description><![CDATA[ <p>PHP/MySQL  script that update a user record</p> ]]></description>
<pubDate>Wed, 19 Jun 2013 16:56:57 GMT</pubDate>
<guid>http://snipplr.com/view/71573/updateuserrecord/</guid>
</item>
<item>
<title>(PHP) Turn Over Address Components to an Array - devowhippit</title>
<link>http://snipplr.com/view/71379/turn-over-address-components-to-an-array/</link>
<description><![CDATA[ <p>Breaks up an address (in this case returned by Advanced Custom Fields Location plugin) into it's components. Additionally, sorts a multidimensional array of locations alphabetically by state. This works for basic addresses assuming that address is in the format 'street, city, state, zip, country.' I've written a more extensive version of this snippit that uses Google Geocoding to get the address components and store them in a Wordpress database as meta data.</p> ]]></description>
<pubDate>Mon, 03 Jun 2013 10:19:44 GMT</pubDate>
<guid>http://snipplr.com/view/71379/turn-over-address-components-to-an-array/</guid>
</item>
<item>
<title>(PHP) PHP Image Ratio Width &amp;amp; Height, Top &amp;amp; Left - ShawnG</title>
<link>http://snipplr.com/view/71321/php-image-ratio-width--height-top--left/</link>
<description><![CDATA[ <p>Returns array with information like:
Input image
width 200
height 200

     print_r(ratioResize('path/to/image.ext' ,  100 , 50));



output:


     array(
         [ratio] => .5,
         [height] => 50,
         [width] => 50,
         [left] => 25,
         [top] => 25
     );</p> ]]></description>
<pubDate>Wed, 29 May 2013 03:48:55 GMT</pubDate>
<guid>http://snipplr.com/view/71321/php-image-ratio-width--height-top--left/</guid>
</item>
<item>
<title>(PHP) Copy Image From Remote Server To Local - nshakin</title>
<link>http://snipplr.com/view/71229/copy-image-from-remote-server-to-local/</link>
<description><![CDATA[ <p>PHP function to save an image from a remote source then download it to the local server that the script is on.</p> ]]></description>
<pubDate>Sat, 18 May 2013 10:49:57 GMT</pubDate>
<guid>http://snipplr.com/view/71229/copy-image-from-remote-server-to-local/</guid>
</item>
<item>
<title>(PHP) Wordpress Remove Admin Menu Items - oneupdzn</title>
<link>http://snipplr.com/view/71073/wordpress-remove-admin-menu-items/</link>
<description><![CDATA[ <p>Remove top level menus and sub menus from the admin menu.</p> ]]></description>
<pubDate>Tue, 07 May 2013 11:17:44 GMT</pubDate>
<guid>http://snipplr.com/view/71073/wordpress-remove-admin-menu-items/</guid>
</item>
<item>
<title>(PHP) GM Project 2012 (validate users) - cameronjrc</title>
<link>http://snipplr.com/view/71035/gm-project-2012-validate-users/</link>
<description><![CDATA[ <p>A fast description of an sql cell with comparison and response.</p> ]]></description>
<pubDate>Sat, 04 May 2013 01:31:23 GMT</pubDate>
<guid>http://snipplr.com/view/71035/gm-project-2012-validate-users/</guid>
</item>
<item>
<title>(PHP) GM Project 2012 (mod users) - cameronjrc</title>
<link>http://snipplr.com/view/71034/gm-project-2012-mod-users/</link>
<description><![CDATA[ <p>user modding for a forum based gaming website (file used in password protected directory)</p> ]]></description>
<pubDate>Sat, 04 May 2013 01:24:01 GMT</pubDate>
<guid>http://snipplr.com/view/71034/gm-project-2012-mod-users/</guid>
</item>
<item>
<title>(PHP) Function to detect if the visitor is on an android device - stianlagstad</title>
<link>http://snipplr.com/view/70985/function-to-detect-if-the-visitor-is-on-an-android-device/</link>
<description><![CDATA[ <p>This simple functions scans the user agent for the word "android" and returns true if found. Useful if there's something you only want android visitors to see (or not see).</p> ]]></description>
<pubDate>Tue, 30 Apr 2013 20:33:05 GMT</pubDate>
<guid>http://snipplr.com/view/70985/function-to-detect-if-the-visitor-is-on-an-android-device/</guid>
</item>
<item>
<title>(PHP) Credit card validation in php - satinfo30</title>
<link>http://snipplr.com/view/70984/credit-card-validation-in-php/</link>
<description><![CDATA[ <p>Validate the credit card number is valid or not</p> ]]></description>
<pubDate>Tue, 30 Apr 2013 20:10:28 GMT</pubDate>
<guid>http://snipplr.com/view/70984/credit-card-validation-in-php/</guid>
</item>
<item>
<title>(PHP) Debug Function - tucq88</title>
<link>http://snipplr.com/view/70789/debug-function/</link>
<description><![CDATA[ <p>Use for debug variables in clear way</p> ]]></description>
<pubDate>Mon, 15 Apr 2013 15:07:05 GMT</pubDate>
<guid>http://snipplr.com/view/70789/debug-function/</guid>
</item>
<item>
<title>(PHP) Fast Triangular Numbers - Omnikron13</title>
<link>http://snipplr.com/view/70705/fast-triangular-numbers/</link>
<description><![CDATA[ <p>Explanation of the method used here in the URL.</p> ]]></description>
<pubDate>Mon, 08 Apr 2013 15:50:09 GMT</pubDate>
<guid>http://snipplr.com/view/70705/fast-triangular-numbers/</guid>
</item>
<item>
<title>(PHP) Photoshop overlay blending with opacity in PHP - laurikar</title>
<link>http://snipplr.com/view/70657/photoshop-overlay-blending-with-opacity-in-php/</link>
<description><![CDATA[ <p>This function mimics Photoshop overlay blending by accepting two RGB arrays, one which will be overlayed and one which will overlay. Opacity is optional.</p> ]]></description>
<pubDate>Thu, 04 Apr 2013 21:48:50 GMT</pubDate>
<guid>http://snipplr.com/view/70657/photoshop-overlay-blending-with-opacity-in-php/</guid>
</item>
<item>
<title>(PHP) Enviar notificación SDK facebook php por parte de la aplicacion - serialk89</title>
<link>http://snipplr.com/view/70636/enviar-notificacin-sdk-facebook-php-por-parte-de-la-aplicacion/</link>
<description><![CDATA[ <p>La función del SDKphp de facebook 'notifications' envia una notificación por parte de la aplicación al usuario que quieras (que haya aceptado tu aplicación).</p> ]]></description>
<pubDate>Wed, 03 Apr 2013 03:20:16 GMT</pubDate>
<guid>http://snipplr.com/view/70636/enviar-notificacin-sdk-facebook-php-por-parte-de-la-aplicacion/</guid>
</item>
<item>
<title>(PHP) php timestamp - mortu</title>
<link>http://snipplr.com/view/70499/php-timestamp/</link>
<description><![CDATA[ <p>Timestamp used for files</p> ]]></description>
<pubDate>Fri, 22 Mar 2013 01:01:24 GMT</pubDate>
<guid>http://snipplr.com/view/70499/php-timestamp/</guid>
</item>
<item>
<title>(PHP) Find All Links on a Page - haydin</title>
<link>http://snipplr.com/view/70489/find-all-links-on-a-page/</link>
<description><![CDATA[ <p>Here's the basic principal behind spiders. (ex: Giochi Flash $html = file_get_contents('http://www.example.com');</p> ]]></description>
<pubDate>Wed, 20 Mar 2013 20:33:41 GMT</pubDate>
<guid>http://snipplr.com/view/70489/find-all-links-on-a-page/</guid>
</item>
<item>
<title>(PHP) first letter of lastname php - dego89</title>
<link>http://snipplr.com/view/70416/first-letter-of-lastname-php/</link>
<description><![CDATA[ <p>Get the first char of a lastname in php</p> ]]></description>
<pubDate>Thu, 14 Mar 2013 04:48:00 GMT</pubDate>
<guid>http://snipplr.com/view/70416/first-letter-of-lastname-php/</guid>
</item>
<item>
<title>(PHP) PHP Email Validator – Email MX DNS Record Check - mafhh14</title>
<link>http://snipplr.com/view/70403/php-email-validator--email-mx-dns-record-check/</link>
<description><![CDATA[ <p>Validating an email address is one of the hardest feats on the web. A valid email can be marketing
gold, but an invalid email address is dead weight. Not only does it require a CPU-taxing PHP regular
expression ("/^[A-z0-9\._-]+"."@" . "[A-z0-9][A-z0-9-]*". "(\.[A-z0-9_-]+)*"."\.([A-z]{2,6})$/"),
the regular expression can be useless even after it's validated for format if the domain doesn't
exist. 

A regular expression simply wont do -- we need to think more low-level. What does email at any
domain require? A DNS MX record. Well, PHP provides a great solution to validate that there's a MX
record for the provided email address' domain.</p> ]]></description>
<pubDate>Wed, 13 Mar 2013 19:07:33 GMT</pubDate>
<guid>http://snipplr.com/view/70403/php-email-validator--email-mx-dns-record-check/</guid>
</item>
<item>
<title>(PHP) Lambda function to create XML from Array - abrahamsustaita</title>
<link>http://snipplr.com/view/70278/lambda-function-to-create-xml-from-array/</link>
<description><![CDATA[ <p>This snippet is a lambda function (anonymous function) to create an xml from an array. It uses recursiveness.</p> ]]></description>
<pubDate>Wed, 06 Mar 2013 07:03:26 GMT</pubDate>
<guid>http://snipplr.com/view/70278/lambda-function-to-create-xml-from-array/</guid>
</item>
<item>
<title>(PHP) Doing POST Request by Socket Connection - apphp-snippets</title>
<link>http://snipplr.com/view/70119/doing-post-request-by-socket-connection/</link>
<description><![CDATA[ <p>This example of code shows how to do a simple POST request in PHP to another web server by using a socket connection.</p> ]]></description>
<pubDate>Wed, 27 Feb 2013 20:51:52 GMT</pubDate>
<guid>http://snipplr.com/view/70119/doing-post-request-by-socket-connection/</guid>
</item>
<item>
<title>(PHP) Extbase: Make a (deep) copy of the model - FazzyX</title>
<link>http://snipplr.com/view/70118/extbase-make-a-deep-copy-of-the-model/</link>
<description><![CDATA[ <p>You need a copy of your model and relations (ObjectStorage properties).
In this example there is a model Product with property ProductAddition (1:n relation).</p> ]]></description>
<pubDate>Wed, 27 Feb 2013 20:51:43 GMT</pubDate>
<guid>http://snipplr.com/view/70118/extbase-make-a-deep-copy-of-the-model/</guid>
</item>
</channel>
</rss>