Skip to main content

Posts

Showing posts from September 18, 2008

Find MAC address of user by PHP

That's a small function that basically parses the arp table and returns the mac address of the client. Be sure to understand the basics of arp, since this script will work only on a linear network, without gateways; i.e.: to be sure that i'm get ting the exact mac address , the client should be connected DIRECTLY to the php server; there can be as many switches and hubs you want, but no natting gateways, no routing should be made thanks to Marcus [riptide@digitaltorque.com] for some hacks on this code function return mac address () { // This code is under the GNU Public Licence // Written by michael_stankiewicz {don't spam} at yahoo {no spam} dot com // Tested only on linux, please report bugs // WARNING: the commands 'which' and 'arp' should be executable // by the apache user; on most linux boxes the default configuration // should work fine // get the arp executable path $location = `which arp`; $location = rtrim($location); // Execute the arp comm...

PHP Coding Standard

The PHP Coding Standard is with permission based on Todd Hoff's C++ Coding Standard. Rewritten for PHP by Fredrik Kristiansen / DB Medialab, Oslo 2000-2003. Using this Standard . If you want to make a local copy of this standard and use it as your own you are perfectly free to do so. Before you start please verify that you have the most recent document . You can also download a this standard as a word document (maintained by Chris Hubbard ). Introduction Standardization is Important It helps if the standard annoys everyone in some way so everyone feels they are on the same playing field. The proposal here has evolved over many projects, many companies, and literally a total of many weeks spent arguing. It is no particular person's style and is certainly open to local amendments. Good Points When a project tries to adhere to common standards a few good things happen: programmers can go into any code and figure ou...

PHP set for enterprise growth

PHP (Hypertext Preprocessor) is moving beyond hobbyist and academic realms and into the enterprise, the CEO of Zend Technologies stressed Tuesday during a keynote presentation at the 2008 Zend/PHP Conference ( ZendCon ) in Santa Clara, Calif. Citing a list of enterprise users of the server-side scripting platform, including Kargo Mobile Technology and Shaklee, Zend CEO Harold Goldberg emphasized PHP growth. PHP has "grown up to be a mainstay enterprise language," he said. PHP is "poised for widespread enterprise adoption," said Goldberg, whose company specializes in PHP tools. "The community, the market, the partners, the ecosystems have never been better," he said. Goldberg offered brief PHP user profiles. Kargo, for example, had been using Java but found it could not expand without adding a lot of hardware. The company decided to redo its entire Web site using...