Archive for March, 2009
Daily system check:
08:12:22 up 35 years, 0:00, 2 siblings, 3 child processes, 1 user, load average: 1.00, 1.00, 1.00
root@terryvalladon> dmesg
HAPPY BIRTHDAY
Yay to me! Another year older and wiser.
May you all have a happy day as well
Till next time, code sexy.
Terry Valladon (The Dirty Troll)
With our last article on debugging PHP with UDP sockets we created a new class able to send debugging information from PHP to a remote netcat client. The limit of the code was that it could only send strings and not arrays or an object. Today we will modify the code to send arrays to our remote listening client.
First, I will show you what happens if we try to send an array using the UDPDEBUG class that we currently have. To do this we will create a very simple array and then attempt to send it.
<?
$ThisWeek = array(1 => 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
require_once("UDPDEBUG_CLASS.php");
$UDPDEBUG = new UDPDEBUG("127.0.0.1", 4545);
$UDPDEBUG->SEND($ThisWeek, 'LOW', TRUE);
?>
This test code results in no useful information other then the fact we are dealing with an array.




