Brought the page retrieval code up to date

Signed-off-by: Stephen Elford <steve@trafficwebsites.co.uk>