+ Reply to Thread
Results 1 to 3 of 3

Thread: cUrl problems... :\

  1. #1
    bozidar310196 is offline x10Hosting Member bozidar310196 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    2

    cUrl problems... :\

    Hi! My first post! :D

    Do you see something wrong whit this piece of code?

    function get_url_contents($url){
    $crl = curl_init();
    $timeout = 10;
    curl_setopt ($crl, CURLOPT_URL,$url);
    curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
    $ret = curl_exec($crl);
    curl_close($crl);
    return $ret;
    }

    function getCont($url) {
    if(trim($url)=="")
    return "";
    $dom = new DOMDocument();
    $resp = get_url_contents($url);
    $dom->loadXML($resp);
    }

    problem is that i'm getting something like this:

    Warning: DOMDocument::loadXML() [domdocument.loadxml]: Empty string supplied as input in ...bla

    On my local computer, it works perfectly.... :\

  2. #2
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: cUrl problems... :\

    There's 2 problems with that code.

    1) It's being blocked in our firewall because Content Scraping and Proxies aren't allowed, and
    2) It's been suspended because Content Scraping isn't allowed. The method it's using to obtain the RSS feed is identical to a proxy, but if you read our TOS it explicitly disallows Content Scraping, which is loading an external URL's contents and then parsing its results.

    All that was present on your account was RSS Magnet, which is a Content Scraper with a GUI.


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

  3. #3
    bozidar310196 is offline x10Hosting Member bozidar310196 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    2

    Re: cUrl problems... :\

    wow, ok, sorry for causing troubles! I won't use that code again!

+ Reply to Thread

Similar Threads

  1. Curl
    By cooljaipur in forum Free Hosting
    Replies: 1
    Last Post: 02-06-2010, 09:46 AM
  2. Help me cURL
    By tientrien in forum Free Hosting
    Replies: 3
    Last Post: 03-27-2009, 01:14 PM
  3. cURL problems
    By zemsten in forum Programming Help
    Replies: 4
    Last Post: 03-06-2009, 02:27 AM
  4. curl
    By william232 in forum Free Hosting
    Replies: 1
    Last Post: 10-21-2007, 03:10 PM
  5. curl
    By chongkolai in forum Free Hosting
    Replies: 1
    Last Post: 10-19-2007, 02:02 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