Any substitute of cURL?

nonsensep

New Member
Messages
39
Reaction score
0
Points
0
I'm trying to make a web api that sends requests to other domains, but since AJAX can't do this alone, I found a PHP script using cURL that could:

Code:
<?php

$url = $_GET["url"];

$session = curl_init($url);

curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

$xml = curl_exec($session);

header("Content-Type: text/xml");

echo $xml;

curl_close($session);

?>

But cURL isn't installed in x10hosting. Since cURL is just a library and not a service like mySQL, I was wondering if there was an alternative way of doing this using just PHP or maybe a library that is installed.
 

nonsensep

New Member
Messages
39
Reaction score
0
Points
0
Thanks. I just found a bunch of PHP network functions by searching for that one.
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
cURL is installed for PHP versions 2 and 3 on all servers.

But cURL isn't installed in x10hosting.

What do you mean that it is not?
 

nonsensep

New Member
Messages
39
Reaction score
0
Points
0
cURL is installed for PHP versions 2 and 3 on all servers.



What do you mean that it is not?


It said that the curl_init was undefined, so I figured it isn't installed.
 
Last edited:
Top