How to send SMS from mobile browser - php

I'm looking for a method to send an SMS from a mobile browser. Currently I have a link:
<a href = 'some thing..'>Send SMS to Me</a>
The idea is, if the user clicks on the above link, a SMS is automatically sent to my phone, from the user's phone.
Note : I had tried <a href = 'sms:9xxxxxx?body...'> but its asks the user to confirm if they want to send an SMS. Does anyone have any ideas for this?

I don't think its possible without actually getting the users consent - imagine a solution where a website could get the phonenumber of any smartphone without the client allowing it? Sounds like a great start for a malicious use.
Your only possibility, besides building a web app to which the still has to insert his phonenumber manually, is embracing the fact that you reached a barrier that has been put there for your (and everyone else's) security and privacy.

One way of doing it is that, <a href = 'localhost/sms'>Send SMS to Me</a> this http link will probably send to the server and that server jsp or servlet should send the sms to you.

The sms: prefix in an anchor link can lead to the mobile phone's own SMS application to be activated and the SMS is the prompted to be sent from their mobile phone, as you say.
That method means you could prompt the user to send an email FROM their number TO your prefixed number in your HTML.
The alternative is to prompt the user to enter their mobile number on your website and then submitting that to your server you could use an SMS Gateway to send an SMS to them.
It's not clear from your question which direction you want messages to flow from and to but you'd get a more consistent result from sending the SMS from your web server via an SMS Gateway because then it wouldn't matter what kind of browser it was.

Related

Notification system to alert the user

I would like to to have a notification system to alert the user via Google SMS system and register user with their phone number. I would like to send the alert when certain condition is reached in a PHP web application. Would it be possible? Could you please give some suggestion?
Yes it is possible. There are apis available for this functionality. You could implement this yourself and you can send text messages via email if you use an api to figure out the phone carrier of the user.

Send HTML email without user interaction by calling PHP script from iOS Swift 3

I recently ran into the problem where I found out that Apple does not allow developers to send an email directly from code without user interaction. This causes some difficulties on my app as I need a code generated email which is in HTML format to be sent from my website server to myself, a third party and the user of the app. I have a few questions regarding this:
Is it acceptable to use a PHP script to send the emails for me by calling the script from code?
Will doing it this way have my app rejected from app store as I have read that bypassing user interaction in this regard will have the app rejected?
There are tons of apps on my iOS device that send emails without me having to interact except for pressing a "submit" button or similar. How are these apps doing it?
Basically, I also need the client to just press a button and 3 emails are sent in HTML format. The client is aware of an email being sent, but I need it in HTML format without the mail client showing up. I have the same app developed on Android and if I cannot have the same flow on Apple devices it kind of breaks look from android to ios. I know this is possible as I have apps on my phone that does it. My question is, are they using PHP scripts? If so, I can do that, but I want to be sure that my app will not be rejected from App Store.
You can use the API from your webserver for this. If you have for example an API path
/mail
You can send all the relevant information in as POST paramaters (e.g. "subject" : 'test mail') and from your webserver send the email with a mail function.
This is perfectly acceptable.
You can attach this webserver call to a UIButton to make it user-interactable:
#IBAction func mailToUser(sender: UIButton) {
// POST request to /mail with relevant information
}

How to Automate SMS from PHP mysql at Particular point of Time

