
yuriy
Novice
Jan 24, 2010, 9:00 AM
Post #1 of 6
(548 views)
|
|
VoipDiscount phone-to-phone
|
Can't Post
|
|
Hello perl gurus, i am completely new to perl, never worked with it and probably never will. However, as far as i understand, perl is quite useful if ones wants to write a script which automates some actions in WWW. The problem is the following. For my foreign calls I use software called Voipdiscount. It is basically just yet another one SIP-service, but they have a neat function which is called "phone-to-phone": first your number is dialed and when you pick up, then the destination number. I use this function quite often, because I don't want to stick at my computer with a headset on my head. Now, Voipdiscount provides only a Windows version of their software, however, for Mac and Linux users (I belong to the latter) the whole functionality is available on their website. Being too lazy to log myself in and enter the phone numbers manually, I would like to have a script that would do the job for me. After a half an hour of googling, I came up with the following code:
#!/usr/bin/perl -w `perl -MLWP::Simple -e "getprint 'https://www.voipdiscount.com/myaccount/phone-to-phone.php?username=user&password=pass&from=myphone&to=destphone'" > /dev/null 2>&1`; Of course, I replace user, pass, myphone and destphone with the corresponding values. Now, this script seems to be running without any errors, but it also doesn't work. I tested the URL. If I open it with my browser before logging in, it will redirect me to a login page, even though I've already specified the user name and the password in the URL. If I have already logged in, then the correct page is opened and the phone number fields are filled with correct numbers, but nothing more happens. There is a button called "Call now" which has to be clicked on to make a call. So the question is, how can I make the perl script "click the button" for me. I don't know whether this question relates to perl or to php (or both), so excuse me, if this is the wrong place to post this question. But in any case, any help will be greatly appreciated.
|