<?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/favorites/Scooter/tags/php</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 05:29:31 GMT</pubDate>
<item>
<title>(PHP) date_add - Scooter</title>
<link>http://snipplr.com/view/12944/dateadd/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 09 Mar 2009 23:40:23 GMT</pubDate>
<guid>http://snipplr.com/view/12944/dateadd/</guid>
</item>
<item>
<title>(PHP) OOP ODBC Database Class - Scooter</title>
<link>http://snipplr.com/view/12538/oop-odbc-database-class/</link>
<description><![CDATA[ <p>Similiar to my other database classes (mysql, mysqli, mssql) but converted to use ODBC</p> ]]></description>
<pubDate>Tue, 24 Feb 2009 08:03:34 GMT</pubDate>
<guid>http://snipplr.com/view/12538/oop-odbc-database-class/</guid>
</item>
<item>
<title>(PHP) OOP MSSQL Database Class - Scooter</title>
<link>http://snipplr.com/view/12537/oop-mssql-database-class/</link>
<description><![CDATA[ <p>Similar to my MySQL and MySQLi class but converted to be used with MS SQL</p> ]]></description>
<pubDate>Tue, 24 Feb 2009 08:02:26 GMT</pubDate>
<guid>http://snipplr.com/view/12537/oop-mssql-database-class/</guid>
</item>
<item>
<title>(PHP) Regex ignore html entities but replace any '&amp;amp;' with &amp;amp;amp; - Scooter</title>
<link>http://snipplr.com/view/11315/regex-ignore-html-entities-but-replace-any--with-amp/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 19 Jan 2009 10:54:00 GMT</pubDate>
<guid>http://snipplr.com/view/11315/regex-ignore-html-entities-but-replace-any--with-amp/</guid>
</item>
<item>
<title>(PHP) Life - Scooter</title>
<link>http://snipplr.com/view/11176/life/</link>
<description><![CDATA[ <p>what else can be coded into this "life program"... just a boredom project of mine.</p> ]]></description>
<pubDate>Wed, 14 Jan 2009 12:47:48 GMT</pubDate>
<guid>http://snipplr.com/view/11176/life/</guid>
</item>
<item>
<title>(PHP) Simple PHP Authentication HTTP - Scooter</title>
<link>http://snipplr.com/view/10217/simple-php-authentication-http/</link>
<description><![CDATA[ <p>I thought I would share this simple username password PHP auth script.  It leans on HTTP to secure a page.. not bulletproof but quick and painless.</p> ]]></description>
<pubDate>Wed, 03 Dec 2008 01:57:21 GMT</pubDate>
<guid>http://snipplr.com/view/10217/simple-php-authentication-http/</guid>
</item>
<item>
<title>(PHP) Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS). - Scooter</title>
<link>http://snipplr.com/view/9596/secure-advanced-better-faster-function-for-removestrip-tagsantixss/</link>
<description><![CDATA[ <p>Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS).</p> ]]></description>
<pubDate>Mon, 10 Nov 2008 06:05:16 GMT</pubDate>
<guid>http://snipplr.com/view/9596/secure-advanced-better-faster-function-for-removestrip-tagsantixss/</guid>
</item>
<item>
<title>(PHP) Benchmark function for php - Scooter</title>
<link>http://snipplr.com/view/9270/benchmark-function-for-php/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 26 Oct 2008 18:44:33 GMT</pubDate>
<guid>http://snipplr.com/view/9270/benchmark-function-for-php/</guid>
</item>
<item>
<title>(PHP) Optimize all tables in MySQL database - Scooter</title>
<link>http://snipplr.com/view/9209/optimize-all-tables-in-mysql-database/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 23 Oct 2008 08:59:45 GMT</pubDate>
<guid>http://snipplr.com/view/9209/optimize-all-tables-in-mysql-database/</guid>
</item>
<item>
<title>(PHP) obfuscated query string - Scooter</title>
<link>http://snipplr.com/view/9169/obfuscated-query-string/</link>
<description><![CDATA[ <p>For those sites/scripts that use the GET method a lot to send information from one page to another, you can use this functionality to obfuscate the data so it's not so easily readable by people, helps prevent tampering of data.

Just send the query string to the compressCrypt function and it will return the obfuscated result, for example

$obfuscatedQueryString = compressCrypt("string=asdf&amp;page=2&amp;id=1998");
(a href="search.php?$obfuscatedQueryString")link(/a)

which would turn into: href="eNorLinKzEu3TSxOSVMrSExPtTVSy0yxNbS0tAAAgnoIsA=="

To go back to the original, take the obfuscated string and run it through the other function

$unobfuscated = decompressCrypt($encryptedquerystring);

or

$unobfuscated = decompressCrypt($_SERVER["QUERY_STRING"]);



//update
I just now noticed that the site stripped out the PHP part in the link</p> ]]></description>
<pubDate>Tue, 21 Oct 2008 16:11:38 GMT</pubDate>
<guid>http://snipplr.com/view/9169/obfuscated-query-string/</guid>
</item>
<item>
<title>(PHP) php based access blocking - Scooter</title>
<link>http://snipplr.com/view/8754/php-based-access-blocking/</link>
<description><![CDATA[ <p>Using the code below, you simply include the file in your application like this:

$redirect = true;
include("/www/htdocs/checkBlocked.php");

if $redirect is true, then (if the visitor is blocked), it will automatically redirect them to the URL specified in the script below. If it does not, then it simply returns a boolean true/false if the user is blocked or not (for custom processing) in a variabled called '$blocker_isBlocked'.


To add IP's and/or domains to the blacklist, just add them to the respective arrays where the commented lines are.</p> ]]></description>
<pubDate>Wed, 01 Oct 2008 13:46:48 GMT</pubDate>
<guid>http://snipplr.com/view/8754/php-based-access-blocking/</guid>
</item>
<item>
<title>(PHP) simple security for external included files - Scooter</title>
<link>http://snipplr.com/view/8753/simple-security-for-external-included-files/</link>
<description><![CDATA[ <p>For sites that run on dynamic URL's and file includes, here is a simple technique to use to ensure that an 'include' file isn't hit directly via URL and only runs when included.</p> ]]></description>
<pubDate>Wed, 01 Oct 2008 13:32:10 GMT</pubDate>
<guid>http://snipplr.com/view/8753/simple-security-for-external-included-files/</guid>
</item>
<item>
<title>(PHP) Universal Force File Download - Scooter</title>
<link>http://snipplr.com/view/8752/universal-force-file-download/</link>
<description><![CDATA[ <p>so lets say you saved this script in your document root as "dlFile.php". so it's located at yourdomain.com/dlFile.php

and your files are located at yourdomain.com/files/

then you would link to it like this

href="dlFile.php?filename=podcast1.mp3". If your file is in a subdirectory of /files/ then you'd use

dlFile.php?filename=subDir/filename.jpg

Refer to the comment in the php script to specify the path where the files are stored.</p> ]]></description>
<pubDate>Wed, 01 Oct 2008 13:21:11 GMT</pubDate>
<guid>http://snipplr.com/view/8752/universal-force-file-download/</guid>
</item>
<item>
<title>(PHP) PHP Zip file creation, OOP - Scooter</title>
<link>http://snipplr.com/view/8503/php-zip-file-creation-oop/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 19 Sep 2008 09:58:23 GMT</pubDate>
<guid>http://snipplr.com/view/8503/php-zip-file-creation-oop/</guid>
</item>
<item>
<title>(PHP) xor encrypt/decrypt - Scooter</title>
<link>http://snipplr.com/view/8421/xor-encryptdecrypt/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 16 Sep 2008 08:31:53 GMT</pubDate>
<guid>http://snipplr.com/view/8421/xor-encryptdecrypt/</guid>
</item>
<item>
<title>(PHP) Crypt Class - Scooter</title>
<link>http://snipplr.com/view/8419/crypt-class/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 16 Sep 2008 08:28:34 GMT</pubDate>
<guid>http://snipplr.com/view/8419/crypt-class/</guid>
</item>
<item>
<title>(PHP) OOP MySQL Database Class - Scooter</title>
<link>http://snipplr.com/view/8417/oop-mysql-database-class/</link>
<description><![CDATA[ <p>Simple database class. Run queries, obtain OOP results, etc.</p> ]]></description>
<pubDate>Tue, 16 Sep 2008 08:22:18 GMT</pubDate>
<guid>http://snipplr.com/view/8417/oop-mysql-database-class/</guid>
</item>
</channel>
</rss>