15 February 2007

Tips: Sending Batch Invitations to Nature-Network.

A few minutes ago, I was looking for an quick method to send batch invitations to join Nature Network to my colleagues. I found a solution using the cURL utility.

  1. Open firefox

  2. log in to Nature Network

  3. the site stores a cookie called '_session_id' on your browser. Open your Cookie Panel: Tools -> Options -> Privacy -> Cookies". Note the value of the cookie _session_id associated to the site network.nature.com

  4. use cURL to send the form.

    curl -L -b '_session_id=THE_VALUE_OF_YOUR_COOKIE' -d 'referral[name]=Name' -d 'referral[email]=nobody.nowhere@mycompagny.com' -d 'referral[message]=this is an invitation to another social network' -d 'commit=send' 'http://network.nature.com/referrals/create?locality='

    the option -L is used to follow any http redirection, -b set a cookie, -d set a key/value from the original html form. You can automatize this process using a simple loop over your addresses.

This solution worked fine at the time I wrote this post.


No comments: