SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Wed May 08, 2024 23:22
SMSTools3 Community » Help and support Bottom

[solved] SMS Web Form

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jun 2009
Location: Manila, Philippines
hello,
does anyone have a script for sending SMS thru a web form? and also the php file? please help..
something like this:
GismoSMS
SendSMS now

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Have you checked the sample script smstest.php which can be found from the scripts directory?

This sample is created for setting up and testing character set handling and it has fixed receivers number. Changing it to handle receivers number as a field is not very difficult.

Probably you are missing a counter which tells how much there are characters left when a message is limited to single part only?

I visited those two sites you published. On GizmoSMS there is a counter but it does not handle extended characters. I also sent two SMS using this service, but after 24 hours they are still not delivered. :( On SendSMSnow there is a counter too, but it does not work very well.

As far as I know, there is no good counter published, including automatic moving to Unicode and handling of replacement of accented characters.

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Hey keke, I found this site and it works pretty well in sending and receiving messages in the phils.
Great thing about this site is that you can view replies in your so called "inbox".

its at uLink
here's a screenshot of the web form:
web form

The only problem i've encountered with them is that sometimes the message never gets to the recipient and that sometimes when you reply to the message it never goes to your inbox. But sometimes it also works flawlessly. (maybe they're using nokia 6210's too :mrgreen: )

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Hello,

I'm having this error: Parse error: parse error in C:\xampp\htdocs\send.php on line 16
line 16 is: </body></html>
What could be the problem?

Also, since I'm using cygwin and XAMP as my web server, is this line correct?


send script


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
kaloyzki wrote
... since I'm using cygwin and XAMP as my web server, is this line correct?



Backslash is an escaping character. Inside the double quotation marks it itself should be given in the form: "C:\\cygwin\\var...". However, better use slash (/) as a directory separator, your platform is more Unix-like than Windows-like.

Usually "<?php>" is given like: "<?php". Some implementations may not allow > to be used.

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Wow, thanks so much keke! Ü

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You're welcome... :)

By the way, when you used that uLink interface, did you check the counter, how good it works? Is it something you was seeking for?

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
The counter on uLink used to basically do nothing at all, it just counts. hehe. But it works by sending messages in split form with part numbers on it.

But when I checked the site again this very moment, they removed it and implemented a max character limit on the message of 130 characters. Only 130 characters because they insert a text message on every message sent through their web form: "powered by uLink bla bla".

I decided not to implement sending large text messages on the web form and implemented a 160 character max. I did this because I think if a user is typing a lot of characters, more than 1000 characters, it's gonna stall the problematic modem and or delay the sending of other messages.

But I did tried sending a super long message on the web form I'm making and I was able to send it through sms3 with no prob at all! :mrgreen:

Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:

Another question, how do I add "powered by myWebsite" to every text message sent through my web form?


« Last edit by kaloyzki on Fri Aug 21, 2009 20:17, 179 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Quote
I decided not to implement sending large text messages on the web form and implemented a 160 character max.

If you are running a JavaScript counter on your form, you cannot trust to it. Another counting on the server side is required because JavaScript may be disabled.

You can also add a header Autosplit: 0 to each message. With this setting smsd will cut messages automatically.

Quote
Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:

Please check this post. You may run that kind of script on your server running Smstools3 and call it from the website located in the US.

Quote
Another question, how do I add "powered by myWebsite" to every text message sent through my web form?

Just cut the text and add your message. For example:


But this sample does not detect extended characters which use two characters while they are sent.

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Yes, I did used javascript on my text area. Oh well, you are right, I better set Autosplit: 0 too.

Where do i place this code?


My work around on this one is to place the "powered by myWebsite" on this area of the send.php


And it works just fine...

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Quote
Quote
Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:

Please check this post. You may run that kind of script on your server running Smstools3 and call it from the website located in the US.

I'm sorry but I didn't quite get what you meant to say..

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
kaloyzki wrote
Where do i place this code?

In your script, you can replace this line:
fwrite($file, $_POST["message"] ."\n");

with these:
$message = "powered by myWebsite";
$text = substr($_POST["message"], 0, 160 - strlen($message) -1) ." " .$message;
fwrite($file, $text);


Notice that there should not be an additional linefeed on the end of a message body. It causes one more character to be used.

In the previous post I had one space character missing :(, it's fixed in this new sample.

kaloyzki wrote
Quote
Quote
Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:

Please check this post. You may run that kind of script on your server running Smstools3 and call it from the website located in the US.

I'm sorry but I didn't quite get what you meant to say..

What I meant to say, was that you already have a sending script on your Smstools3 server. Your website code can call this script to get a message sent. It's much more simple than downloading which will require some database and scheduled jobs etc.

Because I do not know what kind of server and services you are running in the US, I cannot help you with this functionality.

Member
Registered:
Jun 2009
Location: Manila, Philippines
Topic owner
Hi,
I think I found the solution to my question above, I did some research and found out about WinSCP and ScriptFTP. Both of them can be configured to automatically download a file on my hosted disk space and place them into my outgoing folder. All I have to do is to set a cron job or a scheduler then its up to sms3 to check that folder and send it!


Thanks keke and stefan for the very wonderful sms server tools! :mrgreen:

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.