Posts Tagged ‘web’

HTTP GET request in Python

Posted: 28th September 2014 by Tim in Python
Tags: , , , , , ,

There are a number of ways to make a GET request in Python, but the easiest (in my opinion) is via urllib2. With this library, you can make a request with only one line of code, storing the result for use later. For example: import urllib2 data = urllib2.urlopen(“http://timmurphy.org”).read() print “Website size (bytes): ” + […]

If you’re writing a website in PHP, then by each PHP script will time out after a set time (usually 30 seconds by default). If this happen, you’ll see an error like the following: Fatal error: Maximum execution time of 30 seconds exceeded in <file> on line <line> This is a safety feature; if your […]

Adding subdomains in Apache

Posted: 20th August 2009 by Tim in Apache, Ubuntu
Tags: , , , , , , , ,

There are a number of ways to add subdomains in apache, but here is the quickest and most basic way to get it done. This example is for Ubuntu 8.04, but may be used on other flavours of linux if you find the correct paths to the files. Let’s say you have a blog on […]