Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 595
  • Last Modified:

Call to undefined function curl_init() error

I am trying to start building an app with an API that uses XML HTML POST to pass data. I have a test script that runs fine using PHP4 (but i can't use SimpleXML with PHP4) but when i change the PHP version to 5 when i run the script i get the following error:
Fatal error: Call to undefined function curl_init() in H:\myfile\folder\address\apiTester.php on line 10

I'm trying to work out whether this is a problem with the PHP setup at my host or whether the code needs to be different to run PHP5.
0
alex_wareing
Asked:
alex_wareing
  • 3
  • 2
1 Solution
 
rhyspCommented:
My guess would be that your host either doesn't have libcurl or has an old version of it.

http://au2.php.net/manual/en/ref.curl.php

Check with your host that this is available.
0
 
hernst42Commented:
If you get that error curl ist not installed/activated. Check the php.ini and uncomment/add the line
extension=php_curl.dll
0
 
alex_wareingAuthor Commented:
I have spoken to my hosting company and they have told me cURL is not avaliable for PHP5, is there something else i can use to do the job of sending XML via HTTP POST?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
hernst42Commented:
curl is available for php5, but obviously they don't want to install it.Other option is:
http://www.php.net/manual/en/function.fsockopen.php
0
 
alex_wareingAuthor Commented:
Do you know of any begininers tutorials to use fsockopen to send XML data?
0
 
hernst42Commented:
look at the comment of the posted link there you will see enough eamples
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now