Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Does Perl ring a bell?

by schweini (Friar)
on Sep 09, 2005 at 22:36 UTC ( #490786=note: print w/replies, xml ) Need Help??


in reply to Does Perl ring a bell?

I did something similar once, and it was surprisingly easy, even if i guess it wasn't the most elegant solution around:
i simply soldered a relais to some pins on my parallel port (tons of guides online for soing stuff like that), since you can control quite a couple of those pins by sending bitmasks to the port. then i stole some C code for doing tha appropiate syscall (ioctl, IIRC) from some website, and made a perl CGI script call that C program when it got hit. On the remote server, i simply used LWP to call the CGI script that was on my home machine when it tried to ring that bell, and it worked great.
You could of course use SOAP or whatever for the communication between the two locations, but plain HTTP worked just fine for me.
you could also buy really cheap usb->parallel port adaptors so that you don't fry your 'real' port if you mess up - but i wouldn't know how to address USB ports with C...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-04-08 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (45 votes). Check out past polls.

    Notices?