If your site is behind CloudFlare, you cannot access your visitors IP / Country by using :
Because it gives you a CloudFlare IP…
Very frustrating if you are trying to block some countries,
Here is the TIP :
// You can add this code to your header
// display real visitor's IP
// echo "CloudFlare Ip ".$_SERVER["HTTP_CF_CONNECTING_IP"]."<br>";
// display real visitor's country code
// echo "CloudFlare Country ".$_SERVER["HTTP_CF_IPCOUNTRY"]."<br>";
// Test if visitor is from some countries and redirect them if so
if (($country=='TH') OR ($country=='AF') OR ($country=='PK') OR ($country=='IN') OR ($country=='MM'))
// Display a nice message ;-)
// echo "pay klai klai !";
// or redirect this visitor to a nice page
That’s it !
Take a look at https://underthebo.com to see it live,
To discover the full website, you can buy a plane ticket or use a VPN…
At Web a Way we create secure websites
Google’s Chrome 56, launched this week, begin warning users that all HTTP pages are not secure, starting with the pages that collect login details or credit-card numbers.
Website security – SSL / HTTPS Chrome 56
See below how one of our customer’s website looked like before we secured his website
Secure your website with SSL HTTPS – Web a Way – Security services – Secure Websites
The only way to remove this message is by installing an SSL certificate on your hosting and then to force your website to use the https protocol. By doing this all your pages will be marked as secured.
See below the result for our new secure website https://web-a-way.com
Secure websites with SSL HTTPS – Web a Way – Security services
They trust us for their secure websites – See below the latest websites we helped to secure :
https://anywayinaway.com (Errol did it by himself after a very few recommendations)
If you like technical challenges you can try, like Errol, to install an SSL certificate on your server and then force your website to use only https. But if you think this is to difficult for you we have a security package that will fit your needs. This package also includes security plugins and the protection of your website behind CloudFlare.
If your website is not secured yet, contact us to install an SSL certificate on your server and make your website more secure for you and your customers with https .
What is HTTPS ?
HTTPS (Hypertext Transfer Protocol Secure) is an internet communication protocol that protects the integrity and confidentiality of data between the user’s computer and the site.
Users expect a secure and private online experience when using your website. Google encourage you to adopt HTTPS in order to protect your users’ connection to your website, regardless of the content on the site.
Data sent using HTTPS is secured via Transport Layer Security protocol (TLS), which provides three key layers of protection:
- Encryption—encrypting the exchanged data to keep it secure from eavesdroppers. That means that while the user is browsing a website, nobody can “listen” to their conversations, track their activities across multiple pages, or steal their information.
- Data integrity—data cannot be modified or corrupted during transfer, intentionally or otherwise, without being detected.
- Authentication—proves that your users communicate with the intended website. It protects against man-in-the-middle attacks and builds user trust, which translates into other business benefits.
Given Chrome has more than one billion users, this change to Chrome is likely to pressure website operators to at least consider enabling site-wide HTTPS to create more secure websites.
Chrome will also call out companies that aren’t doing the basics of protecting sensitive user information by collecting information on an unencrypted connection.