01.02.2010, 19:03
Hey,
I got this code:
Do I have chmod file with this code?
Is the file is opened safely, and the connection is made safely?
I got this code:
Код:
/*[part of code removed]*/
$conn = ftp_connect("FTP") or die("Sorry!<br />....!");
ftp_login($conn,"LOGIN","PASS");
ftp_get($conn,"file.txt","/remotefile.txt",FTP_ASCII);
$file = "file.txt";
$handle = fopen($file, 'r');
$data = fread($handle, filesize($file));
ftp_close($conn);
if(stristr($data, $keyword) != FALSE)
{
//Send a message
}
else {//Send a message}
fclose($handle);
Is the file is opened safely, and the connection is made safely?

