Updated sphinx tool php script