Mypapit - phpcode.mypapit.net - Quick PHP Code Tips and Examples
General Information:
Latest News:
Detect Alphabet only string with ctype_alpha 5 Jun 2008 | 03:07 pm
There are times when you need a function that can detect strings which contains onlyalphabetic characters. While is_numeric can validate a given string contains numeric character, there are no is_* fu...
How to Truncate table in SQLite database 4 Jun 2008 | 10:09 pm
I found out that truncating SQLite database is a little bit different from its MySQL counterpart. Here's how to truncate SQLite database from command line PLAIN TEXT CODE: sqlite your_database.db ...
Quick PHP Code is back! 30 Apr 2008 | 04:25 pm
Quick PHP Code is back! So appology for the delays caused due to some unavoidable circumstances. We are no back!
How to solve file_get_contents and file() PHP errors 18 May 2007 | 01:47 pm
file_get_contents() is a function use to read an entire file to a string. It is occasionally use as a convenient function to retrieve web pages from remote servers in trivial PHP scripts. However, so...
SQL Injection Examples (Cheatsheet) 16 May 2007 | 11:19 pm
If you're writing web application that has access to database, then you should be aware that those application are susceptible to SQL Injection attacks which leave information stored in your database ...
Naive Bayesian Tutorial in PHP 16 May 2007 | 04:45 pm
The practitioner of artificial intelligence and machine learning algorithm will recognize Naive Bayesian as one of the technique use to construct intelligent web application. Naive Bayesian is widely ...
Detect ip location, operating system and browser using PHP Detector Library 15 May 2007 | 02:40 pm
I've decided to share my PHP Detector library to the public which I've coded somewhere around 2006. The library does wonders in detecting IP address geo-location, operating system and the type of brow...
How to send e-mail with Attachment with PHP Scripts 15 May 2007 | 12:41 pm
Here's how to send an email with attachment using PHP scripts (via PHPMailer class). PLAIN TEXT CODE: require("phpmailer/class.phpmailer.php"); //**** //PLEASE CHANGE THE SETTINGS HERE !!!! //ch...
PHP: Currency Exchange using XML-RPC client 11 May 2007 | 05:08 am
This is an example PHP code I wrote to demonstrate how to connect to Foxrate Currency Exchange server and retrieve the latest exchange rate. The example uses The Incutio XML-RPC for PHP library. Plea...
OpenTracker – Lean and mean PHP Bittorrent Tracker 10 May 2007 | 03:48 pm
Opentracker is the most simple php bittorrent tracker that I came across. It only requires a single MySQL table to function and it is a fully compliant bittorrent tracker as outlined by Bram Cohen. I...