A flexible spider in PHP