Hi all,
I've just quickly knocked up some code for updating a Twitter account's status without using Twitter's API. Instead it uses curl to log in and post via the Twitter front-end.
Tiny bit of scraping basically, and it means that any status updates appear as "via web" rather than "via API" or "via some random app."
Should be easy enough to grasp the general usage:
The code's pretty rough around the edges, didn't want to spend long on this as it's more for a personal project, but if you want something properly robust it shouldn't take long to put in some decent error handling etc.
Code should be attached, have fun!
I've just quickly knocked up some code for updating a Twitter account's status without using Twitter's API. Instead it uses curl to log in and post via the Twitter front-end.
Tiny bit of scraping basically, and it means that any status updates appear as "via web" rather than "via API" or "via some random app."
Should be easy enough to grasp the general usage:
PHP:
include_once 'twit_parser.class.php';
include_once 'twit_crawler.class.php';
$tc = new Twit_Crawler('username', 'password');
$tc->update_status('hello lovely cows');
The code's pretty rough around the edges, didn't want to spend long on this as it's more for a personal project, but if you want something properly robust it shouldn't take long to put in some decent error handling etc.
Code should be attached, have fun!