Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Can this be done? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 18 2014 at 12:24 | IP Logged Quote krommetje

Hey all,

I know I am not a frequent poster but now I've got something. I would like to have PH send SMS to my phone.
I have a voipbusteraccount which enables you to send SMS through SMSLINK like this:

    https://www.voipbuster.com/myaccount /sends ms.php?username=xx xxxxxxx&password=xxxxxxxxxx&from=xxxxxxxxxx&to=xxxxxxxxxx&t& nbsp;  ext=xxxxxxxxxx

(the well know board space bug is here)

This is a copy&paste into the address bar of the browser and afterwards a new screen is opened with an acknownledgement that the sms is sent... can this be used for PH?

Edited by krommetje - May 18 2014 at 12:26
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: May 18 2014 at 15:33 | IP Logged Quote gg102

My experience is much easier.

I know that the major carriers have an email that you can use to send SMS messages to your phone. For example, T-Mobile uses 9999999999@tmomail.net. (substitute your phone number)   Verizon uses something like 9999999999@vzw.com and I remember that ATT has something similar. (I might not remember the last two exactly) You can call your carrier to find out their specifics. They are perfectly happy to tell you. This is NOT any secret on their part.

Basically, I send a SMS to my phone from my email account. You can read the help on ph_sendsmtpemail(......)

I set up some global vars:
TEXT_MAIL_FROM     name@yourdomain. com (your email account)
TEXT_MAIL_PASSWORD your_password
TEXT_MAIL_PORT     port_your_server _uses
TEXT_MAIL_SERVER   your_email_server(usually mail.yourdomain.com)      
TEXT_MAIL_TO       999999 9999@tmomaill.net (your phone number and carrier)

Then I have a macro called "TEXT" that has the following code:

FORMULA ph_sendsmtpemail(
"{TEXT_MAIL_SERVER}",
number("{TEXT_MAIL_PORT}"),
"{TEXT_MAIL_FROM},"+
"{TEXT_MAIL_FROM},"+
"{TEXT_MAIL_PASSWORD}",
"{TEXT_MAIL_TO}",
"A SUBJECT HEADER",
char(13)+
ph_getvar_s(1,1) +
char(13)+
now() )

In my application I call the macro the following way;

FORMULA ph_macroparmret("TEXT", "This is an important message I'm sending to my phone.", " ", "3","4","5")


The reason I use a macro to send the messages is because I have multiple places in my application that might want to send a message. Rather than copying all that code all over the place, I just call the "text" macro and it handles, in one place, all the issues needed to send the message. Thus if I ever change my phone number or mail server, I only need to make the change to a global var in one place, and everything still works, and I don't have to chase all over the application to find everywhere I TEXT my phone..

Back to Top View gg102's Profile Search for other posts by gg102
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 19 2014 at 01:36 | IP Logged Quote krommetje

I know about this but this is in my country a rather expensive possibility. One sms costs about 70 dollarcents. When I send it through my Voipprovider, the cost is about 4 cents... But I am already thinking about a macro with GV's als textbody.... In most cases PH sends a mail which Is satisfactory but in some cases I need TO "GLOBALLY" reached.
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 19 2014 at 07:15 | IP Logged Quote TonyNo

Have you tried that with ph_geturl?

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 19 2014 at 08:19 | IP Logged Quote krommetje

Tonyno:

I haven't tried anything yet in fact I am getting an error with ph_geturl(...)

Line: 51
Text: Error accessing external object property remoteport at line 51 in function f_geturl of object uo_socketblob.

If I use
Code:
ph_getwburl("https://www.voipbuster.com/myaccount/sendsms.ph p?username=xxxx&password=xxxxx&from=+xxx&t o=xxxx&text=test sms from PH", 5)


then the SMS is sent and recieved but Get a time-out:

Execution time: 5,098 seconds.
     The formula evaluates to: *ERROR* - TIMEOUT WHILE CONNECTING



Edited by krommetje - May 19 2014 at 08:46
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 19 2014 at 08:49 | IP Logged Quote krommetje

Update: Ignore the Board bug please
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 19 2014 at 17:54 | IP Logged Quote TonyNo

Does that only work after you logged into an account with your browser (uses cookies)?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 19 2014 at 21:58 | IP Logged Quote krommetje

No, I don't log on to my account. It is just the macro and it runs ph_getwburl(...)
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 20 2014 at 06:51 | IP Logged Quote TonyNo

Oh, you said it worked, but, timed-out.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 21 2014 at 09:59 | IP Logged Quote krommetje

How Do I go around this time-out?
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 21 2014 at 19:12 | IP Logged Quote TonyNo

Have you tried ph_geturl, not ph_getwburl?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 21 2014 at 22:14 | IP Logged Quote krommetje

I am getting time-out with ph_geturl(...) and the connection is not mde at all...
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 23 2014 at 08:27 | IP Logged Quote krommetje

Wat would happen if I did it with ph_getitcurl(...) ?
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 24 2014 at 10:28 | IP Logged Quote TonyNo

This function is similar to the ph_geturl and ph_getwburl in that the HTML for a specified URL is returned. This particular function uses the Microsoft ITC to accomplish this task

Worth a shot!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 26 2014 at 01:36 | IP Logged Quote krommetje

Nope... with ph_getitcurl(...) nothing happens....
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 27 2014 at 15:12 | IP Logged Quote dhoward

Peter,

The ph_getwburl is probably timing out because the return of the URL is (maybe a popup) is not expected. Since ph_getwburl works (but times out), you may want to take a look at the ph_wcopen function. This opens the Web Center window within PowerHome and you can specify the URL to be opened. Its basically a PowerHome controlled version of Internet Explorer. This may be better able to handle URL return.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 28 2014 at 07:43 | IP Logged Quote krommetje

Hi Dave,

Working! No time-out(s)...

the returning HTML is not shown, probably because in case of a good username and password there is no returning html, and no errors as well.
With this I can go on with my plans.

For newbies:

it opens a webcenter, shows the returning HTML if any
with ph_wcclose() you close the window again....
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum