Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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

In reply to Re: Automatic Uploader Script by olus
in thread Automatic Uploader Script by sadarax

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-06-25 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (133 votes). Check out past polls.

    Notices?