hiiiiiiii developers
im having a script that reads a content from a site, the problem is .. when i test it under my machine -localhost- its ruinning smoothly ... but ... when i iploaded the same script to my hosting co. it did not!! .. it said ......
Warning: fopen("http://mydomain/default.htm","r") - A socket must be already connected. in inc/getnews.php on line 13
Warning: Supplied argument is not a valid File-Handle resource in inc/getnews.php on line 13
sorry could not get to the site
the question is: what are sockets ... and how can i use it to solve this problem pleeeeeeeeese...
your help is most appreciated .....
below is my code ------------
<head>
<BASE HREF="http://www.mydomain.com/" target="_blank">
</head>
<body>
<?php
$fd= fread(fopen("http://mydomain.com/default.stm", "r"), 100000);
if ($fd)
{
$start= strpos($fd, '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=315>'); //specifes the starting point
$finish= strpos($fd, '</TABLE>'); //specifes the ending point
$length= $finish-$start;
$code=Substr($fd, $start, $length);
}
else
{ echo "sorry could not get to the site!"; }
echo $code;
?>
</body>