I have a website where people will book for Site visits.The Support Executive Confirms Site visit in the previous day. Once the Site visit is confirmed on the day on which site visit should happen the customer should receive SMS in morning telling that you have site visit today as requested.
I have Third party SMS Service
Now I Should Run a Code in PHP, MySQL which sends a SMS in the morning on which the site visit should happen
How can I Do that
Cron -> starts PHP-Script , PHP Script reads records from the SQL Table and checks if an SMS has to be sent, i assume its sms over mail, so you can use the integrated php function to send out mails to the sms gateway. For the guy confirming the visits, create another site with proper authentication where he can access the table and agree with the site-visits and anotherone for the customer to register for site visits
You need a cron job set to run in morning which will call your php file have code for looking in database for customers you need to send sms to.
Yo need to register to sum sms gateway provide 2 good one i know is clickatell and eztexting.
You can get there api for sending sms in there website.
Happy Smsing :D
Set a Cron Jobs in your Control panel.Try this link
http://www.devx.com/DevX/Article/39900/1954
If you would like to try an entirely different approach, check out:
Sent.ly - http://sent.ly
I am the founder of Sent.ly and thought maybe Sent.ly could help you out...
Sent.ly allows you to use an Android phone as an SMS gateway. So... you could just purchase a cheap Android phone ($150 or so) and set up Sent.ly on it and put a SIM in the phone.
By calling the Sent.ly API, the SMS would go out through the SIM in your Android phone. Sent.ly also has the option for scheduling an SMS for sending later which is your use case.
This also allows your PHP application to RECEIVE SMS in addition to just sending it out.
You can setup rules and if an incoming message matches a rule, it would be posted to a PHP page of your choice.
Since I am a great fan of stackoverflow, I would like to invite you to try Sent.ly. We would be happy to set you up with extra credits if you like. Just mail us at support#sent.ly
Cheers,
Varun
I have developed a system like this for use with some of my clients, and you can easily use it to integrate with your website or applications, through HTTP POST or WebServices (using PHP, C# or whatever).
If you are interested just leave an email or other contact information as a reply to this answer and I will gladly send you a sample code of how to send SMS, setting the desired time for sending messages, beyond other things, through our system.
You will not need to have any kind of cron knowledge and setup, it is all handled by our system, and the code is pretty simple and straight forward. You will only need to call our services upon site visit confirmation, setting the desired message sending time, and our system will do the rest.
Best regards.

How can my website receive email from a mobile phone?

I want to receive emails from mobile phone and display it on my website implemented PHP.
My site is a free messaging system that sends messages to mobile phones using sendgrid API
I want to display messages from cell phones on my website. Is there any API available ?
You don't need any APIs to do this task. What you need is to setup mail server on your server to be able to receive emails. It's nothing difficult in sms to emails. It's absolutely identical to regular emails. So you should setup your mail server to call your receiver script which will process the email, insert into your database etc. Take a look at exim or qmail.
How it will work:
your website sends email to, lets say, 91700000001#vtext.com from user#yourwebsite.com
91700000001 replies to user#yourwebsite.com that goes to your mail server
you have filter on your mail server to check, for example, if emails came from carriers domain (vtext.com, att.com etc), and hit your receiver script
the receiver scripts gets an email, parse it, inserts into the database
your display the data from the db on your website
Email from mobile? Do you meant text (sms)? Every mobile phone can receive email if they have internet connection. Your question is not very clear, can you rewrite your question to understand very clearly.
SMS GupShup
GupShup Apps platform will allow you to create sms applications that will allow your website to interact with your system.
Check out the FAQ first to see if it meets your requirement.
Then check the requirements for creating your application.
You can find the list of APIs here.
Sample Code (click on Quote App in PHP on extreme left.)

sms through php from any no

I know I can send sms through php using api or gateway.
But my question is how those websites send sms through our mobile no. How is this done.
Any help
SMS is fundamentally like email, it trusts the sender to be truthful about who they are sending from. I use clickatell to send SMS and in the early days - 2004/5 you could send an sms to anyone from anyone without any special permission, but they quickly shut this down for security reasons, you now have to register and prove your rights to send from a particular address.
Basically in order for you to do it you need to either sign up with a mobile provider or have an agreement with your sms provider to allow you to send sms from whoever you wish. There may be senders out there who are less strict in setting the sender.
They would communicate with a provider (possibly through a third party) also using an API of sort. One of the parameters they would pass is a source number. So when the SMS is sent there is header information saying it came from a specific number. It is possible to set this value to a text string too instead of a number. So the SMS might look to come from for example 'STACKOVERFLOW' instead of '12345678'.

Categories