Closed Thread
Results 1 to 5 of 5

Thread: Is it not possible to use cURL to access any domain except for the local domain?

  1. #1
    it354example81 is offline x10Hosting Member it354example81 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Question Is it not possible to use cURL to access any domain except for the local domain?

    I am trying to use the cURL library in PHP to access the following URL of a Flickr stream RSS feed:

    http://api.flickr.com/services/feeds...format=rss_200

    It's not working, and as I was searching the forums for an answer as to why this may be, I see that port 80 is blocked for free accounts. Does this mean that there is no way for me to use cURL for external domains?

    Also, I saw one post where a user requested that a site be white-listed. If it is by default blocked, is this possible for flickr.com?

  2. #2
    Skizzerz's Avatar
    Skizzerz is offline Contributors Skizzerz will become famous soon enough
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    2,153

    Re: Is it not possible to use cURL to access any domain except for the local domain?

    Hello,

    That information you found is old, we do not block outgoing connections anymore to the best of my knowledge.
    Can you post the code you are trying to use as well as the exact error message you are receiving?
    Ryan Schmidt | Level 2 Support
    █ 888-X10-9668 - ryan[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  3. #3
    it354example81 is offline x10Hosting Member it354example81 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Re: Is it not possible to use cURL to access any domain except for the local domain?

    Thanks for the response! The simplest code that will lead to a 500 error is:

    Code:
    <?php
    
    $ch = curl_init("http://api.flickr.com/services/feeds/photos_public.gne?id=39102179@N04&lang=en-us&format=rss_200");
    $xml = curl_exec($ch);
    
    ?>
    The exact error is:
    500 Error
    An internal server error has occurred. Please try your request again momentarily.
    • File or directory permissions are set too high: Files should be 0644, directories 0755.
    • Problem with your .htaccess file.
    • A syntax error in a CGI script.
    I have set all file and folder permissions to the requirements (originally some files were left at the default 755 that is given when a new file is created). I haven't touched the .htaccess file and to my knowledge there are no syntax errors in CGI scripts.

    When I replace the url that is being retrieved with that of a local file (eg. "./file.txt") it works fine.
    Last edited by it354example81; 09-28-2011 at 04:02 AM.

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Is it not possible to use cURL to access any domain except for the local domain?

    That code works fine on Chopin.

    Could you go to Error Log in cPanel (not the one in File Manager) and see if there are any messages that might give a clue.
    Nothing is always absolutely so.

  5. #5
    it354example81 is offline x10Hosting Member it354example81 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Re: Is it not possible to use cURL to access any domain except for the local domain?

    There are no errors there in the cPanel Error Log.

    If it helps at all, the page that I'm trying to run the code on is http://it354ex.pcriot.com/index.php . I also tried creating a new page (test.php) and pasting the same code in it, with the same result. Currently, test.php is working because it is calling a local file ("./index.php") with cURL rather than the Flickr feed.

    The server that my site is hosted on is boru.
    Last edited by it354example81; 09-28-2011 at 02:45 PM.

Closed Thread

Similar Threads

  1. cannot access my domain.
    By aleksandras.cx62 in forum Free Hosting
    Replies: 1
    Last Post: 04-25-2011, 11:05 AM
  2. domain access
    By perfectcoder in forum Free Hosting
    Replies: 2
    Last Post: 06-04-2010, 02:00 PM
  3. Replies: 2
    Last Post: 04-02-2010, 08:54 PM
  4. Cannot access CPanel and www.domain.biz OR domain.biz
    By luismonteiro in forum Free Hosting
    Replies: 1
    Last Post: 10-16-2008, 11:42 AM
  5. I cannot access my domain.
    By pvivekk in forum Free Hosting
    Replies: 1
    Last Post: 01-08-2008, 04:13 AM

Tags for this Thread

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