I'm stumbling my way through importing some spreadsheets into Drupal and I can use a php script in a node to import with, but my question is how can an external PHP script access Drupal APIs?

Comments

mlncn’s picture

This is still a good question. I'm interested in both parts of it -- importing spreadsheets (in particular manipulating PayPal's exported CSV for import into CiviCRM) and, separately in my case, using Drupal's login for a different PHP application.

~ben

People Who Give a Damn :: http://pwgd.org/ :: Building the infrastructure of a network for everyone
Agaric Design Collective :: http://AgaricDesign.com/ :: Open Source Web Development

benjamin, Agaric

btmash’s picture

To utilize the api, you might have something like:

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

Which would allow you to use the drupal api - You can take a look at the php files as an example (cron.php, index.php, xmlrpc.php) on how they start off and work from there.