PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Not sure if this is the right section to post this or not but heres my question
I need to check a file on a server to see if it exists, check the date it was created, and the size of it. It is a separate server from the linux server that i am running my php page from.
Is there a way to code in a username and password so that I can connect to the server and pull the info I need?
If you've got cURL compiled in then you can use a combination of CURLOPT_HEADER and CURLOPT_NOBODY to grab the headers and ignore the body of a request for the file. That should give you enough to figure out if the file exists and how big it is if it's there.