Friday, 7 October 2022
Jenkins + Github + AWS Server
How to get geo location on registration in laravel?
Get Geo - location details
function getLocationInfoByIp(){
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = @$_SERVER['REMOTE_ADDR'];
$result = array('country_name'=>'', 'time_zone'=>'');
if(filter_var($client, FILTER_VALIDATE_IP)){
$ip = $client;
}elseif(filter_var($forward, FILTER_VALIDATE_IP)){
$ip = $forward;
}else{
$ip = $remote;
}
$ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));
if($ip_data && $ip_data->geoplugin_countryName != null){
$result['country_name'] = $ip_data->geoplugin_countryName;
$result['time_zone'] = $ip_data->geoplugin_timezone;
}
return $result;
}
Machine Learning - Potato Leaf Disease Prediction
Step 1: import numpy as np import pandas as pd import splitfolders import matplotlib.pyplot as plt import tensorflow as tf from tensorflow i...
-
Step1: composer create-project laravel/laravel canpac Step2: cd canpac Step3: composer require laravel/ui Step4: php artisan ui bootst...
-
1. Create a middleware name PostShortCodeMiddleware 2. Add this middleware in the kernal file. 3. Create a shortcode.php and shorcodeurl.php...