ErrorException [ Warning ]: file_get_contents(https://tourismportal.net/index.php/api?title=%D1%81.+%D0%94%D0%B0%D0%B4%D1%8B): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error

APPPATH/classes/controller/reestr.php [ 54 ]

49 
50 
51         $object = Model::factory('Emap')->object_info($id);
52 
53 
54         $portalResp = json_decode(file_get_contents('https://tourismportal.net/index.php/api?title='.urlencode($object['title'])));
55        
56         if ($portalResp->slug) {
57                 header("HTTP/1.1 301 Moved Permanently"); 
58                 header("Location: https://tourismportal.net/object/".$portalResp->slug); 
59                 exit();
  1. {PHP internal call} » Kohana_Core::error_handler(arguments)

  2. APPPATH/classes/controller/reestr.php [ 54 ] » file_get_contents(arguments)

  3. {PHP internal call} » Controller_Reestr->action_object()

  4. SYSPATH/classes/kohana/request/client/internal.php [ 116 ] » ReflectionMethod->invoke(arguments)

  5. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  6. SYSPATH/classes/kohana/request.php [ 1154 ] » Kohana_Request_Client->execute(arguments)

  7. DOCROOT/index.php [ 109 ] » Kohana_Request->execute()

Environment