SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    alternative to file()

    Is there an alternative to file() because lots of systems have allow_url_fopen disabled in php.ini.

    Thanks.

  2. #2
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe allow_url_fopen is only for remote files? Is this what you need to use file() for?

    If you DO need to open remote files, you can always use cURL.

  3. #3
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by W1LL View Post
    I believe allow_url_fopen is only for remote files? Is this what you need to use file() for?

    If you DO need to open remote files, you can always use cURL.
    I am using the file() function to open a remote file and get the following error:

    PHP Code:
    file() [function.file]: php_network_getaddressesgetaddrinfo failedName or service not known 
    Does that mean the function is not available on the server or is there some other problem?

  4. #4
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what that message means. I'd try using cURL. It's very easy to use, and there are good examples on PHP.net: http://uk2.php.net/manual/en/curl.examples-basic.php


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •