Difference between revisions of "AWFFull"

From YobiWiki
Jump to navigation Jump to search
Line 47: Line 47:
   
 
For additional examples, see test/test-geoip.c and apps/geoiplookup.c.
 
For additional examples, see test/test-geoip.c and apps/geoiplookup.c.
  +
-----
  +
./usr/bin/awffull
  +
  +
see the results to http://www.exemple.com/awffull/
  +
  +
Don't forget to point to the right log file : /var/log/apache2/access.log in the /etc/awffull/awffull.conf

Revision as of 16:55, 13 December 2006

AWFFull Homepage

apt-get install libgd2-xpm

install also fontconfig-config libfontconfig1 libxpm4 ttf-dejavu and suggest libgd-tools

libgd-tools suggests to install : libgd2-noxpm-dev libgd2-xpm-dev

but I have an error message : The following packages have unmet dependencies: libgd2-noxpm-dev: Depends: libgd2-noxpm (= 2.0.33-5.2) but it is not going to be installed Conflicts: libgd2-xpm-dev but 2.0.33-5.2 is to be installed libgd2-xpm-dev: Conflicts: libgd2-noxpm-dev but 2.0.33-5.2 is to be installed E: Broken packages


The PCRE Library

apt-get install libpcre-ocaml

it suggests also ocaml-base-nox The following NEW packages will be installed: libpcre-ocaml ocaml-base-nox


libpng image library is not available via apt-get libpng image library


zlib compression library

apt-get install zlib1g

GeoIP Country detection

wget http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.0.tar.gz
./configure
make
make check
make install

Usage :this following sample code looks up the country code by IP address:

#include <GeoIP.h>
int main (int argc, char *argv[]) {
GeoIP * gi;
 gi = GeoIP_new(GEOIP_STANDARD);
 printf("code %s\n",
   GeoIP_country_code_by_name(gi, "yahoo.com"));
 }

To compile this example,

run gcc -lGeoIP example.c.

For additional examples, see test/test-geoip.c and apps/geoiplookup.c.


 ./usr/bin/awffull 

see the results to http://www.exemple.com/awffull/

Don't forget to point to the right log file : /var/log/apache2/access.log in the /etc/awffull/awffull.conf