Real Software Forums
http://forums.realsoftware.com/

RealBasic Web Sending PHP code...
http://forums.realsoftware.com/viewtopic.php?f=2&t=38484
Page 1 of 2

Author:  kdemon [ Mon Apr 04, 2011 3:40 pm ]
Post subject:  RealBasic Web Sending PHP code...

I downloaded a PHP script that send a text message to a mobile phone carrier. I was wondering if I can incorporate this PHP code into a WE application or just a plain desktop application. Or if there is a alternate way to send a textmessage through WE or RB Desktop?


Thanks RB Community

Author:  timhare [ Mon Apr 04, 2011 4:58 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

I think you can use an HTTPSocket. Format the message and Post it to the appropriate URL.

Author:  J.Sh3ppard [ Mon Apr 04, 2011 5:11 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

kdemon wrote:
I downloaded a PHP script that send a text message to a mobile phone carrier. I was wondering if I can incorporate this PHP code into a WE application or just a plain desktop application. Or if there is a alternate way to send a textmessage through WE or RB Desktop?


Thanks RB Community

Which script are you using?

I think there are different ways to send a message to a cell phone. Besides sending a cell text message I think most carriers have email addresses which you can email and the cell phone will get the text message.

That might be easier to do in WE.

Author:  swort [ Mon Apr 04, 2011 6:15 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

J.Sh3ppard wrote:
kdemon wrote:
I downloaded a PHP script that send a text message to a mobile phone carrier. I was wondering if I can incorporate this PHP code into a WE application or just a plain desktop application. Or if there is a alternate way to send a textmessage through WE or RB Desktop?


Thanks RB Community

Which script are you using?

I think there are different ways to send a message to a cell phone. Besides sending a cell text message I think most carriers have email addresses which you can email and the cell phone will get the text message.

That might be easier to do in WE.


i use www.textmagic.com for that same thing. sebd trough smtpsocket is much simpler than a web api.

Author:  J.Sh3ppard [ Mon Apr 04, 2011 7:14 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

swort wrote:
J.Sh3ppard wrote:
kdemon wrote:
I downloaded a PHP script that send a text message to a mobile phone carrier. I was wondering if I can incorporate this PHP code into a WE application or just a plain desktop application. Or if there is a alternate way to send a textmessage through WE or RB Desktop?


Thanks RB Community

Which script are you using?

I think there are different ways to send a message to a cell phone. Besides sending a cell text message I think most carriers have email addresses which you can email and the cell phone will get the text message.

That might be easier to do in WE.


i use http://www.textmagic.com for that same thing. sebd trough smtpsocket is much simpler than a web api.


Swort why would you pay for that service when you can send for free?
Do they offer something different?

Author:  swort [ Mon Apr 04, 2011 8:04 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

nothing is free. textm uses keynames and bisness names wich you can register. by the way can you pm the service name? ill have a look...

Author:  Specialised [ Mon Apr 04, 2011 11:13 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

There are limited free SMS services out there but don't count on their reliability. The reason they are free is that they can bump the company up to the next level of pricing with the carrier. Any messages that you send under a free account get written off as a loss but save the company money with the new pricing bracket and existing clients message volumes. The reason they are unreliable is that very strict conditions must be met before they will allow the free service ie usually towards the end of the billing cycle, decline in usage for the month, close to the end of a price bracket etc etc.

Always go with a paid service. I have never had an SMS disappear or take more than 5 mins to transmit, except for free services.

And PS most companies I have seen use XML based requests to send SMS for easy integration. There are of course com, php, and some weird protocols but XML is the easiest to implement.

Author:  kdemon [ Fri Apr 08, 2011 9:23 pm ]
Post subject:  The PHP Code I'm using is

I found the code here http://sourceforge.net/projects/php2sms/.

So my understanding on webbased server communication is a little gray.... A user accesses a webpage from a computer connected to the web, where the page talks to the server using a coding language (PHP, RBWeb, ruby) and these languages can also talk to a DataBase.

Now I see code in PHP that let's a page access data from another servers/sites. Can I incorporate PHP in RBWeb (WE), or can I add PHP code in my WE project?

Here is the code in PHP that Returned the Users current geographic location, can I add this in a WE page or can I write it in Basic?

Thank RB community



<?php
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();
// If we wanted to change the base currency, we would uncomment the following line
// $geoplugin->currency = 'EUR';

$geoplugin->locate();

echo "Geolocation results for {$geoplugin->ip}: <br />\n".
"City: {$geoplugin->city} <br />\n".
"Region: {$geoplugin->region} <br />\n".
"Area Code: {$geoplugin->areaCode} <br />\n".
"DMA Code: {$geoplugin->dmaCode} <br />\n".
"Country Name: {$geoplugin->countryName} <br />\n".
"Country Code: {$geoplugin->countryCode} <br />\n".
"Longitude: {$geoplugin->longitude} <br />\n".
"Latitude: {$geoplugin->latitude} <br />\n".
"Currency Code: {$geoplugin->currencyCode} <br />\n".
"Currency Symbol: {$geoplugin->currencySymbol} <br />\n".
"Exchange Rate: {$geoplugin->currencyConverter} <br />\n";

if ( $geoplugin->currency != $geoplugin->currencyCode ) {
//our visitor is not using the same currency as the base currency
echo "<p>At todays rate, US$100 will cost you " . $geoplugin->convert(100) ." </p>\n";
}

/* find places nearby */
$nearby = $geoplugin->nearby();
if ( isset($nearby[0]['geoplugin_place']) ) {
echo "<pre><p>Some places you may wish to visit near " . $geoplugin->city . ": </p>\n";
foreach ( $nearby as $key => $array ) {

echo ($key + 1) .":<br />";
echo "\t Place: " . $array['geoplugin_place'] . "<br />";
echo "\t Country Code: " . $array['geoplugin_countryCode'] . "<br />";
echo "\t Region: " . $array['geoplugin_region'] . "<br />";
echo "\t County: " . $array['geoplugin_county'] . "<br />";
echo "\t Latitude: " . $array['geoplugin_latitude'] . "<br />";
echo "\t Longitude: " . $array['geoplugin_longitude'] . "<br />";
echo "\t Distance (miles): " . $array['geoplugin_distanceMiles'] . "<br />";
echo "\t Distance (km): " . $array['geoplugin_distanceKilometers'] . "<br />";

}
echo "</pre>\n";
}
?>

Author:  Jason_Adams [ Sat Apr 09, 2011 4:03 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

Sending SMS via email is no problem. It's easy to accomplish with either PHP or RB, I've done it.

I use the addresses from this site, load them as a ton of constants, and go on my way. :)

http://www.emailtextmessages.com/

Author:  simulanics [ Tue Aug 23, 2011 1:15 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

Jason_Adams wrote:
Sending SMS via email is no problem. It's easy to accomplish with either PHP or RB, I've done it.

I use the addresses from this site, load them as a ton of constants, and go on my way. :)

http://www.emailtextmessages.com/


In the forum at oh-darn.com this list has been updated and includes international carrier to email gateway addresses as well :-)

Author:  paul3252 [ Wed Aug 24, 2011 9:56 am ]
Post subject:  Re: RealBasic Web Sending PHP code...

I use www.clickatell.com who seem to be very good on price, and their service is reliable. The first RB program I wrote is a front end to creating messages and links into our office database via ODBC so we can select groups of staff to send messages to, compile and send etc. This program works really well and is in use daily with an inbuilt sqlite database to store sent message, frequently sent phrases etc. and the reliability has been excellent. On occasions we send a few thousand messages at a time with no issue.

I use their SMTP API, but they also have https, soap, http etc., full details here http://www.clickatell.com/developers/clickatell_api.php

May be worth a look.

Author:  simulanics [ Mon Aug 20, 2012 8:06 pm ]
Post subject:  Re: RealBasic Web Sending PHP code...

See my recent Phone Info Class....handles SMS gateways for you determines user location as well as network type and if or not it is a landline or mobile phone (mobile phone will return the gateway address ie 5556661234@vtext.com)

Author:  Akiland [ Tue Aug 21, 2012 12:40 am ]
Post subject:  Re: RealBasic Web Sending PHP code...

I'm using a Swedish company called Cellsynt frequently to send/receive SMS to my WE app. Never had any problems with their HTTPS API :)
http://www.cellsynt.com/en/sms/api-integration

Author:  simulanics [ Tue Aug 21, 2012 1:31 am ]
Post subject:  Re: RealBasic Web Sending PHP code...

akiland...it is good to see you friend... I will look into their services for my public phone info class.

Author:  Akiland [ Tue Aug 21, 2012 1:37 am ]
Post subject:  Re: RealBasic Web Sending PHP code...

simulanics wrote:
akiland...it is good to see you friend... I will look into their services for my public phone info class.

Right back at y'a :)
They do have developer accounts (at least I got one) but you still have to pay for the SMS credits ;)
Let me know if I can help!

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/