Hi there I need some help trying to deal with some external xml files.
At the moment I load the contents of xml files via simplexml, create a temporary table in the database with mysql and output the contents in different ways. The temporary table is created so that different values can be calculated from the values given in the xml files (for comparisons etc). However this temporary table is created every time a user requests the page and the xml files take some time to load which is dependent on the external servers which less than ideal.
I modified the script so that instead of creating a temporary table, it creates a real table in the database, First it checks if the table exists, drops it, and creates a new one when the script is run. it all works perfectly for my requirements.
Now the problem comes when I want this to run every 5 minutes (as an example). I tried to set up a cron jon (I'm on shared hosting) but even through the time was set up right and the command line was set to path of the file from the errors I was getting that it doesn't actually run the php file, but it's more of a command of some sort...I'm no programmer and no nothing about these things.
How can I get my php file to run itself at a set interval?
That's just the problem, I have absolutely no idea about the syntax and nothing seems to work :(
I am trying
"/home/username/public_html/folder/includes/create-table.php >> /dev/null" in the command line. I have also set permissions to 777 otherwise i get a permission denied error. When it executes the file I get the error messages on the email it sends out. It is as if it cannot read php but is reading in unix? I am no programmer, maybe I'm way off the mark here.
line 1: ?: No such file or directory line 2: =: command not found line 3: require_once: command not found line 4: require_once: command not found line 5: require_once: command not found line 8: =DROP table if exists SiteMonitor: command not found line 9: syntax error near unexpected token `$drop' line 9: `$dropTable=mysql_query($drop);'