Q
|
Can I use CountryHawk with PHP?
|
A
|
Yes. You can use CountryHawk with PHP, provided you have the ability to run server side ActiveX or JavaBean components from PHP. If you have ActiveX support from within PHP use the ActiveX/.NET version of CountryHawk. Otherwise us the JavaBean version (CountryHawk4J).
Here is a snippet of code which demonstrates how to use CountryHawk from PHP with ActiveX support:
$countryObj = new COM("cyScape.CountryObj");
$countryObj->initialize(@$_SERVER["REMOTE_ADDR"]);
$userCountryCode = $countryObj->CountryCode;
|