tags:

views:

13

answers:

0

I was developing a IMbot using imified.com

This is how it works: the bot will call a URL with post method passing the Text in a input field. So we can output the data to that request and it will sent to the USER Chat window.

But my script is taking too long, so first I need to send a response asking the user to wait, and then my PHP function should call another function invoking the Bot to push a message to the user chat window.

Can some one help me how to do this ?

Here the code.

function index()
{
    $title = $this->input->post('msg');
    echo "please wait we are searching for url order ";
    //send this response to the user and execute this code below 
    if($this->order->check($title))
    {
        //checking order details the code goes here
        //invoke bot and send the these details again
        echo $order_details
    }
    else {
        echo "No Book order found with that orderid";
    }
}