EvilZone

Programming and Scripting => Web Oriented Coding => : m0l0ko July 01, 2012, 06:45:47 PM

: Using XML with PHP
: m0l0ko July 01, 2012, 06:45:47 PM
I need to log information about users on my site, such as their IP, OS, location etc. and the links that they click within the site. Usually I'd store all this info in a MySQL databse but I'm using a free web hosting site which doesn't have MySQL database access. I'm wondering what the next best way to do this would be. Would an XML document be the way to go?
: Re: Using XML with PHP
: Ragehottie July 01, 2012, 07:55:54 PM
000webhost.com

Free hosting with 5(I think) MySQL databases
:D
: Re: Using XML with PHP
: Kulverstukas July 01, 2012, 10:00:44 PM
And what's wrong with google analytics? they show in-depth info of what you want... you can just see a chart how they navigate your site...
: Re: Using XML with PHP
: r23k September 04, 2013, 02:27:58 AM
:
<?php

$ip 
12356;
$sistema linux;

$manipulador_arq fopen("information.xml","w+"); 


@
fwrite($manipulador_arq,"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>
\n<information>\n<settings
    />\n
    <List>\n");



$xml = "<\n ip = \"$ip\"\n sistema = \"$sistema\"\n/>\n";


@fwrite($manipulador_arq,$xml);


@fwrite($manipulador_arq,"</List>\n</information>");
@fclose($manipulador_arq);


?>
: Re: Using XML with PHP
: Stackprotector September 04, 2013, 05:17:42 PM
And what's wrong with google analytics? they show in-depth info of what you want... you can just see a chart how they navigate your site...
Well, for example in The Netherlands you would have to ask a user to put non essential cookies on their computers (so php_sessionid is allowed but a analytics cookie not).