EvilZone

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

Title: Using XML with PHP
Post by: m0l0ko on 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?
Title: Re: Using XML with PHP
Post by: Ragehottie on July 01, 2012, 07:55:54 PM
000webhost.com

Free hosting with 5(I think) MySQL databases
:D
Title: Re: Using XML with PHP
Post by: Kulverstukas on 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...
Title: Re: Using XML with PHP
Post by: r23k on September 04, 2013, 02:27:58 AM
Code: [Select]
<?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);


?>
Title: Re: Using XML with PHP
Post by: Stackprotector on 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).