i have connected an external device to my server. That device send some data through one port. Now how to read that data from port and store in mysql using php?
karthik_ppts
81
Posting Pro
Recommended Answers
Jump to PostInstead of this
$conn=socket_connect($socket,"192.168.1.5",4321); if($conn) { echo "Socket connected!<br>"; }
try this
$spawn = socket_accept($socket); if($spawn) { echo "Connection Done!"; } $input = socket_read($socket,1024); //now lets store it on mysql $con = mysql_connect("localhost","username","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("database_name", …
All 8 Replies
mingler
0
Newbie Poster
karthik_ppts
81
Posting Pro
mingler
0
Newbie Poster
karthik_ppts
81
Posting Pro
mingler
0
Newbie Poster
karthik_ppts
81
Posting Pro
TechySafi
karthik_ppts
81
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.