PHP ini file user_agent configuration option

Today I discovered the user_agent php.ini configuration option. Basically it allows you to specify the user agent PHP uses when it sends HTTP requests for files. I was screen scraping some data from Wikipedia (processing URI schemes) and it was replying with a 403 error, presumably because they’ve banned the default PHP user agent. Anyway I just changed my user agent to a copy of my one from Firefox and things started working. Pretty handy option!

How To Set Cron to Run Every 5 Minutes

Thanks to this handy document How To Set Cron to Run Every 5 Minutes I now my crontab configured so that my jj5-test repo gets updated every five minutes. It’s the sort of thing I generally do in a post-commit hook, but in this case that won’t work owing to the way the servers are configured (the files are in my account and not owned by the www-data user the commit-hook runs as).

So to configure cron I issued the command:

 $ crontab -e

And then to update my svn working copy:

# m h  dom mon dow   command
*/5 * * * * cd /home/jj5/web/test && svn update > /dev/null