Tiny PHP Uploader





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »
12
Date Submitted Wed. Aug. 30th, 2006 5:06 AM
Revision 1
Helper dohpaz
Tags entities | HTML | PHP
Comments 2 comments
This function is useful in helping to deter spam bots by obfuscating things such as e-mail addresses and URLs that are displayed on a web page. While it's not 100% fool proof, it does offer some protection.

Example:
$email = html_entitize('foo@baz.org');
/*
Outputs foo@baz.com
*/
21
Date Submitted Thu. Aug. 31st, 2006 1:36 PM
Revision 1
Helper dohpaz
Tags debug | HTML | PHP | Variable
Comments 0 comments
A quick and simple function to dump a variable (array, object, string, int, etc) out into -formatted output for a web browser.

If the variable is an array or an object, you can have it returned into the another variable for later processing (i.e., through templates or e-mail). Due to lack of free time, if the variable is not an array or an object, it will ignore the $return value and print directly to output.

Future revisions will add the above mentioned functionality.
21
Date Submitted Tue. Oct. 24th, 2006 8:13 PM
Revision 1
Helper dohpaz
Tags mysql | mysqli | PHP
Comments 4 comments
If you've ever wanted to build an application that can both find the distance between two zip codes, and find zip codes within a specific radius of another zip code, then this is the snippet for you.

I've tried to build this before using PHP4 and MySQL 4 and have found it to be painfully slow for a one-user connection over a Local Area Network (LAN). So, before you continue reading, I must make it abundantly clear that this method requires PHP 5 and MySQL 5.

This is because in PHP5, we will need the MySQL-Improved interfaces, and in MySQL 5, we will need functions and procedures.

Using functions and procedures in MySQL puts the weight of the calculations on MySQL, where they will run hundreds of times faster than if PHP were to attempt to do the work. In addition, using functions and procedures is still hundreds of times faster than carefully crafted SQL statements (one benchmark took over 10 seconds using a WHERE clause, while the function + procedure method took around .12 seconds--note the dot).

Since I am not a mathematician by trade, I found the necessary calculations using Google.

For the "Great Circle Distance" formula, I used Meridian Word Data's website. For the radius finder, I used another that unfortunately I do not have off the top of my head right now. I will look for it again and repost it for proper accreditation.

For the zip code database, I am using the free zip code database from CFDynamics.

Below, you will find the database and table schema, the functions and procedures, and also a demo PHP script to see all of this put into action. As a courtesy, you may download a dump of this database from my website. It's uncompressed size is 3.4M, and it's compressed size is 537K. The checksum is available here.

Please leave me comments, suggestions, questions, and/or rants about this snippet. I feel this is a very useful bit of code, and hope that others out there may find as much use from it as I will be.
9
Date Submitted Mon. Feb. 20th, 2006 11:22 AM
Revision 2
Beginner elbartoli
Tags connect | display | mysql | PHP
Comments 1 comments
Connect to MySQL db & display result from Table query
5
Date Submitted Tue. Sep. 4th, 2007 2:13 PM
Revision 1
Helper explode
Tags mysql | PHP
Comments 0 comments
I made this script to delete any unneeded files from the server that weren't being used by the database. Of course you can expand this a lot more, but I cut it down a little to put it up here.
5
Date Submitted Tue. Sep. 4th, 2007 3:05 PM
Revision 1
Helper explode
Tags Class | mysql | PHP
Comments 0 comments
This is my MySQL database class that I use for all of my sites. Some included features are:
- Get execution time
- Error reporting (screen and email)
- SQL stats
5
Date Submitted Tue. Sep. 4th, 2007 4:51 PM
Revision 1
Helper explode
Tags Class | error | PHP
Comments 1 comments
A very simple error class that can be pretty handy.
4
Date Submitted Tue. Sep. 4th, 2007 5:21 PM
Revision 1
Helper explode
Tags "credit card" | Class | PHP
Comments 0 comments
This is a simple credit card validation class that you can check for most issues before you process you form through paypal, authorize.net, or anywhere else. This also uses my Simple Error Class, the error class is required for this.
1
Date Submitted Tue. Sep. 4th, 2007 7:28 PM
Revision 1
Helper explode
Tags PHP | Random
Comments 1 comments
This little function does great for passwords, usernames, files, and anything else you need a random string for.
5
Date Submitted Tue. Sep. 4th, 2007 10:24 PM
Revision 1
Helper explode
Tags Email | PHP | regex | Validate
Comments 1 comments
This is a simple function to check if an email is valid or not.
« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »