I'm coding an AJAX chatroom, and I'm storing a list of users online in an xml file. When someone logs on it adds them without any problem, but I'm having a hard time trying to figure out how to remove them from the list when they log out. My code is below, and I am extremely new to XML so please don't laugh at me. Does anyone know how I can make php open the file, delete any nodes where the ip attribute matches the ip of the user, and save the file?
$users = new DomDocument(); $users->load("../data/users.xml");
$xp = new domXPath($users); $query = "/user[@ip=".$ip."]"; $results = $xp->query($query);
There will always be the desire to keep expenses down or to cut corners, but one must take the complete picture into account. On the Internet the first impression a visitor (potential customer) gets is everything. [url=http://lionheart.net/]tampa seo[/url]