Tag Archives: php

Best PHP 101 Function

I was explaining to a friend the other day how to best debug PHP scripts. There are of course debugging modules that can be bolted in or other specialty IDE tools. However, since this guy was new to the language and to programming in general I figured I would cut all of that out and make it simple and easy. With PHP the alternative is to dump information out to the screen and read it from there. I shared with him my all time favorite, most used, yet simplest PHP function for doing this. It looks something like this: Continue reading

Posted in PHP | Tagged | Leave a comment

PHP Mac Address Validation and Formatting

I have been working on a small php app to perform a network scan and fill a database with the discovered information. The issue is that, depending on what you perform the scan with, the MAC addresses are in a number of different formats. This PHP functions validates a MAC and returns false if its not valid or a variety of formats depending on your needs! If anyone has any thoughts on improving this function feel free to let me know and I will post the updates.

Posted in PHP | Tagged | Leave a comment

Mitel 5000 PHP SMDR Script

You may have read my short writeup about reading SMDR from the Mitel 5000 with a simple PERL script. If not you can see it HERE. This script is basically the same thing but in PHP. You will have to setup PHP to run from the CLI for this to work… I also set the execution time really long and could run it from a web page as well. It was really ugly but this gets the idea out there…

Posted in PHP, Scripts, Telephony | Tagged , | 4 Comments