Author |
Post |
|
#1 Fri Aug 14, 2009 08:38, 189 months ago.
|
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: GismoSMSSendSMS now
|
|
#2 Sun Aug 16, 2009 12:39, 189 months ago.
|
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.
|
|
#3 Mon Aug 17, 2009 18:26, 189 months ago.
|
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 uLinkhere's a screenshot of the web form: web formThe 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  )
|
|
#4 Fri Aug 21, 2009 13:36, 189 months ago.
|
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
|
|
#5 Fri Aug 21, 2009 17:00, 189 months ago.
|
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.
|
|
#6 Fri Aug 21, 2009 17:39, 189 months ago.
|
Member
Registered: Jun 2009
Location: Manila, Philippines
Topic owner
|
Wow, thanks so much keke! Ü
|
|
#7 Fri Aug 21, 2009 19:38, 189 months ago.
|
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?
|
|
#8 Fri Aug 21, 2009 20:15, 189 months ago.
|
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! 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?  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, 189 months ago. »
|
|
#9 Sat Aug 22, 2009 12:00, 189 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? 
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.
|
|
#10 Sat Aug 22, 2009 16:48, 189 months ago.
|
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...
|
|
#11 Sat Aug 22, 2009 17:59, 189 months ago.
|
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? 
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..
|
|
#12 Sun Aug 23, 2009 12:24, 189 months ago.
|
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? 
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.
|
|
#13 Mon Aug 24, 2009 18:46, 189 months ago.
|
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! 
|