send message to user not working

Dev's Avatar

Dev

09 Jul, 2009 12:30 PM via web

I tried http://www.imified.com/developers/api#sendmessage sendmessage in api but it seems not working.

I have set botkey , apimethod, userkey, account username and password

When i tried to run i got blank screen with no XML response.

My Bot is ***@bot.im

Any help appreciated

  1. 2 Posted by mpahic on 09 Jul, 2009 08:28 PM

    mpahic's Avatar

    Are you using php curl? I know I had to put CURLOPT_SSL_VERIFYPEER to false in order to push messages.

  2. 3 Posted by Dev on 10 Jul, 2009 01:13 AM

    Dev's Avatar

    Yes I m using php curl. I tried SSL to false but still the same and give me no XML response. Below are my values set

    $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_USERPWD, 'accountusername:password'); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); $xml = curl_exec($ch); curl_close($ch); print_r($xml);

    Please help

  3. 4 Posted by mpahic on 10 Jul, 2009 07:56 PM

    mpahic's Avatar

    You do have curl enabled in php.ini? Otherwise you would get warnings right?
    Other thing that comes to mind is to try increasing timeout or removing that line.
    Btw, does getuser method work for you?

  4. Support Staff 5 Posted by Adam Kalsey on 10 Jul, 2009 08:06 PM

    Adam Kalsey's Avatar

    Have you tried adding some curl error handling code to your app to see
    if curl the curl call is successful?

  5. 6 Posted by Dev on 11 Jul, 2009 01:55 AM

    Dev's Avatar

    Thanks everybody its working now. The problem was my server does not support SSL for curl.

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