converting php proxy from fopen to curl in hopes of performance gains