Q:

PHP auction script using AJAX

Is it possible to create a auction site in PHP using AJAX to refresh the page once a user has entered a higher amount of money. 
I can handle the PHP side of it okay but I was wondering if AJAX can really be used so that it refreshes often without putting a lot of strain on server resources? 
I also plan to use JQuery to implement AJAX as this makes the job a whole lot easier. Anybody have any code examples that you think could be used? 
Any help would be appreciated/
Thanks!

A:

var currentHighestBid=0;
setTimeOut(getHighestBid,5000); //5000ms wait before polling for a better price

function getHighestBid()
{

    $.ajax(
    url: url, // ur php end point,
    type: "GET"
    data: {}   //json data if you want to send anything as a querystring parameter to your servre
    dataType:"json"
    success: function(response)
    {

        if(response.currentMaxBid>currentHighestBid)
        {
        currentHighestBid=response.currentMaxBid;
        //code to update your markup
        }

    }

});

Hope that made sense..
Read abt json in php

