StumbleUpon recently changed their framework and their API no longer works, so I’m trying to write a PHP script to access my Stumble history.
Embarrassingly enough, I’m stuck at the simple step of trying to GET the login page 😉
https://www.stumbleupon.com/login/ loads fine in my browser
But this PHP code displays a 404 page:
// Vars
$url = "https://www.stumbleupon.com/login/";
$user_agent = "Mozilla/5.0";
// Curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
$response = curl_exec($ch);
echo $response;
I’ve thought maybe they block certain user agents, so I’ve tried the same one my browser is using, but no luck. I’ve also tried running the script from different IPs to eliminate an IP ban issue. I’m really clueless on this one…very odd.
Any ideas?
Try using https://www.stumbleupon.com/login.php instead. The URL you put returns a 404 for me to.