can not send by php

smith's Avatar

smith

07 Jun, 2011 05:10 AM via web

<?
$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

  1. 2 Posted by smit on 07 Jun, 2011 12:36 PM

    smit's Avatar

    www.6te.com
    www.ueuo.com
    I try not good

  2. 3 Posted by Dave Hoff on 09 Jun, 2011 02:51 PM

    Dave Hoff's Avatar

    Sounds like some kind of SSL error. Can you try without using https in the url?

  3. 4 Posted by smith on 12 Jun, 2011 08:09 AM

    smith's Avatar

    when I change $url = 'http://www.imified.com/api/bot/';
    Does not reflect

  4. 5 Posted by smith on 12 Jun, 2011 08:28 AM

    smith's Avatar

    <?
    $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);
    ?>

  5. 6 Posted by smith on 12 Jun, 2011 08:29 AM

    smith's Avatar

    <?
    $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);
    ?>

  6. Dave Hoff closed this discussion on 20 Jun, 2011 01:32 PM.

Comments are currently closed for this discussion. You can start a new one.