error in running script in cron tab

Hi I am running the following script in cron tab:

#!/usr/local/bin/php
<?php
    $handle=fopen('xmlfile.xml',"w");
    $xmlfile=   file_get_contents('http://diur-plus.2me.co.il/xml.aspx');
    fwrite($handle,$xmlfile);
    fclose($handle);
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

And I get the error "No input file specified."
however when I run it manually from the browser: downloadfile.php then it work just well.

What is responsible for the problem in the cron tab?

I mean it does work properly when I send request to the server from my browser, so why the problem during the corn tab?

It is your problem. You don't have an explicit path, just a 'xmlfile.xml', for example.

Your PATH and all of the rest of your environment don't exist in cron unless you specifically ask for them. Create a new script foo.sh, use it in crontab instead of your php script.

. .profile
cd /path/to/where/xmlfile/will/live
# run the existing script here
/path/to/php/phpscript.php