Setting the http referer with PHP CURL – webscrapping

This is how we simply trick the server with a fake referer!
On webscrapping we can try to hide or make them think that we aren’t performing webscrapping on them!

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, '');
$html = curl_exec($ch);

Leave a Reply

Your email address will not be published. Required fields are marked *