[development] Curl-based content generation

Earnie Boyd earnie at users.sourceforge.net
Thu Feb 5 15:45:29 UTC 2009


Quoting Martin Stadler <martin at siarp.de>:

> This cannot be a general approach to add content to an arbitrary  
> Drupal site. Your points are valid and if you need that you need to  
> write a module providing an API or use SQL directly.
>
> What I'm trying to do is writing a very custom one-time script to add 
>  content automatically to a certain site. So I can find out about the 
>  form details once in advance and that should be it. Yes, it may 
> depend  on what modules you have enabled and form details may change 
> even in  minor Drupal versions (security fixes i.e.). I'm aware of 
> that and I'd  adjust my script accordingly in that case.
>
> I just want to know what I need to send to add content to the default 
>  page content type with no modifications for the latest stable Drupal 
> 6  release.
>

I build a node object and pass it to node_save [1] and execute cron 
batch style.

[1] http://api.drupal.org/api/function/node_save

--
Earnie  http://r-feed.com
  Make a Drupal difference and review core patches.

-- http://for-my-kids.com/  -- http://give-me-an-offer.com/



More information about the development mailing list