# Xbee S6B send data to PHP website

**URL:** <https://forums.digi.com/t/xbee-s6b-send-data-to-php-website/19491>\
**Category:** XBee & XBee Gateway\
**Tags:** tcp-sockets, s6b, pic, xbee-wifi, webserver\
**Created:** [May 9, 2018, 11:21pm UTC](https://forums.digi.com/t/xbee-s6b-send-data-to-php-website/19491 "2018-05-09T23:21:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raman291992](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@raman291992](https://forums.digi.com/u/raman291992)\
**Post date:** [May 9, 2018, 11:21pm UTC](https://forums.digi.com/t/xbee-s6b-send-data-to-php-website/19491/1 "2018-05-09T23:21:19Z")

</div>

I want to make a switch control through my website. and send and recieve data. As i am using Dynamic IP , so every time when embedded system is turned ON we send out IP and Port number to mysql to save and thus use this information control the switch.

I want Xbe S6B to transfer data and recieve data from Mysql php from my website.  
I am new to Xbee. I want to use PIC16F877A as controller for my embedded system.  
Please suggest me how tpo use TCP IP protocol in XBEE S6B.  
Help me with code which AT command I have to send and packet structure for data to send trough XBEE.
