<?php
 use Illuminate\Http\Request;
use GuzzleHttp\Client as GuzzleClient;
use Illuminate\Support\Facades\Redirect;
use \App\Http\Controllers\userController;

function laravel_load_core()
{
	try
	{	  
        $act_file = Storage::get('file.txt');
        $act_file = json_decode($act_file);
        $domain = request()->getHost();
        if($domain != $act_file->url )
        {
            return Redirect::route('homelogin')->with(['err' => "Domain difference! Please activate on this domain"])->send();
        }
	}
	catch(\Exception $e)
	{
		return Redirect::route('homelogin')->with(['err' => 'Please activate this script'])->send();
	}
      
        
}
