/home
/forge
/lowcosthotels.com
/vendor
/predis
/predis
/src
/Client.php
*
* @return mixed
*/
protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response)
{
if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
$eval = $this->createCommand('EVAL');
$eval->setRawArguments($command->getEvalArguments());
$response = $this->executeCommand($eval);
if (!$response instanceof ResponseInterface) {
$response = $command->parseResponse($response);
}
return $response;
}
if ($this->options->exceptions) {
throw new ServerException($response->getMessage());
}
return $response;
}
/**
* Executes the specified initializer method on `$this` by adjusting the
* actual invokation depending on the arity (0, 1 or 2 arguments). This is
* simply an utility method to create Redis contexts instances since they
* follow a common initialization path.
*
* @param string $initializer Method name.
* @param array $argv Arguments for the method.
*
* @return mixed
*/
private function sharedContextFactory($initializer, $argv = null)
{
switch (count($argv)) {
case 0:
Arguments
"MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error."
/home
/forge
/lowcosthotels.com
/vendor
/predis
/predis
/src
/Client.php
}
/**
* {@inheritdoc}
*/
public function createCommand($commandID, $arguments = array())
{
return $this->profile->createCommand($commandID, $arguments);
}
/**
* {@inheritdoc}
*/
public function executeCommand(CommandInterface $command)
{
$response = $this->connection->executeCommand($command);
if ($response instanceof ResponseInterface) {
if ($response instanceof ErrorResponseInterface) {
$response = $this->onErrorResponse($command, $response);
}
return $response;
}
return $command->parseResponse($response);
}
/**
* Handles -ERR responses returned by Redis.
*
* @param CommandInterface $command Redis command that generated the error.
* @param ErrorResponseInterface $response Instance of the error response.
*
* @throws ServerException
*
* @return mixed
*/
protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response)
{
Arguments
/home
/forge
/lowcosthotels.com
/vendor
/predis
/predis
/src
/Client.php
);
if ($response instanceof ResponseInterface) {
if ($response instanceof ErrorResponseInterface) {
$error = true;
}
return (string) $response;
}
return $response;
}
/**
* {@inheritdoc}
*/
public function __call($commandID, $arguments)
{
return $this->executeCommand(
$this->createCommand($commandID, $arguments)
);
}
/**
* {@inheritdoc}
*/
public function createCommand($commandID, $arguments = array())
{
return $this->profile->createCommand($commandID, $arguments);
}
/**
* {@inheritdoc}
*/
public function executeCommand(CommandInterface $command)
{
$response = $this->connection->executeCommand($command);
if ($response instanceof ResponseInterface) {
if ($response instanceof ErrorResponseInterface) {
Arguments
/home
/forge
/lowcosthotels.com
/vendor
/laravel
/framework
/src
/Illuminate
/Redis
/Connections
/Connection.php
* @param \Closure $callback
* @return void
*/
public function psubscribe($channels, Closure $callback)
{
return $this->createSubscription($channels, $callback, __FUNCTION__);
}
/**
* Run a command against the Redis database.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function command($method, array $parameters = [])
{
$start = microtime(true);
$result = $this->client->{$method}(...$parameters);
$time = round((microtime(true) - $start) * 1000, 2);
if (isset($this->events)) {
$this->event(new CommandExecuted($method, $parameters, $time, $this));
}
return $result;
}
/**
* Fire the given event if possible.
*
* @param mixed $event
* @return void
*/
protected function event($event)
{
if (isset($this->events)) {
$this->events->dispatch($event);
Arguments
"setex"
array:3 [
0 => "laravel_cache:44.212.93.133"
1 => 1800
2 => "a:13:{s:2:"ip";s:13:"44.212.93.133";s:8:"iso_code";s:2:"US";s:7:"country";s:13:"United States";s:4:"city";s:7:"Ashburn";s:5:"state";s:2:"VA";s:10:"state_name";s:8:"Virginia";s:11:"postal_code";s:5:"20149";s:3:"lat";d:39.0438;s:3:"lon";d:-77.4874;s:8:"timezone";s:16:"America/New_York";s:9:"continent";s:7:"Unknown";s:8:"currency";s:3:"USD";s:7:"default";b:0;}"
]
/home
/forge
/lowcosthotels.com
/vendor
/laravel
/framework
/src
/Illuminate
/Redis
/Connections
/Connection.php
/**
* Unset the event dispatcher instance on the connection.
*
* @return void
*/
public function unsetEventDispatcher()
{
$this->events = null;
}
/**
* Pass other method calls down to the underlying client.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->command($method, $parameters);
}
}
Arguments
"setex"
array:3 [
0 => "laravel_cache:44.212.93.133"
1 => 1800
2 => "a:13:{s:2:"ip";s:13:"44.212.93.133";s:8:"iso_code";s:2:"US";s:7:"country";s:13:"United States";s:4:"city";s:7:"Ashburn";s:5:"state";s:2:"VA";s:10:"state_name";s:8:"Virginia";s:11:"postal_code";s:5:"20149";s:3:"lat";d:39.0438;s:3:"lon";d:-77.4874;s:8:"timezone";s:16:"America/New_York";s:9:"continent";s:7:"Unknown";s:8:"currency";s:3:"USD";s:7:"default";b:0;}"
]
/home
/forge
/lowcosthotels.com
/vendor
/laravel
/framework
/src
/Illuminate
/Cache
/RedisStore.php
foreach ($values as $index => $value) {
$results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null;
}
return $results;
}
/**
* Store an item in the cache for a given number of minutes.
*
* @param string $key
* @param mixed $value
* @param float|int $minutes
* @return void
*/
public function put($key, $value, $minutes)
{
$this->connection()->setex(
$this->prefix.$key, (int) max(1, $minutes * 60), $this->serialize($value)
);
}
/**
* Store multiple items in the cache for a given number of minutes.
*
* @param array $values
* @param float|int $minutes
* @return void
*/
public function putMany(array $values, $minutes)
{
$this->connection()->multi();
foreach ($values as $key => $value) {
$this->put($key, $value, $minutes);
}
$this->connection()->exec();
}
Arguments
"setex"
array:3 [
0 => "laravel_cache:44.212.93.133"
1 => 1800
2 => "a:13:{s:2:"ip";s:13:"44.212.93.133";s:8:"iso_code";s:2:"US";s:7:"country";s:13:"United States";s:4:"city";s:7:"Ashburn";s:5:"state";s:2:"VA";s:10:"state_name";s:8:"Virginia";s:11:"postal_code";s:5:"20149";s:3:"lat";d:39.0438;s:3:"lon";d:-77.4874;s:8:"timezone";s:16:"America/New_York";s:9:"continent";s:7:"Unknown";s:8:"currency";s:3:"USD";s:7:"default";b:0;}"
]
/home
/forge
/lowcosthotels.com
/vendor
/laravel
/framework
/src
/Illuminate
/Cache
/Repository.php
}
/**
* Store an item in the cache.
*
* @param string $key
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|float|int|null $minutes
* @return void
*/
public function put($key, $value, $minutes = null)
{
if (is_array($key)) {
$this->putMany($key, $value);
return;
}
if (! is_null($minutes = $this->getMinutes($minutes))) {
$this->store->put($this->itemKey($key), $value, $minutes);
$this->event(new KeyWritten($key, $value, $minutes));
}
}
/**
* {@inheritdoc}
*/
public function set($key, $value, $ttl = null)
{
$this->put($key, $value, $ttl);
}
/**
* Store multiple items in the cache for a given number of minutes.
*
* @param array $values
* @param \DateTimeInterface|\DateInterval|float|int $minutes
* @return void
*/
Arguments
"44.212.93.133"
array:13 [
"ip" => "44.212.93.133"
"iso_code" => "US"
"country" => "United States"
"city" => "Ashburn"
"state" => "VA"
"state_name" => "Virginia"
"postal_code" => "20149"
"lat" => 39.0438
"lon" => -77.4874
"timezone" => "America/New_York"
"continent" => "Unknown"
"currency" => "USD"
"default" => false
]
30
/home
/forge
/lowcosthotels.com
/vendor
/laravel
/framework
/src
/Illuminate
/Cache
/CacheManager.php
* @param \Closure $callback
* @return $this
*/
public function extend($driver, Closure $callback)
{
$this->customCreators[$driver] = $callback->bindTo($this, $this);
return $this;
}
/**
* Dynamically call the default driver instance.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->store()->$method(...$parameters);
}
}
Arguments
"44.212.93.133"
array:13 [
"ip" => "44.212.93.133"
"iso_code" => "US"
"country" => "United States"
"city" => "Ashburn"
"state" => "VA"
"state_name" => "Virginia"
"postal_code" => "20149"
"lat" => 39.0438
"lon" => -77.4874
"timezone" => "America/New_York"
"continent" => "Unknown"
"currency" => "USD"
"default" => false
]
30
/home
/forge
/lowcosthotels.com
/vendor
/torann
/geoip
/src
/Cache.php
public function get($name)
{
$value = $this->cache->get($name);
return is_array($value)
? new Location($value)
: null;
}
/**
* Store an item in cache.
*
* @param string $name
* @param Location $location
*
* @return bool
*/
public function set($name, Location $location)
{
return $this->cache->put($name, $location->toArray(), $this->expires);
}
/**
* Flush cache for tags.
*
* @return bool
*/
public function flush()
{
return $this->cache->flush();
}
}
Arguments
"put"
array:3 [
0 => "44.212.93.133"
1 => array:13 [
"ip" => "44.212.93.133"
"iso_code" => "US"
"country" => "United States"
"city" => "Ashburn"
"state" => "VA"
"state_name" => "Virginia"
"postal_code" => "20149"
"lat" => 39.0438
"lon" => -77.4874
"timezone" => "America/New_York"
"continent" => "Unknown"
"currency" => "USD"
"default" => false
]
2 => 30
]
/home
/forge
/lowcosthotels.com
/vendor
/torann
/geoip
/src
/GeoIP.php
// Set IP
$this->remote_ip = $this->default_location['ip'] = $this->getClientIP();
}
/**
* Get the location from the provided IP.
*
* @param string $ip
*
* @return \Torann\GeoIP\Location
*/
public function getLocation($ip = null)
{
// Get location data
$this->location = $this->find($ip);
// Should cache location
if ($this->shouldCache($ip, $this->location)) {
$this->getCache()->set($ip, $this->location);
}
return $this->location;
}
/**
* Find location from IP.
*
* @param string $ip
*
* @return \Torann\GeoIP\Location
* @throws \Exception
*/
private function find($ip = null)
{
// If IP not set, user remote IP
$ip = $ip ?: $this->remote_ip;
// Check cache for location
if ($this->config('cache', 'none') !== 'none' && $location = $this->getCache()->get($ip)) {
Arguments
"44.212.93.133"
Location {#496}
/home
/forge
/lowcosthotels.com
/vendor
/torann
/geoip
/src
/helpers.php
<?php
if (!function_exists('geoip')) {
/**
* Get the location of the provided IP.
*
* @param string $ip
*
* @return \Torann\GeoIP\GeoIP|\Torann\GeoIP\Location
*/
function geoip($ip = null)
{
if (is_null($ip)) {
return app('geoip');
}
return app('geoip')->getLocation($ip);
}
}
Arguments
/home
/forge
/lowcosthotels.com
/app
/Http
/helpers.php
} else {
$ip = $remote;
}
return $ip;
}
function get_geoip()
{
if (isset($_SERVER['HTTP_HOST']) && strpos($_SERVER['HTTP_HOST'], '.local')) {
try {
$ip = file_get_contents('https://api.ipify.org');
} catch (Exception $exception) {
}
}
if (!isset($ip) || !filter_var($ip, FILTER_VALIDATE_IP)) {
$ip = get_user_ip();
}
return geoip($ip);
}
function get_lch_data()
{
return [
'name' => 'LowCostHotels',
'logo' => asset('images/logo.png'),
'url' => 'https://lowcosthotels.com',
'social_profiles' => [
'facebook' => 'https://www.facebook.com/lowcosthotelscom',
'twitter' => 'https://www.twitter.com/_LowCostHotels'
]
];
}
function broken_image_src()
{
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAADCCAMAAAB6zFdcAAAAMFBMVEXx7/DIyMjS0tLh4ODn5ub08vPX1tbLy8vc29zFxsXk4+Ts6uvOzs7Y2Njq6Oni4eEhT4QPAAAB9ElEQVR4nO3bzXaCMBBA4fATZAzq+79tjaCG2KIkC09n7reUsph7iIKNzgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzDj3tc7fHqGWb6VW6789RCXfNrVooKXBoZyWBtL5Up2oaVB8Og3UNdi9DuJJuhp0u+8L5rN0Ndj5kUgD/Q3ipW67gbSXEI7DmwqqG8jxNpQPB7MNpH/MZLbB8BzpsrUcFDeQkBy0eh1kB002SCbyg9EG2UGLDaRPjqbvifknpeIGyUh+lHTkwU4DGZeZ/Hl1++yCmGnQyMn5+HXC+ilq8tm7g+oGjTRD140HyScOL6/obRAHzO8Q463T+kJQ3+DFFAddXQjmGixfObb5S6YazE8RYfVh6Ww1mOY5/WS3weM/EMldk7kG9wfqYLaBTPcxk8VgqcH1jil5jHouBjMNbgHSGYOxBi8BXLoYTDQ49f6X6R6LQX8DaX8L4JLFoL7B35vNHotBe4Ot/Xb3xaC8weaWw2CiwfauS38S/Q3ebTxdImhu8H7v7RxBZYPPtx9fI6jcjxSOi4/Oin8YnyV1NShDA1UNSqfQs1+5acdSt7NVNGiKf8PS6GlQRUGDvftTc///90xuHGqN3x6hXvFvWNI9/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI34A7YsmQqqJfVgAAAAASUVORK5CYII=';
}
Arguments
/home
/forge
/lowcosthotels.com
/app
/Http
/Middleware
/StartSession.php
$user_event = new UserEvent();
$user_event->user_id = Auth::id();
$user_event->session_id = $user_session->id;
$user_event->type = 'currency_change';
$user_event->referer = $request->server('HTTP_REFERER');
$user_event->data = ['from' => $user->currency, 'to' => $currency];
$user_event->save();
$user->currency = $currency;
$user->save();
$url = $request->fullUrl();
$url = $this->remove_parameter_from_url($url, 'currency');
$url = $this->remove_parameter_from_url($url, 'scroll-to');
return redirect($url);
}
}
}
} else {
$geoip = get_geoip();
if(!isset($subdomain_language) && !$geoip->default) {
$full_code_language = country_code_to_locale($geoip->