1

I am looking for a way to use an authenticated user session to remotely create content on my Drupal site.

My challenge is a somewhat complex one so please bear with me.

Using the Poster Firefox addon I am able to simulate creating and logging a user onto a Drupal website. The issue now is how to enable a persistent connection. So, using Chrome I login and I detect the session cookie details. I then try to use those cookie details in the Firefox Poster addon interface to remotely create a new node(page) on my drupal site. The objective is for Drupal to report the new remotely created node(page) as authored by my logged-in user on the Chrome browser.

Ultimately, I am trying to figure out the recipe to translate to a program that will serve as the remote client while Drupal is used as a server.

I hope someone can shed some light on this issue for me. Thanks for your time.

PS: The following images show how I am setting the http post header containing the cookie information and the variables Drupal uses to create my remotely created node.

enter image description here

enter image description here

enter image description here

2
  • Have you looked into Drupal's built-in XMLRPC support if you are trying to build a remote service?
    – ldg
    Commented Jun 27, 2011 at 22:41
  • Yes, the entire process is powered by Drupal services.
    – sisko
    Commented Jun 28, 2011 at 7:26

1 Answer 1

1

I suggest you look into the Services Module. The entire concept is based upon 'programmatic remote users' logging into a Drupal site and accessing whatever portion of the 'out of the box' site API you enabled for your remote users to access. Additionally, Services offers a well designed means of creating your own API routines that your selectively expose to different remote users.

The out of the box API calls enable you to create users, nodes, comments, and so on. Most of the basic operations a user can do are available.

Check out: http://drupal.org/node/1070066

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.