Is curl something that's not expected to be installed on servers

Posted by Ieyasu Sawada on Programmers See other posts from Programmers or by Ieyasu Sawada
Published on 2013-11-11T03:55:37Z Indexed on 2013/11/11 4:11 UTC
Read the original article Hit count: 239

Filed under:
|
|

Is curl something that's not expected to be installed on servers? I'm working for a small development shop and 99% of the problems that I'm having is regarding curl. Most of the projects that I'm working on involves calling a web API. Most web API's suggests using curl by default since you have to pass in a POST data in the request. Every time I complain to my senior that the server that I'm working on doesn't have curl installed the excuse that I'm always getting is that curl is not needed you can always use file_get_contents.

So the question: is curl something that's not expected to be installed on servers that runs PHP, should I always develop using file_get_contents and not curl? Are there any advantages of using file_get_contents over curl or vise versa?

If it helps, the context here is wordpress plugins, shopify apps, drupal modules and other bits of code that a lot of people can install.

© Programmers or respective owner

Related posts about php

Related posts about web-api