[development] Back to Curl-based content generation

Earnie Boyd earnie at users.sourceforge.net
Thu Feb 19 12:23:29 UTC 2009


Quoting "M. Fioretti" <mfioretti at nexaima.net>:

> On Thu, Feb 19, 2009 13:04:56 PM +0200, Cog Rusty wrote:
>
>> Maybe I lost some part of this discussion, but I wonder: Why would
>> you need any kind of server or PHP on your desktop to work with a
>> remote Drupal web site?
>
> because I want to add nodes from the command line at my desktop, for
> reasons not really relevant here (in short, it would integrate much,
> much better with my own, already existing document
> management/publishing/backup flow)...
>

I add nodes to my site via a php script executed in batch.  The script 
creates a node object and calls node_save().  No curl needed.  Do you 
control the remote Drupal system?

> ...but, when I asked info to write my own bash/curl script to do this,
> many members of this list simply answered saying "install this or that
> drupal module or php library on the server" :-)
>

Well, that is how we modify Drupal you know.  You create a module to do 
this or that.

>> Are you talking about putting together a CLI web browser?
>
> No, just an http client, ie a shell script which sends to Drupal the
> same HTML code that a real browser would transmit when I add a node by
> hand, via keyboard and mouse. The web is full of scripts like this,
> but doing it to drupal seems much harder/undocumented than in other
> cases.
>

Undocumented because it is out of the norm.  I suggest you create a php 
script for the server side that will create the node object and do the 
node_save().  Then create a curl script on the client side that will 
fill the post data for the server script.

--
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