Hey, I was wondering if there is any way for a PHP script to create files that are not on the local server. I want to create some text files (mostly logs each month) on my server from Frihost. So, Frihost would make them on my computer (or as I call my server).
I was thinking the PHP FTP command, cause I know that would work but it would have to create multiple files and it would have to input information into the files (they will all be .txt files).
Does anybody know if this is possible? Kind Regards.
Sorry, maybe I should have explained a bit more. I also wanted to log each member (for my site) when they sign up. This is going to be for a backup. I could just backup the database, but I want to learn some PHP by doing this, and I don't want to use MySQL.
My computer does have Apache and PHP, so there is no problem there.
if you can access your apache server from outside you could use $POST to send the file to your pc from the frihost server and then write the file locally.
If not you need an ftp server on your pc. Or you have to create a buffer on the frihost server and get the files each hour or each day or .... I think the easiest way to do this would be some synchronization future from an ftp program.
I really like the post idea, probably because I know how to do posts and create files with them (I hope). I do have a FTP server, as I said, it's FileZilla. I would need it to be instantly, so that's why I think that the post would work perfectly fine.
I don't expect too many people to be registering at the same time, so therefore it should be fine. Anyways, thanks. If anybody has any more ideas please post!
Yes, mahirharoon, this is exactly what I am using, except I forgot about the fwrite which I also need. Thank you very much! This topic can be closed.