sfIpGeolocHelperPlugin - 1.0.0

The plugin let's you to get the localisation of your visitors by using Ip

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown

sfIpGeolocHelperPlugin

Introduction

The plugin let's you to get the localisation of your visitors by using Ip

Functions

  • inet_aton($ip) The inet_aton is a number caluclating from ip like that : IP: A.B.C.D inet_aton= A256^3+B256^2+C*256^1+D

  • getCoutryByIp($ip=null)

    This function return false or the country Object If $ip is null the function make the calcul with $_SERVER['REMOTE_ADDR']

Install

Don't forget to load the sql file in the data/install folder

Do

    mysql -u [-p[password](username]) < ./plugins/sfIpGeolocHelperPlugin/data/install/country.sql

And

    mysql -u [-p[password](username]) < ./plugins/sfIpGeolocHelperPlugin/data/install/ip2country.sql

NOTA

For Flag you must add you're pictures into web/images/flag/{isocode}.png And after use $country->getFlag()