note 6297 deleted from debugger by felipe

From: Date: Sat, 29 Dec 2007 18:16:11 +0000
Subject: note 6297 deleted from debugger by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134147@lists.php.net to get a copy of this message
Note Submitter: cbarnett at crossbeam dot com ---- I'm copying this note from a post I found on Geocrawler. I think Thierry diserves a round of applause for actually posting something useful, so... HooRah!!!! I'm going to add some syntax highlighting to the code to make it cute, and then we'll see. FROM: Thierry Boudet DATE: 12/01/1998 01:35:21 SUBJECT: RE: [PHP3] [php3] get the debug info Rui Barreiros a écrit: > > how can i get the debug info that the php3 sends to port 2000 (in my > case) > ===================================================================== #!/usr/bin/perl -w use Socket; $port = 7869; # PHP debugger my $proto = getprotobyname('tcp'); socket(Server, PF_INET, SOCK_STREAM, $proto) or die "socket: $!"; setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l",1)) or die "setsockopt: $!"; bind(Server, sockaddr_in($port, INADDR_ANY)) or die "bind: $!"; listen(Server, SOMAXCONN); for ( ; $paddr = accept(Client, Server); close Client) { my ($port, $iaddr) = sockaddr_in($paddr); my $name = gethostbyaddr($iaddr, AF_INET); print "------------- $name $port --------"; while (<Client>) { print; } } =====================================================================

« previous php.notes (#134147) next »