I have a php script like this and when try to execute it its giving an error like this how can it be?
Fatal error: Call to undefined function: socket_create() in c:\program files\apache group\apache\htdocs\asd\istatistik.php on line 16
this is my php script
<tr>
<td width="24%" valign="bottom" height="275">
<table border="0" width="101%">
<tr>
<td width="100%" colspan="3" style="border-style:
groove; border-color: #DED1BC">
<p align="center"><font
color="#DED1BC"><b>:-:
Istatistikler :-:<br>
</b></font></td>
</tr>
<tr><td width="24%" valign="bottom" height="150">
<table border="0" width="101%">
<?
$socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); //make the socket
if(@socket_connect($socket,'212.98.232.34',5631)) {
$x = "AƧ?k";
} else {
$x = "Kapal?";
}
?>
<tr>
<td width="38%" align="left"><font color="#DED1BC">Sunucu</font></td>
<td width="8%" align="left"><font color="#DED1BC">:</font></td>
<td width="56%" align="left"><font color="#DED1BC"><? echo $x; ?></font></td>
</tr>
<?
$fd = @fopen("http://212.98.232.34:5631/status.html","r");
while ($line=@fgets($fd,1000))
{
$line15=($line + 20) ;
$alltext.=$line15;
}
@fclose ($fd);
?>
<tr>
<td width="38%" align="left"><font color="#DED1BC">Oyunda</font></td>
<td width="8%" align="left"><font color="#DED1BC">:</font></td>
<td width="56%" align="left"><font color="#DED1BC"><? echo $alltext; ?></font></td>
</tr>
<tr>
<td width="38%" align="left"><font color="#DED1BC">Kay?tl?</font></td>
<td width="8%" align="left"><font color="#DED1BC">:</font></td>
<td width="56%" align="left"><font color="#DED1BC">815</font></td>
</tr>
</table>
<? include("hasan.php"); ?>
where is the problem and how can i fix it
Note:THe machine that i want to create socket and the machine this php code hosted is same.