Jump to content

Retrieve text from webpage, use in script?


msing

Recommended Posts

Hi, I'm looking to make a simple image gallery script. Displaying the images and other info is not a problem, but I'm looking to gather the names of the images from a list that is hosted on a different server.

 

For example the list is located at http://www.site1.com/list.txt and is a simple one-name-per-line list of image names. The gallery script is located at http://www.site2.com/gallery.php and reads each image name from the list, and displays the appropriate images (which are hosted at site2).

 

What would be the easiest way to do this? Basically, in summary I need to stick strings from a remotely-hosted txt file into an array.

 

I know I could simply ftp or wget the file and the read from it, but I was hoping to avoid worrying about the permissions and whatnot of dealing with actual files.

 

Thanks

== Matt

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.