Thank you for pointing me into right direction. I still have problems - here is my code:
$dbh=mysql_connect ("localhost", "xxx", "xxx") or die ('I cannot connect to the database because: ' . mysql_error());
$sql1 = "TRUNCATE TABLE sometable";
$sql2 = "LOAD DATA INFILE '/home/my_host/public_html/folder/test.txt' INTO TABLE sometable FIELDS TERMINATED BY '\\t' LINES TERMINATED BY '\\r\\n' IGNORE 1 LINES";
mysql_query($sql1) or die ('I can not empty the 4closures table.');
mysql_query($sql2) or die ('I can not insert data into 4closures table.');
The syntax seas to be correct and the main problem in the location of the text file. Would you please tell me what path I should use - I tried everything.. may be there is something else.. I tried importing manually through phpMyAdmin and it is successful, also it generated SQL and PHP code that I took for base, the only difference that in the phpMyAdmin I uploaded file form my hard drive and in the script I want it to be off the same site.
Thank you for your help.