I have seen and used some online FTP scripts that allow you to connect to any server. I am in need of one for my school in order for a class I teach to upload to a subdomain I have given them. They can't put FTP on the computers so I need to do it off of my server.
Does anyone know where I could get a decent and safe script for this.
Online Ftp
Started by Spooky, Apr 22 2005 07:40 PM
5 replies to this topic
#1
Posted 22 April 2005 - 07:40 PM
#2
Posted 22 April 2005 - 08:18 PM
You can use IE surely they allow that.
Dunno of others will see if I can hunt one down.
Dunno of others will see if I can hunt one down.
#3
Posted 22 April 2005 - 08:50 PM
Donna, on Apr 22 2005, 10:18 PM, said:
You can use IE surely they allow that.
#4
Posted 24 April 2005 - 09:44 AM
They have removed any features you could think of at my school. I strictly need an online based script that can connect to my server.
#5
Posted 24 April 2005 - 10:54 AM
Here's a php script that should allow you to connect:
I don't know if it works, I just found it on my computer now. You could also try hotscripts.
<html>
<head>
<title>Mirror update</title>
</head>
<body>
<h1>Mirror Update</h1>
<?php
$host = 'ftp.yourdomain.com';
$user = 'user';
$password = passt';
$remotefile = '/remote/file/address';
$localfile = '/local/file/address';
$conn = ftp_connect($host);
if (!$conn)
{
echo 'Could not connect to ftp server!';
exit;
}
echo "Connected to " . $host . ".<br />";
@$result = ftp_login($conn, $user, $pass);
if (!$result)
{
echo "Could not login as " . $user . "<br />";
ftp_quit($conn);
exit;
}
echo "Logged in as " . $user . "<br />";
echo 'Checking file time...<br />';
if (file_exists($localfile))
{
$localtime = filemtime($localfile);
echo 'Local file was last updated ';
echo date('G:i j-M-Y', $localtime);
echo '<br />';
}
else
{
$localtime = 0;
}
$remotetime = ftp_mdtm($conn, $remotefile);
if (!($remotetime >= 0))
{
echo 'Can\'t access remote file time.<br />';
$remotetime = $localtime+1;
}
else
{
echo 'Remote file last updated ';
echo date('G:i j-M-Y', $remotetime);
echo '<br />';
}
if (!($remotetime > $localtime))
{
echo 'Local copy is up to date.<br />';
exit;
}
echo 'Getting your file from server...<br />';
$fp = fopen ($localfile, 'W');
if (!$success = ftp_fget($conn, $fp, $remotefile, FTP_BINARY))
{
echo 'Could not download file';
ftp_quit($conn);
exit;
}
fclose($fp);
echo 'File downloaded';
ftp_quit($conn);
?>
</body>
</html>
I don't know if it works, I just found it on my computer now. You could also try hotscripts.
#6
Posted 24 April 2005 - 12:29 PM
Spooky look on here:
www.hotscripts.com
www.hotscripts.com
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
