You are here:  » Script to import all the feeds

Support Forum



Script to import all the feeds

Submitted by kimarie on Tue, 2011-08-30 13:06 in

Hi

I currently have a feeds.php script that downloads and uploads all the feeds to my folder and I run it through the browser

example {link saved}

It works fine but on the bottom I have

// exec("php /path/to/scripts/import.php @MODIFIED");

But it doesnt work and I have to manually import all the feeds. Is there a problem with that code I have used?

The dailyfeeds.php is in the root folder but the pt installation is in domain.co.uk/shoppping so the import script is in domains.co.uk/shopping/scripts is that the problem? do I need to change the /path/to bit?

This is the code in import.php
{code saved}

Thank you!

Submitted by support on Tue, 2011-08-30 13:13

Hi kimarie,

If...

  // exec("php /path/to/scripts/import.php @MODIFIED");

...is exactly the code in your script then that means that it is commented out which would explain why nothing is imported - normally it would be:

  exec("php /path/to/scripts/import.php @MODIFIED");

Note however that if your script is downloading ALl feeds then it would be more efficient to use @ALL rather than @MODIFIED as the process begins with a TRUNCATE operation which saves the what can be slow DELETE FROM ... WHERE call...

Cheers,
David.
--
PriceTapestry.com

Submitted by kimarie on Tue, 2011-08-30 13:30

Thanks, I've changed the code to @ALL in the feeds.php bit but it still doesnt import. Do I need to change anything in the import.php code

Submitted by support on Tue, 2011-08-30 13:38

Hi kimarie,

Did you remove the // comment characters from the start of the line?

If you're still not sure email me the file and your scripts/import.php and I'll check them out...

Cheers,
David.
--
PriceTapestry.com