The PHP script doesn't grow in complexity if you send / don't send the IP. In PHP you'll either have the "source" IP in a custom-defined variable (the funny things after the "?" sign in the URL) or you'll have it in a system-defined variable set up by Apache or IIS. From the point of view of the PHP using a user-sent var is the same as using a Apache-provided var.
As for the user-id, it depends on the kind of collaboration your P2P application is supposed to perform. If different users are supposed to be able to identify other users you'll probably need an user name or something similar. You'll then require registration for those user names and they'll work just fine for a list-purging unique id. I think you'll like this solution better because it allows you a lot more control (unless of course you're trying to re-write a general purpose file sharing applications like BitTorrent or eMule - and that would be a waist of time!) Human wrote: >> That's because PHP doesn't listen on ports by itself, it runs within Apache >> or IIS. >> > That is why I choused PHP. I simple http connection on port 80 will be > accepted by any server. > > Your idea about sending only the port and letting the server to find out the > IP and timestamp is > also brilliant. > The problem now is that the complexity of the server script will grow. > Damn. I really have to buy a PHP manual. I this I was able to write a very > simple PHP script but > now it grow beyond my limited PHP knowledge. Anyway is almost the time to > learn PHP. More and more > compiled applications need some Internet connectivity today. > > I am not sure if I should give to the user a unique ID or if I should let the > application to > generate one based on the computer’s hardware. > __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
