0

Hi All,
How to read data from server using php? Actually i'm connecting an external device to my system. That device send some data to server via GPRS. But i dont know how to get/see that data from server? Please Help Me.

Edited by karthik_ppts: n/a

3
Contributors
4
Replies
7
Views
6 Years
Discussion Span
Last Post by karthik_ppts
0

Hi,
In what format your data is stored?
is is databse? is it file?........ Please provide more information

1)if it is database use this

http://www.w3schools.com/PHP/php_mysql_select.asp

or
2) if it is file

$url="http://www.example.com/filename";

$xmlData=file_get_contents($url);

You will get file contents into this $xmlData variable.

Hi All,
How to read data from server using php? Actually i'm connecting an external device to my system. That device send some data to server via GPRS. But i dont know how to get/see that data from server? Please Help Me.

0

Hi,
In what format your data is stored?
is is databse? is it file?........ Please provide more information

1)if it is database use this

http://www.w3schools.com/PHP/php_mysql_select.asp

or
2) if it is file

$url="http://www.example.com/filename";

$xmlData=file_get_contents($url);

You will get file contents into this $xmlData variable.

Hi arunmagar,
Thanks for ur reply.

Actually i dont know the type of the file that the external device sent. I'm trying to listen that file using "TCP listener". The TCP Listener request the port no and ip address of the server. But i dont know that in which port the data to sent by the device. Do you have any idea to find the port that receive the data from the external device that to be connected with GPRS.

0

Hi Friends,
I got data from the server by Natting the virtual server with one port value.And listen that port using "TCP Listener". This problem solved.
But now i want to store that date in mysql db. Anybody know how to read a port using php and store the data in mysql?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.