Hi
sadarax
I downloaded the API for PHP and look into the source.
It seems that all you need to do is generate an API key and secret key in your DivShare welcome page.
With those in hand you can use LWP (or WWW::Mechanize, but I don't know this module) to post a request to:
http://www.divshare.com/api/?method=login&api_key=API-KEY&user_email=Y
+OUR_EMAIL&user_password=YOUR_PASSORD
The server will respond with an XML that will have your SESSION_KEY.
Then, from the API documentation, you must request for an UPLOAD_TICKET. Another post:
http://www.divshare.com/api/?method=get_upload_ticket&api_key=API-KEY&
+api_session_key=SESSION_KEY&api_sig=
Parse the XML for the upload ticket and build the form as shown in http://www.divshare.com/integrate/api#uploading
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.