Archive for October, 2007

Giving PHP exec() some privilege

Posted: 23rd October 2007 by Grant Perry in PHP

My problem is I and working on a web interface which runs some limit shell command. Some of these normally require root access… And I don’t want to do something silly like force apache to run as root now do I? Provided you have sudo installed (like most distro’s) the following is a good solution [...]

PHP: Parse HTML returning links

Posted: 10th October 2007 by Grant Perry in PHP

My goal was more complex than what’s described here in, but I wanted to share a simple function for returning the links in some HTML (now that I know what I’m doing)… Hopefully someone finds this useful, it was a common question in forums I noticed. Regular expressions are a power tool for working with [...]