Logging into WordPress via PHP/Javascript

I’m currently seeking a solution to logging into WordPress using PHP/Javascript, I have found examples using cURL but none of them seem to be working for me as of right now (and many of the cURL examples are dated 2009 and earlier). I was wondering if anyone had an idea of how to log onto WordPress using PHP, perhaps with an updated cURL example? I am using WordPress version 3.2.1.

Thanks in advance.

Related posts

Leave a Reply

1 comment

  1. As it appears this question has not been answered yet (for 9 months), I’ll state my solution.

    For anyone particularly interested in WordPress’s brute-forced login protocol without the hassle of XMLRPC access:

    <?php
        require_once('path/to/wp-blog-header.php');
        wp_set_current_user($ID, $user_login);
        wp_set_auth_cookie($ID);
        do_action('wp_login', $user_login);
    ?>
    

    Caveat: $user_login is not of particular importance – it is used for setting up the session authentication cookie. It is advised that this be randomized for unique values.