I've been trying to login to Tumblr.com using cURL PHP.
I've also captured the right post data from Firefox Addon HTTPFox.
The problem is, when I echo out the value of $login_result only blank page shows up and nothing more than that.
What I want to do with Tumblr can only be done by authenticating yourself and I am not being able to proceed further more.
I am attaching the code. Thank you!
<?php
$ch = curl_init();
$login_url = "https://www.tumblr.com/login";
$post_fields = "user%5Bemail%5D=xxxxx%40gmail.com&user%5Bpassword%5D=xxxxxxxxxx&tumblelog%5Bname%5D=&user%5Bage%5D=&context=no_referer&version=STANDARD&follow=&form_key=%211231444806625%7CTDf9wvG6TTcfiWFiVgzvmI2NCUQ&seen_suggestion=0&used_suggestion=0&used_auto_suggestion=0&about_tumblr_slide=&random_username_suggestions=%5B%22StickyWizardPersona%22%2C%22DarkKidFest%22%2C%22DeliciouslyCyberBouquet%22%2C%22SuperbGoateeUnknown%22%2C%22SeverelyNumberOneEnemy%22%5D";
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$login_result = curl_exec($ch);
?>