If you don't get an error message about using the port, check to see if a firewall is running on your linux box. Maybe the port is being blocked.
Main Topics
Browse All TopicsI have a LAN in my office. Ttwo computers have Linux and other windows operation system. An application on windows computer broadcast data on port 4010.
I have a windows and linux computer with apache+php configuration.
i have run following code on windows computer it works fine but not work on linux machine.
<table>
<tr>
<td>
<span id="rate"></span>
</td>
</tr>
</table>
<?php
$host = "172.169.10.202";
$port = 4010;
set_time_limit(0);
$socket = socket_create(AF_INET, SOCK_DGRAM,0);
$result = socket_bind($socket, $host, $port);
while (TRUE){
$input = socket_read($socket,1024);
$input = trim($input);
//echo $input;
?>
<script language="JavaScript" type="text/javascript">
document.getElementById('r
</script>
<?
ob_flush(); // use both ob_flush and flush to ensure
flush(); // output is written to the browser window
}
socket_close($socket);
?>
Please guide me.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: ddrudikPosted on 2008-02-27 at 23:48:34ID: 21001927
On *nix systems, root access is usually required for such usage, see code examples for possible workarounds, if any: n/function .socket-cr eate.php
http://us.php.net/manual/e