YandexSearch logging
This commit is contained in:
parent
1f5da44e74
commit
f90dbddd33
|
|
@ -208,7 +208,7 @@ class App
|
||||||
public static function log($logName, $value)
|
public static function log($logName, $value)
|
||||||
{
|
{
|
||||||
$fileName = App::getBasedir() .
|
$fileName = App::getBasedir() .
|
||||||
'logs/' .
|
'../logs/' .
|
||||||
$logName . '.log';
|
$logName . '.log';
|
||||||
|
|
||||||
return file_put_contents(
|
return file_put_contents(
|
||||||
|
|
|
||||||
|
|
@ -354,6 +354,7 @@ class JsonController extends Controller
|
||||||
$out = curl_exec($ch);
|
$out = curl_exec($ch);
|
||||||
|
|
||||||
if (!empty($out)) {
|
if (!empty($out)) {
|
||||||
|
App::log('yandexSearch', $out);
|
||||||
$obj = simplexml_load_string($out);
|
$obj = simplexml_load_string($out);
|
||||||
|
|
||||||
if (isset($obj->GeoObjectCollection->metaDataProperty->GeocoderResponseMetaData->found)) {
|
if (isset($obj->GeoObjectCollection->metaDataProperty->GeocoderResponseMetaData->found)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue