pkjoshi
Active Member
I am using the scheduled task to send emails on birthdays:
The setting are like this:
Run:1
Unit:day
To: {member___email}
Messageear {member___first_name} <br>
<b>Lions Dist ---</b> wishes you a very very Happy Birthday.
condition:
This I think is working Ok on the limited testing I have done.
Now I want to send the SMS using the Schedule PHP plugin.
Code is like this:
Now what I want is that the SMS should be sent only to members who's birthday is today. In the email plugin I was able to select the To field and fill up the condition field.
Since I don't have PHP coding knowledge, I need little help how I can modify my above code so that the SMS are sent to the member who's birthday is today.
Thanks in advance
The setting are like this:
Run:1
Unit:day
To: {member___email}
Messageear {member___first_name} <br>
<b>Lions Dist ---</b> wishes you a very very Happy Birthday.
condition:
Code:
$a =(date('d-m',strtotime($row->member___birth_date_raw))==date('d-m'));
return $a;
This I think is working Ok on the limited testing I have done.
Now I want to send the SMS using the Schedule PHP plugin.
Code is like this:
Code:
$request = "";
$param[ 'mobileno' ] = "91"."{member___mobile}";
$param[ 'message' ] = "Dear {members___name},
Lions -- wishes you a very very Happy Birthday";
$param[ 'username' ] = "username";
$param[ 'password' ] = "password";
$param[ 'sendername' ] = "sendername";
foreach ( $param as $key => $val ) { $request .= $key . "=" . urlencode( $val );
$request .= "&";}$request = substr( $request, 0, strlen( $request ) - 1 );
$url = "http://example-sms.com/TransSMS/SMSAPI.jsp?" .
$request;$ch = curl_init( $url );curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec( $ch );
curl_close( $ch );
Now what I want is that the SMS should be sent only to members who's birthday is today. In the email plugin I was able to select the To field and fill up the condition field.
Since I don't have PHP coding knowledge, I need little help how I can modify my above code so that the SMS are sent to the member who's birthday is today.
Thanks in advance