opendir on a remote site, problem.

Discussion in 'PHP' started by mahmood, Nov 5, 2006.

  1. #1
    I am having some problems with opening a remote directory. I am trying to access a directory on another website of mine but get this error:
    Warning: opendir(http://www.mysite.com): failed to open dir: not implemented in /thepathtomyfile on line 8
    
    PHP:
    Some say I need access to php.ini on the server.

    Can I do something about this error or get a list of files another way?
     
    mahmood, Nov 5, 2006 IP
  2. hanji

    hanji Peon

    Messages:
    612
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Does the web address you're specifying allow for directory listing? According to the documentation, you need to have a directory listing.

    You may want to look at url_fopen() as well.

    hanji
     
    hanji, Nov 5, 2006 IP
  3. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Both sites are mine, can I give directory listing permission to the folder I want?
     
    mahmood, Nov 6, 2006 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    You can also use FTP.

    php.net/ftp
     
    nico_swd, Nov 6, 2006 IP
  5. hanji

    hanji Peon

    Messages:
    612
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It depends if you have the ability to make adjustments to the apache configuration. You can try with .htaccess file in that directory

    I think this configuration option do it, assuming that you don't have a default document in the directory:

    Options Indexes
    Code (markup):
    HTH
    hanji
     
    hanji, Nov 6, 2006 IP
  6. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #6
    are they hosted on the same server? if so you really shouldn't be doing it this way.

    if they're not on the same server or in the same datacenter, you could always mount the volume using NFS and access it that way. you'd likely need root access to do this though, not sure if you have it or not.
     
    disgust, Nov 6, 2006 IP