Re: php & ajax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's a nice, simple intro to ajax here: 
http://marc.theaimsgroup.com/?l=php-general&m=112198633625636&w=2


"pete" <petekin74@xxxxxxxxxxx> wrote in message 
news:43F391D3.1000408@xxxxxxxxxxxxxx
> ello all, Im a beginner at php. but I was able to get this script to work.
>
> Now I am looking to have it automatically refresh itself using ajax every 
> 10 seconds.
>
> Can somebody explain or show me how to do this.
>
> Thank you.
>
> PHP Code:
> | | |<?php
>
> $httpfile = 
> file_get_contents('http://www.game-monitor.com/client/buddyList.php?uid=8654&listid=0&xml=1');
>
>
>
> $doc = DOMDocument::loadXML($httpfile);
>
>
>
> $myBuddyNodes = $doc->getElementsByTagName('buddy');
>
>
>
> /////not neccessary, but im using it
>
> $nameStatusDoc = new DOMDocument('1.0', 'iso-8859-1');
>
> $rootElement = $nameStatusDoc->createElement('PetesList');
>
> $rootElement = $nameStatusDoc->appendChild($rootElement);
>
> /////////
>
>
>
> echo "<table border = '0' cellpadding= '2' 
> bgcolor='#616042'>\n<thead><tr><th></th><th></th><tr></thead>\n";
>
> foreach ($myBuddyNodes as $node)
>
> {
>
>    echo "<tr>";
>
>    echo "<td><font 
> size='-1'>".$node->firstChild->nextSibling->nodeValue."</font></td>";
>
>    if($node->firstChild->nextSibling->nextSibling->nextSibling->nodeValue 
> == "Online") | 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux