Friday, April 16, 2010

Create auto post plurk message status

What is plurk?
A really snazzy site that allows you to showcase the events that make up your life, and follow the events of the people that matter to you, in deliciously digestible short messages called plurks.

(http://www.plurk.com/faq)

To create auto post script you just need two tools:

  1. Cron job

  2. Wget orl curl


These tools is come with most any linux distribution as default  tools.

In this tutorials I will try to explain and focus in wget only.

1. Create very simple script

- Generate and save plurk cookies in file
tnto@ubuntu-linux:~$ wget --save-cookies cookies-plurk.txt --post-data 'nick_name=tnto&password=my_plurk_password_is_weak' https://www.plurk.com/Users/login

- Create single file (auto-post.sh) to load cookies file and send your plurk status message
waktu="Sekarang "$(date)
waktu2=${waktu// /%20}
wget --load-cookies cookies-plurk.txt --post-data "content= "$waktu2" (auto post)〈=en&location=&no_comments=0&qualifier=&uid=5758685" http://www.plurk.com/TimeLine/addPlurk

2. Create scheduling to run your script above

I will create a simple scheduling to running the above simple script every 15 minutes.

tnto@ubuntu-linux#crontab -e

# m h  dom mon dow   command
*/15 * * * * * /home/tnto/auto-post.sh
~
~
~
~
~

4 comments:

  1. Wew,
    create a simple bot using wget combined with crontab.

    nice.
    i've to try it too.. :D

    ReplyDelete
  2. very well, thanks (loh ) hahaha

    ReplyDelete
  3. can u explain me how to create autopost with self php

    ReplyDelete