Loading src/Strategy/Letterfile/Tools/CurlAccess.php +5 −4 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ class CurlAccess { $this->logger = $logger; $this->archivePath = $archivePath; $this->headers = [ 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15','Referer: http://someaddress.tld','Content-Type: multipart/form-data', ]; if(!empty($token)) { $this->headers[] = 'X-API-Key: ' . $token; Loading Loading @@ -59,7 +56,8 @@ class CurlAccess public function delete($url, array $posted):array{ $this->logger->debug("CURL [delete] $url"); $this->headers[] = 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15'; $this->headers[] = 'Referer: http://someaddress.tld'; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,$url); Loading Loading @@ -112,6 +110,9 @@ class CurlAccess public function post( $url, $post, $documents ):array { $this->logger->debug("CURL [post] $url"); $this->headers[] = 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15'; $this->headers[] = 'Referer: http://someaddress.tld'; $this->headers[] = 'Content-Type: multipart/form-data'; $posted = $post; foreach ($documents as $key=>$path) { $cfile = curl_file_create($path,'application/pdf',$key); Loading Loading
src/Strategy/Letterfile/Tools/CurlAccess.php +5 −4 Original line number Diff line number Diff line Loading @@ -27,9 +27,6 @@ class CurlAccess { $this->logger = $logger; $this->archivePath = $archivePath; $this->headers = [ 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15','Referer: http://someaddress.tld','Content-Type: multipart/form-data', ]; if(!empty($token)) { $this->headers[] = 'X-API-Key: ' . $token; Loading Loading @@ -59,7 +56,8 @@ class CurlAccess public function delete($url, array $posted):array{ $this->logger->debug("CURL [delete] $url"); $this->headers[] = 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15'; $this->headers[] = 'Referer: http://someaddress.tld'; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,$url); Loading Loading @@ -112,6 +110,9 @@ class CurlAccess public function post( $url, $post, $documents ):array { $this->logger->debug("CURL [post] $url"); $this->headers[] = 'User-Agent: Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15'; $this->headers[] = 'Referer: http://someaddress.tld'; $this->headers[] = 'Content-Type: multipart/form-data'; $posted = $post; foreach ($documents as $key=>$path) { $cfile = curl_file_create($path,'application/pdf',$key); Loading