cURL VS. file_get_contets()

In my research for a WooCommerce integration with Billy's Billing, a question popped up in my head:

Which method is fastest, file_get_contents or cURL?

After some further investigation, I came across this post: http://stackoverflow.com/questions/5844299/using-file-get-contents-or-curl which is linking to this answer: http://stackoverflow.com/questions/13004805/file-get-contents-or-curl-in-php/24954327#24954327.

According to the answer, cURL should be 3-10 times faster than file_get_contents(). So even though the file_get_contents() gives a much cleaner and prettier code, what happens behind the scene is more complex. So using cURL should be the best solution to the most problems.

 

ms@morningtrain.dk'

Martin Schadegg Rasch Jensen