how can i dial a number via modem in php. and when the phone Answered play a audio stream file.
IMO, Most straight-forward way (i.e., without doing a heck of a lot in PHP), assuming you're hosting the PHP file locally, would be to write a shell script that does the modem dialing / audio playing (Dependent upon OS), then call the shell script via exec in PHP.
http://php.net/manual/en/function.exec.php
Hope this helps -- and that you're not making a telemarketer autodialer that calls my cell-phone in the middle of dinner. :D
-æ.
You really don't want to attempt this using just PHP and a modem - I'm not saying its impossible, but it'd be very, very difficult and there are lots of tools which make it much simpler (but you can still invoke these tools using a PHP controller).
Regardless of whether you roll your own solution from scratch or use something else, how you even begin to solve the problem depends on the OS you are using, and the budget you have. The fact that you've made no mention of either and only tagged your question as 'php' makes me think you are already out of your depth.
But if you want to have a go....have a look at Asterisk.
精彩评论