in reply to Re^4: multiple connections
in thread multiple connections

The markup for code here is <code> ... </code> not [script] ... [/script].

could simply add open ($log, '>>','log.$client_ipnum.txt') or something in those lines?

Yes. Kinda :). The value of the variable $client_ipnum with not be substituted (interpolated) into a string that uses single quote (') delimiters. So, the way you have it now, the file opened would still have the same name every time: log.$client_ipnum.txt.

To get the effect you want, you will need to use double quotes for the string:

open ($log, '>>', "log.$client_ipnum.txt" )

That will make your filenames something like:

log.62.123.1.100.txt log.168.0.0.123.txt

I point this out to make sure that is what you intended?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^6: multiple connections
by xarex (Initiate) on May 22, 2007 at 06:45 UTC
    BrowserUK,

    I am busy rading in o'rileys PHP Wrox , about the different types of servers and have a quick question...

    Which is better ( Less of a resources hog)

    a) Forking Server
    b) Polling Server
    c) Threaded Server

    Forgive all the stupid questions, but i am actually a php programmer, and simply need to get the data to a log file so i can process it using PHP

    K-