View previous topic :: View next topic |
Author |
Message |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Thu Jan 27, 2005 7:05 pm Post subject: Conditional Dialer Script |
|
|
Is it possible to use php to create a script that will seize a modem and dial a specified Number every time a file is uploaded to a server?
I want to receive a phone call everytime one of my clients submits a service ticket (Uploads a file to their protected directory on the server running abyss)
Should I be looking to PHP for this or should I use another language? _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Thu Jan 27, 2005 8:38 pm Post subject: |
|
|
I dont think you can do that period. You can try perl though...You not just use email o.O? _________________
 |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Thu Jan 27, 2005 10:24 pm Post subject: - |
|
|
It has to be possible perl maybe-email would be fine except that I am in on the road & On Call so It'd be nice to know when work came in instead of having to Wardrive only to find there isn't any thing new-If I got a call after upload then-I could justify the wardriving or just plug into the cellular and DL the data in which case plugging into the cell is the most practical way to do it now-its just a waste of minutes to find nothing.
The Syntax of my query hasn't produced much from google
conditional dialer scripts
dialer programs-Yeah just asking for malware related with that one
Auto dialers
Not coming up with much... _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Thu Jan 27, 2005 10:54 pm Post subject: |
|
|
Or wait yeah you can use PHP. But, however, you need an external program to dail the modem. You can't do it straight from PHP because I dont think PHP has port I/O. _________________
 |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Fri Jan 28, 2005 3:07 am Post subject: I see |
|
|
That's what I was thinking-like you would call a program in a vb script or batch file-
Don't know how to "call" the external program with PHP but I was thinking perhaps something like calling Hyperterminal then somehow scripting it to send the AT command to the modem and 30 seconds later the ATH (to disconnect) this could theoritically be used to make a call or send a numeric page.
I don't know that hyperterminal could be scripted easily/securely/efficiently to have those commands run and run right every time, from the server-not the client's machine. hyperterminal would have to run from the server not the client's machine-otherwise it could be construed as malware or blocked by any firewall worth its salt. Any ideas. I'm going to research calling sub program from within php and scripting hyperterminal. _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Fri Jan 28, 2005 3:39 am Post subject: Brick wall |
|
|
I hit a brick wall -virtual hosting how stupid of me...It won't have access to a modem I'll definitely have to host this from home it's too much to go dedicated-maybe colo is a little less but still not really worth enabling one sepcialized feature-of course the colo could be a member server and provide fault tolerance....Hmmm maybe not a brick wall after all just an obstacle.... _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Fri Jan 28, 2005 8:42 am Post subject: |
|
|
Rather than having it dial a number, have you considered having the server send an SMS instead? There are plenty of free SMS services out there you could 'borrow' to contact yourself, and there would be no need for a modem/phone line in the mix... |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Fri Jan 28, 2005 8:27 pm Post subject: That's a great idea |
|
|
Thats A fantastic idea-however correct me if i'm wrong that is still going to use a mailto:xxxxxxxxxx@messaging.cellprovider.net which would subsequently open up the endusers email client (if any) I'm trying to make it transparent to the enduser-If there where a way to make it transparent-that'd work just perfect.
Like for example when user clicks submit and docs upload the confirmation page could prompt them to click here to alert the technician which would lead to another confirmation page that'd report success. That much could be done in PHP I'm sure. But could it be transparent to the user and not use their email client ????
Thanks again I'd forgotten my phone even had text capability... _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Fri Jan 28, 2005 8:32 pm Post subject: Just a side note |
|
|
I did do some digging around on scripting hyperterminal for what its worth and it ain't worth much-uh...crappy,not at all worth the risks and hassles...even if it were easy it poses too much of a threat if i understand it correctly because you'd need to have the telnet port open-and that ain't happenin' _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
eyn -
Joined: 11 Sep 2004 Posts: 32 Location: Canada
|
Posted: Fri Jan 28, 2005 11:17 pm Post subject: |
|
|
You're giving yourself too much trouble. Here's the simple thing to do.
Use PHP form to mail script (here) to send the notification to your sms service provider. In order for it to send mail without end user's concern (input header, text etc), you can create hidden field within your upload.php and append the mailing script to your processFiles.php, thus allowing 2 jobs (uploading and sending mail) to be done at once.
You need a mail server for the mail function in php to work. Try google for it, as I have no knowledge about which server is better. |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Fri Jan 28, 2005 11:39 pm Post subject: |
|
|
I was actually thinking of having the server contact an offsite SMS provider, not having the end user have to send any sort of email. There are a lot of free SMS gateways out there, and a lot of sneaky scripts to take advantage of them...
Quote: | "PHP2SMS is script written in PHP that allows you to send text messages (SMS) to cell phones. It works using WWW forms provided by cellular providers. It basically automates sending SMS messages via WWW, the script send out POST information to the server as if you had filled out the form online." |
http://php2sms.sourceforge.net/
Might take a bit of playing around to get it to work perfectly but it beats risking the end user having some kind of problem that prevents an email->sms being sent. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jan 30, 2005 5:18 pm Post subject: Re: Conditional Dialer Script |
|
|
Usergnome,
You can call make your modem dial a number in PHP (a slightly modified version from a PHP documentation note by jared@dctkc.com):
Code: |
// Use this code to write directly to the COM1 serial port
// First, you want to set the mode of the port. You need to set
// it only once; it will remain the same until you reboot.
// Note: the backticks on the following line will execute the
// DOS 'mode' command from within PHP
`mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off`;
$fp = fopen ("COM1:", "w+");
if (!$fp) {
echo "Error. Can't open the modem port.";
} else {
fputs ($fp, "ATDT5551234;");
fclose ($fp);
}
|
The code above dials 555-1234. Of course, you can do more by using the AT modem commands. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Usergnome -
Joined: 23 Jan 2005 Posts: 19
|
Posted: Tue Feb 08, 2005 6:33 pm Post subject: Thanks |
|
|
I'm trying them now in my spare time-I've been swamped with service calls lately-my virtual host has yet to respond to my request to run abyss instead of apache. Well see. But they ain't gonna give a virtual client access to a modem. So I'll have to put it in a dark room somewhere with sdsl. I'll post how I fare with the scripts. _________________ Great just F**kin,Great-Now You've went and broke the entire internet... |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Feb 11, 2005 12:56 am Post subject: Re: Thanks |
|
|
Usergnome wrote: | I'm trying them now in my spare time-I've been swamped with service calls lately-my virtual host has yet to respond to my request to run abyss instead of apache. Well see. But they ain't gonna give a virtual client access to a modem. So I'll have to put it in a dark room somewhere with sdsl. I'll post how I fare with the scripts. |
What's your host computer running? Linux? If so, we recommend that you wait for version 2.0 because it is easier to install on a Linux system that version 1.x. It is especially easier to install and run it as a system daemon (a background process) which is ideal is a hosting environment where there is no direct interaction with the computer. By the way, this is how aprelium.com works. It is hosted by version 2.0 (we're using the latest Beta release) on a dedicated server running Linux (and located more than 1500 miles away from us.) _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|