I mean, i can specify preferred SERP location search options on google serp page, for sure. I guess there is way to make it hapenns with curl.
Here is some history. I've used SEOStats onto my project. It's good. The I've got interesting article about local searches with undocumented google search parameter UULE
, and used it for getting local results. And it works fine for some time. Then I've to implement getting results with proxies. And that's it. Something is going wrong today as suggested in this comment at the same article. This year is full of surprises. Results now ignoring parameter UULE
for some reason sometimes using proxy. It returns me proxy located local results. But it's partially fine without proxy.
So, I have to guess.
Should make an additional request every time with same (I have back engineered this, look at code below) user processes setting current location OR may be i have missed some request headers OR is there simpliest way and I am kinda stupid?
// Setting location like a boss
$randomKey = mt_rand(1111,999999);
// SEOStats Curl wrapper
$test = static::gCurl("?q=testing" . $randomKey . "#q=testing". $randomKey, false, Config\DefaultSettings::ALLOW_GOOGLE_COOKIES, $proxy );
$q = explode(";;--;;", $test);
preg_match("/;sig=(.*?)\"/i", $test, $out);
$key = $out[1];
//Suggested Google Geocoder location
$zc = (!empty($location)) ? urlencode($location) : urlencode("Home sweet home");
$url = "https://www.google." . Config\DefaultSettings::GOOGLE_TLD . "/" . "uul?muul=4_18&luul=$zc&uulo=1&usg=$key&hl=ru";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// There should be magic not tested yet
Yes you can, you should use the local domain (which you already use) and the cr
GET parameter to set the default country along with a matching hl
parameter to set the default language.
Then you get URL's like:
https://www.google.nl/search?cr=countryNL&hl=nl&num=50&q={your keyword}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With