使用php访问ftp服务器上的页面

I have a php file on FTP server called 'file.php'. I need to execute this file and I can do it by visiting page 'www.website.com/file.php'. But I want this to happen automatically and I'm planning to use windows task scheduler, but for task scheduler I need a (.bat) file with script in it to visit that page. Ive tried curl :

$ch = curl_init("http://www.website.com/file.php"); curl_exec($ch);

but it doesn't execute the php file. I need this script located on my local machine What am I doing wrong?