2

As part of my project, I'd like to send an image to a phone number.

I understand I can achieve this quite easily with e-mail, but I'd like to pursue the MMS route first. I've looked around online but can't find any useful information.

Has anyone done this? The MMS's will be sent to a UK number if that has any bearing on my choices.

0

1 Answer 1

1

You can use a service that is connected to the GSM network. You use a simple API to send SMS messages or attach MMS images. The rates are fair.

I use TextLocal in UK and you can send messages to the world. There are allot of other service providers available too.

Simple PHP to send a text message

<?php
    // Textlocal account details
$username = urlencode('[email protected]');
    // Get this when logged in at https://control.txtlocal.co.uk/docs/
$hash = urlencode('Your API hash');
    // Message details
$numbers = urlencode(447123456789,447987654321);
$sender = urlencode('Textlocal');
$message = urlencode('This is your message');

    // Prepare data for POST request
$data = 'username=' . $username . '&hash=' . $hash
     . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
    // Send the GET request with cURL
$ch = curl_init('https://api.txtlocal.com/send/?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
    // Process your response here
echo $response;
?>
5
  • 2
    You could also use SMS Pi if you are in the UK. smspi.co.uk which, unlike TextLocal in UK, it is free.
    – JVarhol
    Commented Feb 2, 2014 at 19:49
  • Freeeee? How is this possible?
    – Piotr Kula
    Commented Feb 2, 2014 at 19:51
  • I don't know, maybe it's black magic! :D
    – JVarhol
    Commented Feb 2, 2014 at 19:52
  • Nah its just for playing around and funded by donations. You cant really send SMS without being connected to the GSM network and definitely not for free.
    – Piotr Kula
    Commented Feb 3, 2014 at 10:06
  • I run smspi and am happy to give free accounts for any raspberry pi projects. The site breaks even so I can afford to give free accounts. Twitter: @smspiuk Email: [email protected]
    – txt3rob
    Commented Sep 6, 2015 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.