Update maryland_voter.php
authorPatrick McGuire <insidenothing@gmail.com>
Tue, 21 Jul 2020 16:18:58 +0000 (12:18 -0400)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2020 16:18:58 +0000 (12:18 -0400)
api/maryland_voter.php

index cb9d9ca..5ad7743 100644 (file)
@@ -12,6 +12,7 @@ function getPage($url){
   curl_setopt ($curl, CURLOPT_URL, $url);
   curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("McGuire MEPS https://www.md-petition.com/ /%d.0",rand(4,50)));
   curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
+  curl_setopt ($curl, CURLOPT_HEADER, 1);
   curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
   curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, true);
   curl_setopt ($curl, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookie.txt'); // save cookies