can not send by php
<?
$url = 'https://www.imified.com/api/bot/';
$data = array( 'botkey' =>
'0F0C249B-92EA-43C8-9B74576D63AE3896', 'apimethod' => 'send',
'userkey' => 'A7417BCF-89FB-4388-849DED9ED49CEBEA', // char
'msg' => 'Hello User', ); $ch = curl_init(); curl_setopt($ch,
CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERPWD, '***@gmail.com:xxxxxx');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$xml = curl_exec($ch); if (curl_error($ch)) {
print "ERROR ". curl_error($ch) ."\n
";
} curl_close($ch);
print_r($xml);
?> when I not add :curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,
FALSE); see Peer certificate cannot be authenticated with known CA
certificates
when I add curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE)
not send anything,why,please me
Comments are currently closed for this discussion. You can start a new one.
2 Posted by smit on 07 Jun, 2011 12:36 PM
www.6te.com
www.ueuo.com
I try not good
3 Posted by Dave Hoff on 09 Jun, 2011 02:51 PM
Sounds like some kind of SSL error. Can you try without using https in the url?
4 Posted by smith on 12 Jun, 2011 08:09 AM
when I change $url = 'http://www.imified.com/api/bot/';
Does not reflect
5 Posted by smith on 12 Jun, 2011 08:28 AM
<?
$url = 'http://www.imified.com/api/bot/'; $data = array( 'botkey' => '0F0C249B-92EA-43C8-9B74576D63AE3896', 'apimethod' => 'send', 'userkey' => '0F0C249B-92EA-43C8-9B74576D63AE3896', // char 'msg' => 'Hello User', ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERPWD, '***@gmail.com:xxxxxx');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$xml = curl_exec($ch); if (curl_error($ch)) {
print "ERROR ". curl_error($ch) ."\n
";
} curl_close($ch);
print_r($xml);
?>
6 Posted by smith on 12 Jun, 2011 08:29 AM
<?
$url = 'http://www.imified.com/api/bot/';
$data = array( 'botkey' => '0F0C249B-92EA-43C8-9B74576D63AE3896', 'apimethod' => 'send', 'userkey' => '0F0C249B-92EA-43C8-9B74576D63AE3896', // char 'msg' => 'Hello User', );
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERPWD, '***@gmail.com:111111');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$xml = curl_exec($ch); if (curl_error($ch)) {
print "ERROR ". curl_error($ch) ."\n
";
} curl_close($ch);
print_r($xml);
?>
Dave Hoff closed this discussion on 20 Jun, 2011 01:32 PM.