Hide all error messages PHP
PHP Error messages showing up in your web applications are a dangerous thing. Not only does it look unprofessional, but it is also a serious… Read More »Hide all error messages PHP
PHP Error messages showing up in your web applications are a dangerous thing. Not only does it look unprofessional, but it is also a serious… Read More »Hide all error messages PHP
It is a script which allows clients to make procedural calls over the net. As it says in the name, the encoding is XML and… Read More »What is xmlrpc.php?
Today I will show you a method to stop the traffic that a referrer site is sending your way, you may wonder why you would… Read More »Stop That Referrer in PHP!
If you do not know what the Ternary operator is, or do not use it while you are coding, let me be the first to… Read More »Ternary Operation
Quite often you may need the ability to check what type of data type a variable is. In most programming languages this is possible to… Read More »[Solved] PHP’s typeof – gettype()
In the below example we will use Actionscript 2 to call a remote PHP file that will return data to it.It is a simple way… Read More »Actionscript 2 & PHP Data Transfer
If you would like to show random numbers using PHP you can do this:
The above code does not always send emails in HTML as it should, it turns out there is a PHP Bug (http://bugs.php.net/15841) that comes into… Read More »HTML mail() Sending as Plain Text
Below is a Mail class I created in PHP, it requires 4 arguments on initiation of the class via the constructor and uses the method… Read More »A PHP Mail Class
I just finished adding an export xls (excel) export feature to a web application. I used the PHPExcel Class from CodePlex, its really great to… Read More »PHPExcel Class Usage
I was trying to import a massive csv dataset into phpMyAdmin and it kept throwing error:Invalid field count in csv input on line 1 This… Read More »phpMyAdmin – Invalid field count in csv input on line 1
I think this may be the fastest way to get a list of all the directories in a given folder/directory using PHP. ..and of course,… Read More »Get all directories in PHP
In php there are a few magic constants and I find __FILE__ to be a very useful one. It returns the full path and filename… Read More »What does __FILE__ in php mean?
The default time for a php session is 1440 seconds. You can change it by doing the following: You can obviously adjust the second parameter… Read More »Change PHP Session Time
This script works in all browsers, including Internet Explorer! 🙂
I often have to show a shortened version of a news item and then a link to show the entire news article or whatever. Here’s… Read More »shortText function toggler in php
Ever find yourself typing the headers into the php mail() function over and over again? Try using a standard function and calling it when you… Read More »Send Email PHP Function
When PHP encounters a class that hasn’t been defined yet, you can use __autoload to automatically add them instead of including masses of included at… Read More »PHP __autoload function
If you ever find yourself needing to do some ajax and in turn sending strings of characters via javascript then you should really try encodeURIComponent()… Read More »Sending data from javascript to php
You can use “ucwords()” to uppercase the first character of each word in a string. e.g.
A brilliant version of print_r for actionscript: http://dev.base86.com/solo/47/actionscript_3_equivalent_of_phps_printr.html