Get a Free Trial
GrabzIt's Online Community

Useragent not set to 'grabzit'?

Ask questions on how to capture or convert web pages or HTML into images, MP4. CSV, PDF or DOCX documents as well on how to convert videos into animated GIF's using our API.

There are no forum posts on this topic! Why don't you write one?

Hi,

We need to identify Grabzit as referer or as useragent. But I don't see any referer in our logs and the useragent is set to a normal browser, and does not have 'grabzit' 

So I made an pdf with the output of php $_SERVER 

array (
'USER' => 'dk',
'HOME' => '***',
'HTTP_ACCEPT_LANGUAGE' => '*,en;q=0.5',
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4104.0 Safari/537.36',
'HTTP_UPGRADE_INSECURE_REQUESTS' => '1',
'HTTP_SEC_FETCH_USER' => '?1',
'HTTP_SEC_FETCH_SITE' => 'same-origin',
'HTTP_SEC_FETCH_MODE' => 'navigate',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_HOST' => '*****',
'SCRIPT_FILENAME' => '******',
'REDIRECT_STATUS' => '200',
'SERVER_NAME' => '****',
'SERVER_PORT' => '443',
'SERVER_ADDR' => '****',
'REMOTE_PORT' => '52588',
'REMOTE_ADDR' => '195.206.181.230',
'SERVER_SOFTWARE' => 'nginx/1.17.9',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'HTTPS' => 'on',
'REQUEST_SCHEME' => 'https',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'DOCUMENT_ROOT' => '****',
'DOCUMENT_URI' => '/****.php',
'REQUEST_URI' => '/****.php',
'SCRIPT_NAME' => '/****.php',
'CONTENT_LENGTH' => '',
'CONTENT_TYPE' => '',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '****',
'PHP_ADMIN_VALUE' => '****',
'DOMAINNAME' => '****',
'FCGI_ROLE' => 'RESPONDER',
'PHP_SELF' => '/****.php',
'REQUEST_TIME_FLOAT' => 1587134704.587993,
'REQUEST_TIME' => 1587134704,
)

My php code is:

$oGrabz = new GrabzItClient($gr['apikey'],$gr['apisecret']);
$oGrabz->URLToPDF($url);
$oGrabz->SaveTo('test.pdf');

Do I need to do something else?

Thanks in advance, 

Lydia
Rhinestone66

Asked by Royston on the 17th of April 2020

Yes, GrabzIt looks like a normal browser. This is to avoid being blocked. If you want to detect your requests you could always pass through a URL parameter. Like https://www.example.com/?grabzit=true

Answered by GrabzIt Support on the 22nd of May 2020