Jump to content

Recommended Posts

In the message it shows: To, From, Subject. An example would be:

 

FRM:site.com

SUBJ: Subject

MSG: my message

 

I would like to change it so it would look like this:

my message

 

I am using the PHP mail function. How, or is it possible to do this?

 

// $e is the users phone provider email extention.
$headers .= 'To: '.$_SESSION['first'].' <'.$row['phoneNumber'].'@'.$e.'>' . "\r\n";
$headers .= 'From: DudEel.com <no-reply@dudeel.com>' . "\r\n";
mail($row['phoneNumber'].'@'.$e, 'DudEel Pin', 'Your Pin: '.$pin, $headers);

Link to comment
https://forums.phpfreaks.com/topic/120295-sms-question/
Share on other sites

Login

Looks like you reached a page that requires a login, enter your email and password on the right hand side to log in. If you don't have an account with us, click on "Create Account" under the login button.

 

The account creation period only takes a few minutes, just answer a few simple questions, confirm your email, and sign in. Within minutes you can have a page with us, and start creating your pages for users to come to. Make some friends, watch some movies, and look at some pictures.

 

Creating, operating, and maintaining your account is free of charge (unless you hire someone to do it for you). If you hire someone for this job we are in no way responsible for any losses you may take (password/data/media/etc.).

 

Warning: include(incl/boxes/login.php) [function.include]: failed to open stream: No such file or directory in /home/.marble/ryannaddy/dudeel.com/login.php on line 33

 

Warning: include() [function.include]: Failed opening 'incl/boxes/login.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.marble/ryannaddy/dudeel.com/login.php on line 33

 

Duno if you knew??? Entered username: ' Password: '

Link to comment
https://forums.phpfreaks.com/topic/120295-sms-question/#findComment-619760
Share on other sites

 

Warning: include(incl/boxes/login.php) [function.include]: failed to open stream: No such file or directory in /home/.marble/ryannaddy/dudeel.com/login.php on line 33

 

Warning: include() [function.include]: Failed opening 'incl/boxes/login.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.marble/ryannaddy/dudeel.com/login.php on line 33

 

Duno if you knew??? Entered username: ' Password: '

 

You didn't get those errors because you entered in a single quote, you got those because I included the wrong file, it should be fixed.

Link to comment
https://forums.phpfreaks.com/topic/120295-sms-question/#findComment-619762
Share on other sites

I found this on my Web host's site, it helps send SMS messages, but you are going to have to do a little programming, and mess with it.

 

<?php


##################################################
# SAMPLE PHP CODE TO SEND SMS VIA SERVAGE API
##################################################

// Send SMS function
function sendSMS($number,$message,$concat = 1) {
$url = 'http://smsgateway.servage.net/sms.php';
$customer = 'YOURCUSTOMERID';
$key = 'YOURKEY';
$request = $url.'?customer='.$customer.'&key='.$key.'&number='.urlencode($number).'&message='.urlencode($message).'&concat='.$concat;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
return split(',',$response);
}

// Integration in your project
$sms_api_result = sendSMS('number','text','1');

// Check if SMS was received by the API or not
if ($sms_api_result[0] == 'OK') {
// Ok, SMS received by the API
// Do something here...
}
else {
// Failure, SMS was not received by the API
// I this example we display the response to identify the error
print_r($sms_api_result);
}


##################################################
# SAMPLE PHP CODE FOR SMS COVERAGE QUERY
##################################################

// Coverage Query function
function coverageQuery($number) {
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://smsgateway.servage.net/sms_coverage.php?number='.$number); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
$data = curl_exec($ch); 
curl_close($ch);
if (substr($data,0,2) == 'OK') return true;
else return false;
}


?>

Link to comment
https://forums.phpfreaks.com/topic/120295-sms-question/#findComment-619840
Share on other sites

I found this on my Web host's site, it helps send SMS messages, but you are going to have to do a little programming, and mess with it.

 

<?php


##################################################
# SAMPLE PHP CODE TO SEND SMS VIA SERVAGE API
##################################################

// Send SMS function
function sendSMS($number,$message,$concat = 1) {
$url = 'http://smsgateway.servage.net/sms.php';
$customer = 'YOURCUSTOMERID';
$key = 'YOURKEY';
$request = $url.'?customer='.$customer.'&key='.$key.'&number='.urlencode($number).'&message='.urlencode($message).'&concat='.$concat;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
return split(',',$response);
}

// Integration in your project
$sms_api_result = sendSMS('number','text','1');

// Check if SMS was received by the API or not
if ($sms_api_result[0] == 'OK') {
// Ok, SMS received by the API
// Do something here...
}
else {
// Failure, SMS was not received by the API
// I this example we display the response to identify the error
print_r($sms_api_result);
}


##################################################
# SAMPLE PHP CODE FOR SMS COVERAGE QUERY
##################################################

// Coverage Query function
function coverageQuery($number) {
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://smsgateway.servage.net/sms_coverage.php?number='.$number); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
$data = curl_exec($ch); 
curl_close($ch);
if (substr($data,0,2) == 'OK') return true;
else return false;
}


?>

 

Sorry, but I don't want to use a service to send text messages.

Link to comment
https://forums.phpfreaks.com/topic/120295-sms-question/#findComment-619842
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.