Hey I got an arcade script, and it's got almost 2GB of this game pack. I need a PHP server to server script to transfer the file to my server so I can extract it. Does anyone have any code for this? Thanks
<?php set_time_limit('999999999999999); copy('http://site.com/file.zip', 'file.zip') or die("error"); ?> PHP:
Ok so in copy('http://site.com/file.zip', 'file.zip') or die("error"); http://site.com/file.zip is the source, file.zip is the destination? Thanks
Alright thanks. I'm having a lil problem: Parse error: syntax error, unexpected T_STRING in /home/lquid/public_html/lld/mygamescriptgames/copy.php on line 4
I believe for the copy() to work allow_url_fopen must be turned on in php.ini. Some hosts keep it turned off because it can allow remote execution in poorly written scripts.
2 gigs is a lotta data, it might be worth spending an hour writing something decent to transfer it to save time while transferring..... Server A is original, B is new machine, if it were me, I would write a script for server A, that script would descend into the directory with your files in, gather each small file into it's shared memory with gzcompress(file_get_contents()), echo some identifiable data, like original location of the file on server A's hdd relative to the path you started, then echo out the compressed data - the identifiable data and compressed data would be gettin written do the disk on server B as it arrives with a pretty simple curl class that recieves the data and every time an identifiable line comes along it creates that identified location, uncompresses data and writes to the file 1meg at a time - you could compress that 2gb to under 500mb in this way.........