1. Go to this page and download the library: Download nawrasbukhari/geo-content 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/ */
use NawrasBukhari\GeoContent\Facades\GeoContent;
$geoContent = new GeoContent();
if ($geoContent->country('United States of America')) {
// Display restricted content here
}
use NawrasBukhari\GeoContent\Facades\GeoContent;
$geoContent = new GeoContent();
if ($geoContent->continent('AM')) {
// Display restricted content here
}
use NawrasBukhari\GeoContent\Facades\GeoContent;
// Create an instance of the GeoContent class
$geoContent = new GeoContent();
// Hide content from users in Russia
if ($geoContent->onlyShowInCountry('Russia')) {
// Display non-restricted content here for users from Russia
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.