Does anyone know of any code for "cross-site" scripting? I want to access a directory from another site and run the files through a while loop to put them in a mysql database.

This is because my files are one server, and my site is on another. The reasoning for the setup ois that the site can become very slow with the file downloads, and theres also limited space on the server I'm hosting hte pages on.