When you run your PHP script you get the error:

Fatal error: Call to undefined function curl_init()

This is most likely caused by PHP not having the curl module installed. To fix, you want to run:

sudo apt-get install php5-curl

restart Apache and then check your phpinfo page to verify if this is showing up or not.

http://evolutioncreations.wik.is/Ubuntu/FAQ%27s/PHP/Fatal_error%3a_Call_to_undefined_function_curl_init()