alib_i
Cyborg Agent
I run a web-server for my local LAN ..
it runs on Apache+PHP (no MySQL)
now, ..
I have a page where I list (almost) all the HTTP/FTP servers on LAN
The PHP code I use looks like this ->
That port 21 is for FTP and I replace it with 80 for HTTP
That $ftp[$i] is an array containing all ip addresses I am listing.
This code runs in Loop for all ip addresses
PHP Code runs very fine and correct ..
The only problem I observe is this
*img32.exs.cx/img32/5198/desktop9mx.th.jpg
Every time someone accesses my webpage ..
Apache opens a new socket on a NEW LOCAL PORT and port 21 or 80 of IP which im pinging
After few hours I see that Apache is listening on 20-30 Ports ...
it eats up quite a bit of memory ...
Any Idea wht changes shud i bring to my code so that this doesnt occur!!!
-----
alibi
it runs on Apache+PHP (no MySQL)
now, ..
I have a page where I list (almost) all the HTTP/FTP servers on LAN
The PHP code I use looks like this ->
Code:
$fp = fsockopen($ftp[$i],21,$errno,$errstr,0.02);
if(!$fp) { $success=2; }
fclose($fp);
if($success!=2){
echo"<img src=online.gif border=0>
....
... }
else
{ .... }
That $ftp[$i] is an array containing all ip addresses I am listing.
This code runs in Loop for all ip addresses
PHP Code runs very fine and correct ..
The only problem I observe is this
*img32.exs.cx/img32/5198/desktop9mx.th.jpg
Every time someone accesses my webpage ..
Apache opens a new socket on a NEW LOCAL PORT and port 21 or 80 of IP which im pinging
After few hours I see that Apache is listening on 20-30 Ports ...
it eats up quite a bit of memory ...
Any Idea wht changes shud i bring to my code so that this doesnt occur!!!
-----
alibi