Apache & PHP: how does it work?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
moozzuzz
Forum Newbie
Posts: 1
Joined: Tue Nov 26, 2002 9:57 am

Apache & PHP: how does it work?

Post by moozzuzz »

[font=courier new]
hi, i'm interested in how PHP communicates with the (APACHE)server. I'm thinking of develloping a proggie which manages an 1-wire-network (4 some homeautomatisationgoals), and i would be like to be able to control it via the net.

so i would be able to surf to my website, and see the online status of my network, or change it.

Any thougts on how/where to find more technical info on thiz subject?

grtzz,
/me
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Strictly speaking (or if I'm understanding you correctly) Apache, or any other web server isn't needed for this. PHP can be run as a daemon and listen for a connection from you. I do this with a load balancer for a group of replicated db's and as a way of communicating commands to machines in the network.

I based what i did off a hunk of code called phpserv by Daniel Lorch.

Now to the security issues involved, make sure you put all of this stuff behind a firewall. Addittionally, if you have a set remote ip wherever you are, make sure that only it can connect.
Leaving a port open to something that can control your home network is dangerous.

Now for on the cheap stuff, get an old P5 133 or something wth at least 16 megs, yank out the hard drive, and use floppyfw for your firewall. For home use it should be great. It's free, runs on old as dirt machines, and is ultimately configurable. I run four of them here at work on old boxes ranging from 133 Mhz to 266Mhz.

Cheers,
BDKR
Post Reply