Jump to content


Online Ftp


5 replies to this topic

#1 Spooky

    Rooster

  • Members
  • PipPip
  • 463 posts
  • Gender:Male
  • Location:Littleton, CO
  • Interests:Web Design, Programming, Client Management, Web Hosting, Tutorial Writing

Posted 22 April 2005 - 07:40 PM

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.

#2 Donna

    Retired P2L Queen!

  • P2L Staff
  • PipPipPipPip
  • 12,330 posts
  • Gender:Female
  • Location:B.C Canada

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.

#3 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 22 April 2005 - 08:50 PM

Donna, on Apr 22 2005, 10:18 PM, said:

You can use IE surely they allow that.
I use IE at school, but I have a separate ftp account for it because they monitor EVERYTHING so I don't want them getting into my site files ;)

#4 Spooky

    Rooster

  • Members
  • PipPip
  • 463 posts
  • Gender:Male
  • Location:Littleton, CO
  • Interests:Web Design, Programming, Client Management, Web Hosting, Tutorial Writing

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 adam123

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 2,306 posts
  • Location:London, UK
  • Interests:Programming and stuff.

Posted 24 April 2005 - 10:54 AM

Here's a php script that should allow you to connect:

<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 Donna

    Retired P2L Queen!

  • P2L Staff
  • PipPipPipPip
  • 12,330 posts
  • Gender:Female
  • Location:B.C Canada

Posted 24 April 2005 - 12:29 PM

Spooky look on here:

www.hotscripts.com





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users