php http extension script refinement.