Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Does Perl ring a bell?

by schweini (Friar)
on Sep 09, 2005 at 22:36 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://490786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found