Getting file names on another server with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roger

    Getting file names on another server with PHP

    My ISP provides me with minimal space on a dedicated server running
    PHP, and 250MB on a separate HTTP server.

    I'm trying to make a gallery using PHP. The script is held on the PHP
    server, and the thumbnails and images are on the separate HTTP server.
    Ideally I'd like to be able to get a listing of the contents of the
    HTTP server where the images are stored. I want to do this so that
    when I add/delete/change images, the dynamic nature of the site just
    picks up the new files and I don't have to maintain a separate
    database of the image names and where they're stored.

    Any help would be gratefully received.

  • Christian Fersch

    #2
    Re: Getting file names on another server with PHP

    Roger wrote:[color=blue]
    > My ISP provides me with minimal space on a dedicated server running
    > PHP, and 250MB on a separate HTTP server.
    >
    > I'm trying to make a gallery using PHP. The script is held on the PHP
    > server, and the thumbnails and images are on the separate HTTP server.
    > Ideally I'd like to be able to get a listing of the contents of the
    > HTTP server where the images are stored. I want to do this so that
    > when I add/delete/change images, the dynamic nature of the site just
    > picks up the new files and I don't have to maintain a separate
    > database of the image names and where they're stored.[/color]

    Use the FTP-access to list the files.

    greetings, Christian

    Comment

    • Guest's Avatar

      #3
      Re: Getting file names on another server with PHP

      > Ideally I'd like to be able to get a listing of the contents of the[color=blue]
      > HTTP server where the images are stored. I want to do this so that[/color]

      The best solution is try to have your ISP share out the partition. This way
      you essentially can access the directory of images over the network.

      If this is not an option, what you will do is simple. Create a script on the
      machine that holds the images. It will list the directory contents and
      return a textual list or a serialized object / array. You will access the
      script by way of http.

      --Wil


      Comment

      Working...