system_checks PECL extension proposal

From: Date: Sun, 06 Jun 2004 11:27:05 +0000
Subject: system_checks PECL extension proposal
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-725@lists.php.net to get a copy of this message
Hello Everyone, I have written a new extension which I would like to submit to PECL. If memory serves I already have a PECL account, so I don't know what the procedure is from here. The extension is still a work in progress, but I feel it could use a little peer review to make sure I am not going out in left field on how I am implementing things. Extension Name: system_checks Function names: system_check_mac() (already implemented) system_check_ip() (coming soon) system_check_http_hostname) (coming soon) system_check_hd_serial (coming soon) URL to download: http://www.jeremyjohnstone.com/ext/php_system_checks_extension-0.33.tar.bz2 In case it isn't obvious from the above, the extension provides facilities to positively identify (at least as close as possible) the machine which the script is running on. The system_check_mac() is already implemented and accepts a MAC address in the format of "00:00:00:00:00:00" as it's only parameter. It then returns back a boolean to indicate whether that MAC address belongs to any interface on the local machine. The system_check_ip() and system_check_http_hostname() functions accept no parameters and return back the IP and hostname of the currently running script. They are to be used in place of $_SERVER["SERVER_ADDR"] and $_SERVER["HTTP_HOST"] respectively, since both variables are not reliable for system identification because they can be changed from userland code. The system_check_hd_serial() will take one parameter and search the serial numbers of all the HD's in the system. If a match is found, it will return return back a boolean TRUE, and FALSE otherwise as would be expected. Right now this extension will only work on *nix systems (tested on multiple versions of Linux so far), but I hope to add Windows support with a little help. I have written code which will work for Windows, just need help with integrating it with PHP. I apologize for the long email, but I like to be as thorough as possible. Looking forward to feedback, Jeremy Johnstone

« previous php.pecl.dev (#725) next »