PHP code example of netliva / helpers

1. Go to this page and download the library: Download netliva/helpers library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

netliva / helpers example snippets



//...

$currency_symbols = new Netliva\Helper\CurrencySymbols();
echo  $currency_symbols->get("TRY")
// output: ₺
 
//...

 
 //...
 
 $ip_geo_helper = new Netliva\Helper\IpGeo();
 echo $ip_geo_helper->getIp();
 // output: "123.123.123.123" (ip of your)
 echo $ip_geo_helper->getInfo("city");
 // output: "Izmir" (city of your location)
  
 //...
 

 
 //...
 
 $ip_geo_helper = new Netliva\Helper\IpGeo();
 $ip_geo_helper->setIp("172.217.168.238");
 echo $ip_geo_helper->getInfo("country");
 // output: "United States" (country of google ip location)
  
 //...
 

 
 //...
 
 $ip_geo_helper = new Netliva\Helper\IpGeo();
 echo $ip_geo_helper->getInfo();
 /*
  * output:
  * 
  * Array
  * (
  *	 [ip] => 123.123.123.123
  *	 [city] => Izmir
  *	 [state] => Izmir
  *	 [country] => Turkey
  *	 [country_code] => TR
  *	 [continent] => Asia
  *	 [continent_code] => AS
  *	 [currency_code] => TRY
  *	 [currency_symbol] => YTL
  *	 [currency_converter] => 5.4604
  * )
  */
  
 //...