How to get mysql database data on server to command xbee pro 900hp serial output for connectport x2?

I have a network of 900 hp xbees. I also have my own server with a mysql database. I would like to program my connectport x2 900hp to

  1. get requests from the php scripts to download particular information every x minutes
  2. use the downloaded data to then parse, and send out commands to the xbee 900 hp(s) to output serial data for controlling microcontrollers.