title: Why 404 error through PHP cURL GET, but works fine in browser?
body: <p>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.</p>
  
  <p>Embarrassingly enough, I'm stuck at the simple step of trying to GET the login page ;)</p>
  
  <p><a href="https://www.stumbleupon.com/login/" rel="nofollow noreferrer">https://www.stumbleupon.com/login/</a> loads fine in my browser</p>
  
  <p>But this PHP code displays a 404 page:</p>
  
  <pre><code>    // 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;
  </code></pre>
  
  <p>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.</p>
  
  <p>Any ideas?</p>