+ Reply to Thread
Results 1 to 8 of 8

Thread: Any substitute of cURL?

  1. #1
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Any substitute of cURL?

    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.

  2. #2
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Any substitute of cURL?

    Of course there is, its called fsockopen :P

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  3. #3
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: Any substitute of cURL?

    Thanks. I just found a bunch of PHP network functions by searching for that one.

  4. #4
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Any substitute of cURL?

    Gimme some rep :P

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  5. #5
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: Any substitute of cURL?

    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?

  6. #6
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: Any substitute of cURL?

    Quote Originally Posted by Bryon View Post
    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 by nonsensep; 10-21-2007 at 08:37 PM.

  7. #7
    Sohail's Avatar
    Sohail is offline x10 Spammer Sohail is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    London, UK
    Posts
    3,052

    Re: Any substitute of cURL?

    You have to request PHP version 2. Goto - http://x10hosting.com/account/ and request version 2 from there. If your reason is good enough then you should have it activated for you within 24 hours.

  8. #8
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: Any substitute of cURL?

    That's ok. fsockopen() works just fine.

+ Reply to Thread

Similar Threads

  1. curl
    By william232 in forum Free Hosting
    Replies: 1
    Last Post: 10-21-2007, 03:10 PM
  2. is PHP curl enabled on the Absolut server?
    By LRgraham14 in forum Free Hosting
    Replies: 3
    Last Post: 09-09-2007, 03:12 PM
  3. Curl
    By skulldragon3200 in forum Free Hosting
    Replies: 3
    Last Post: 08-19-2007, 11:46 AM
  4. what is the use of curl function?
    By tychicus in forum Off Topic
    Replies: 1
    Last Post: 09-26-2006, 11:49 AM
  5. About cURL installed on the server
    By kachon in forum Free Hosting
    Replies: 1
    Last Post: 02-18-2006, 10:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers