a_bertrand Posted August 24, 2012 Share Posted August 24, 2012 I was wonder, what if you could ask the nw-engine.com to upload directly the free or a paid version of the engine to your own website? So you would provide your site name, username & password, and a directory where it should go. Then the site will act as an FTP client and upload the script for you directly on the right place. That could help people to install it, without having first to download and then upload it back to some server. Maybe I'm going way too far on the lazy road... but I thought I shall share my madness with you :p Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted August 24, 2012 Share Posted August 24, 2012 There is a limit on how much you should do for people. Well free? no. I dont know of any site that offer such without payment. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted August 24, 2012 Author Share Posted August 24, 2012 It's not because the others don't do it for free that I cannot ;) Think about the first time you saw free hosting or free hotspots. Maybe you thought those guys are stupid... yet you find those more and more. BTW it's not a manual process. I will NOT upload the files for you for free... Simply write some scripts which do it. So you will simply use the service but not a human powered one. I'm not totally masochist either! So if there is a script which does it, why shall I make it pay? Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted August 24, 2012 Share Posted August 24, 2012 Yeah i kinda figured it would be automated however is it getting beyond lazy? Also there is people here that dont even know what FTP is or how to create a FTP account as they use file uploading from their control panel. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted August 24, 2012 Author Share Posted August 24, 2012 True, but they do get the info from their registration mail ;) Quote Link to comment Share on other sites More sharing options...
HauntedDawg Posted August 24, 2012 Share Posted August 24, 2012 I've seen such a system on sucuri.net and a couple other web app's. You purchase their product, you either download or provide an FTP username/password and directory, it will set it up and install it for the client. So yes, defiantly an approach ahead. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted August 24, 2012 Share Posted August 24, 2012 You've already got the self extracting part down (I think I recall seeing this previously), so I doubt it'd be worth putting in the effort to do this. Like Ruler said, most people just upload using the file manager of cPanel (or whatever panel used), in which uploading what you need couldn't be easier (nor is it difficult within a ftp program or however you decided to upload files). Therefore if you did do it, I doubt many if any would actually use this feature. Regardless, it's a neat idea. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 24, 2012 Share Posted August 24, 2012 It's quite overkill. Also, do you really want to be liable for actions on other people's servers? Quote Link to comment Share on other sites More sharing options...
HauntedDawg Posted August 24, 2012 Share Posted August 24, 2012 (edited) It's quite overkill. Also, do you really want to be liable for actions on other people's servers? How is it overkill? It's a better feature for your client's to get their game setup easier for them. The below script took me a mere 8 - 14 minute's to write, and IT WAS NOT TESTED, but there should not be much error's and anyone would be able to fix them. As Alain already has the extractor script. <?php $user = 'username'; # FTP Username $pass = 'password'; # FTP Password $host = 'ftp.domain.com'; # FTP Host $dir = '/directory'; # FTP Directory $dmn = 'http://domain.com';# Client Domain $local_file['engine'] = 'engine.zip'; $local_file['extractor'] = 'extract.php'; # If we can create a connection, continue. if($con = ftp_connect($host)) { # Created connection! # Now we see if we can login successfully if(ftp_login($con, $user, $pass)) { # Logged in. # Check the directory. if(ftp_chdir($con, '/public_html'.$dir)) { # Directory Exists. # Place the files. if(ftp_put($con, $local_file['engine']) || ftp_put($con, $local_file['extractor'])) { # Files placed. Hit the extractor. $curl = curl_init($dmn.$dir.'/extract.php'); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); $return = curl_exec($curl); curl_close($curl); /* Can check the $return value for an php error notice or the such here. */ echo 'File uploaded & extracted.'; } else { # A file failed to upload. echo 'One of the file\'s failed to upload.'; } } else { # Directory doesnt exist. Make it. if(ftp_mkdir($con, '/public_html'.$dir)) { # Directory Created. # Place the files. if(ftp_put($con, $local_file['engine']) || ftp_put($con, $local_file['extractor'])) { # Files placed. Hit the extractor. $curl = curl_init($dmn.$dir.'/extract.php'); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); $return = curl_exec($curl); curl_close($curl); /* Can check the $return value for an php error notice or the such here. */ echo 'File uploaded & extracted.'; } else { # A file failed to upload. echo 'One of the file\'s failed to upload.'; } } else { # Failed to make directory. echo 'Failed to make directory. Please reassure you have enough permisions.'; } } # Close FTP Connection ftp_close($con); } else { # Issue with login in. echo 'Login failed. Check login details.'; } } else { # Connection to host failed. echo 'Connecting to host failed.'; } ?> Edited August 24, 2012 by HauntedDawg Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 25, 2012 Share Posted August 25, 2012 How is it overkill? It's a better feature for your client's to get their game setup easier for them. The below script took me a mere 8 - 14 minute's to write, and IT WAS NOT TESTED, but there should not be much error's and anyone would be able to fix them. As Alain already has the extractor script. <?php $user = 'username'; # FTP Username $pass = 'password'; # FTP Password $host = 'ftp.domain.com'; # FTP Host $dir = '/directory'; # FTP Directory $dmn = 'http://domain.com';# Client Domain $local_file['engine'] = 'engine.zip'; $local_file['extractor'] = 'extract.php'; # If we can create a connection, continue. if($con = ftp_connect($host)) { # Created connection! # Now we see if we can login successfully if(ftp_login($con, $user, $pass)) { # Logged in. # Check the directory. if(ftp_chdir($con, '/public_html'.$dir)) { # Directory Exists. # Place the files. if(ftp_put($con, $local_file['engine']) || ftp_put($con, $local_file['extractor'])) { # Files placed. Hit the extractor. $curl = curl_init($dmn.$dir.'/extract.php'); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); $return = curl_exec($curl); curl_close($curl); /* Can check the $return value for an php error notice or the such here. */ echo 'File uploaded & extracted.'; } else { # A file failed to upload. echo 'One of the file\'s failed to upload.'; } } else { # Directory doesnt exist. Make it. if(ftp_mkdir($con, '/public_html'.$dir)) { # Directory Created. # Place the files. if(ftp_put($con, $local_file['engine']) || ftp_put($con, $local_file['extractor'])) { # Files placed. Hit the extractor. $curl = curl_init($dmn.$dir.'/extract.php'); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); $return = curl_exec($curl); curl_close($curl); /* Can check the $return value for an php error notice or the such here. */ echo 'File uploaded & extracted.'; } else { # A file failed to upload. echo 'One of the file\'s failed to upload.'; } } else { # Failed to make directory. echo 'Failed to make directory. Please reassure you have enough permisions.'; } } # Close FTP Connection ftp_close($con); } else { # Issue with login in. echo 'Login failed. Check login details.'; } } else { # Connection to host failed. echo 'Connecting to host failed.'; } ?> Dude, that's like saying "screw you" in the face of your clients. Plaintext authentication is really, really bad. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted August 25, 2012 Author Share Posted August 25, 2012 Well FTP is not really the safest protocol in my book unless use use sftp ;) Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 25, 2012 Share Posted August 25, 2012 Well FTP is not really the safest protocol in my book unless use use sftp ;) Yea, but what about people on a shared hosting plan? I doubt they have unrestricted access to their SSH daemon. Quote Link to comment Share on other sites More sharing options...
HauntedDawg Posted August 25, 2012 Share Posted August 25, 2012 @ Spud: That was merely an example, dude. If anyone used that for their client's, their first mistake would be they are storing those ftp detail's in the DB as raw data. While on the other hand, you can create your own crypt function to crypt them, and to decrypt them. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 26, 2012 Share Posted August 26, 2012 @ Spud: That was merely an example, dude. If anyone used that for their client's, their first mistake would be they are storing those ftp detail's in the DB as raw data. While on the other hand, you can create your own crypt function to crypt them, and to decrypt them. This sounds like a scamming scheme - why on earth would you store these credentials? Quote Link to comment Share on other sites More sharing options...
HauntedDawg Posted August 26, 2012 Share Posted August 26, 2012 Why do you keep looking at it as a perspective to store those detail's? You can make it a once off transaction, user input's their username & password & directory, it does not store it, you hit go and it does it for you. Beanstalkapp.com use's it, and i know of 8+- people who use their built in deployment. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.