i want to add product to shopping cart via API , i use this code

    //return "Add Product To Cart ... ";
    $proxy = new SoapClient('http://mymagent.com/api/v2_soap/?wsdl'); 

    $sessionId = $proxy->login('zazaza', '123456'); 

    $cartId = $proxy->shoppingCartCreate($sessionId);

    $result = $proxy->shoppingCartProductAdd($sessionId, $cartId,$sessionId, 10, array(array('product_id' => '166');   

    return $result;

but it return to me

HTTP Error: socket read of headers timed out

can any body help me ? thanks

1 Answer 1


Please check default_socket_timeout value in php.ini and try to increase it..


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.