Should I use file_get_contents or curl for web service requests?

Posted by Fedor on Stack Overflow See other posts from Stack Overflow or by Fedor
Published on 2010-03-19T16:20:04Z Indexed on 2010/03/19 16:31 UTC
Read the original article Hit count: 138

Filed under:
|

I have a zip code lookup service and I'm worried about any possible timeouts or the server being down.

If I don't get any HTTP Response after 20-25s of the initial request I would want to respond with a JSON signifying it failed:

({ success:0 })

© Stack Overflow or respective owner

Related posts about php

Related posts about web-services