waterfoul 0 Report post Posted October 29, 2005 Currently i have <?phpif($_POST['user']=="" or $_POST['pass']=="" or $_POST['host']=="" or $_POST['root']=="" or !isset($_POST['run'])){ print('<form method=post name=form>'); print('FTP username <input type=\'text\' name=user value=""><br>'); print('FTP password <input type=\'password\' name=pass value=""><br>'); print('FTP Host <input type=\'text\' name=host value=""><br>'); print('FTP Root Directory <input type=\'text\' name=root value=""><br>'); print('<input type=\'hidden\' name=run value="1">'); print('<input type=\'submit\'>');}else{$ftp_server = $_POST['host'];$ftp_user = $_POST['user'];$ftp_pass = $_POST['pass'];$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server please refresh and do not click retry");// try to loginif (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n";} else { echo "Couldn't connect as $ftp_user\n please refresh and do not click retry";}// close the connectionftp_close($conn_id); }?>currently it has a form and after you fill out the form it logs into the ftp with the user pass and server vars. now i need to know how to get a certian file and edit certian lines of it. any ideas? Share this post Link to post Share on other sites
wow 0 Report post Posted October 29, 2005 Currently i have <?phpif($_POST['user']=="" or $_POST['pass']=="" or $_POST['host']=="" or $_POST['root']=="" or !isset($_POST['run'])){ ?print('<form method=post name=form>'); ?print('FTP username <input type=\'text\' name=user value=""><br>'); ?print('FTP password <input type=\'password\' name=pass value=""><br>'); ?print('FTP Host <input type=\'text\' name=host value=""><br>'); ?print('FTP Root Directory <input type=\'text\' name=root value=""><br>'); ?print('<input type=\'hidden\' name=run value="1">'); ?print('<input type=\'submit\'>');}else{$ftp_server = $_POST['host'];$ftp_user = $_POST['user'];$ftp_pass = $_POST['pass'];$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server please refresh and do not click retry");// try to loginif (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { ? echo "Connected as $ftp_user@$ftp_server\n";} else { ? echo "Couldn't connect as $ftp_user\n please refresh and do not click retry";}// close the connectionftp_close($conn_id); ?}?>currently it has a form and after you fill out the form it logs into the ftp with the user pass and server vars. now i need to know how to get a certian file and edit certian lines of it. any ideas? 199248[/snapback] I dont know what file you need to get, but you can edit your php file with notepad. Share this post Link to post Share on other sites
waterfoul 0 Report post Posted October 29, 2005 I dont know what file you need to get, but you can edit your php file with notepad. 199252[/snapback] i want to have a user fill out a form and it edits a vars.php file in places in that file Share this post Link to post Share on other sites
mama_soap 0 Report post Posted October 29, 2005 I am not sure if this will help, but I would suggest looking up the official guide for ideas. You can also try looking up this tutorial .Cheers Share this post Link to post Share on other sites
waterfoul 0 Report post Posted October 29, 2005 I am not sure if this will help, but I would suggest looking up the official guide for ideas. You can also try looking up this tutorial . Cheers 199259[/snapback] only help it did was going to the root dir Share this post Link to post Share on other sites
Spectre 0 Report post Posted October 29, 2005 I would suggest looking up the reference provided. It explains everything you need to know about using the FTP protocol with PHP. There isn't really anything anyone else can tell you that isn't already contained within the official manual, so try reading about some of the functions and features. Share this post Link to post Share on other sites
Regain 0 Report post Posted November 20, 2006 well chnage the parts u hav 2 change basically such as "FTP Username" Share this post Link to post Share on other sites