ATTENTION! If the system consistently requires authorization and this disturbing you from working please check if you have cookies enabled in your browser.
In the Microsoft Internet Explorer In the "Tools" menu, select "Internet Options", then go to on the "Privacy" tab and check if you have cookies enabled. Recommended security level - medium.
In the Opera browser, on the File menu -> "Quick Settings", check whether the checkmark next to "Enable cookies" is checked.
If you have any questions, please contact the support.
Viewing
campaign/geo
Parameters:
Example of the method request:
$token, 'id' => 999999 ); if( $curl = curl_init() ) { curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/geo'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post); $out = curl_exec($curl); echo $out; curl_close($curl); } // Result: { "countries": { "geo_ru": { "name": "Russia", // region name "checked": true, // selected or not "count": 84836 // approximate number of visits per day }, "geo_ua": { "name": "Ukraine", "checked": false, "count": 22551 }, ... }, "ru_regions": { "region_105": { "name": "Moscow", "checked": true, "count": 17419 }, "region_106": { "name": "Saint Petersburg", "checked": true, "count": 5551 }, ... }, "ua_regions": { "region_10": { "name": "Kiev", "checked": false, "count": 9226 }, "region_21": { "name": "Donetsk region", "checked": false, "count": 3692 }, ... }, "error_code": 0 }
Setting Regions
campaign/geo_set_by_names
Parameters:
Example of the method request:
$token, 'id' => 999999, 'regions' => 'moscow,spb,yaroslavl,sverdlovsk' ); if( $curl = curl_init() ) { curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/geo_set_by_names'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post); $out = curl_exec($curl); echo $out; curl_close($curl); } // Result: { "status": "ok", "error_code": 0 }