cURL help

Status
Not open for further replies.

vmbeleme

New Member
Messages
1
Reaction score
0
Points
1
Im new to cURL, but I have a pre-designed script I need to run for my website, how do I access the cURL library? I read something about "/usr/bin/env curl" but how do I then load that to be able to execute my script?

Thanks a lot!
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
I assume by "I have a pre-designed script" the script has steps like -- curl_init --> curl_exec --> curl_close

What - if any - errors do you receive when you run that script ?

cURL should be installed on x10hosting's free-hosting servers

You can use this script to test if cURL is installed on your server...

PHP:
<?php
error_reporting(E_ALL);

// Script to test if the CURL extension is installed on this server

// We use a function to test
function iscurlsupported()
  {
    if  (in_array  ("curl", get_loaded_extensions()))
      {
        return true;
      }
      else
        {
          return false;
        }
  }

/* ### */

if (iscurlsupported())
  {
    print "cURL is supported";
  }
  else
    {
      print "cURL is NOT supported";
    }

?>
 
Status
Not open for further replies.
Top