vyuldashev / laravel-queue-rabbitmq

RabbitMQ driver for Laravel Queue. Supports Laravel Horizon.
MIT License
1.9k stars 376 forks source link

How to use Curl ? #35

Closed oguzcicek closed 9 years ago

oguzcicek commented 9 years ago

Hello , thanks for this great package !

How can i connect a service with curl in RabbitMQ?

I mean , i want to init a curl connection in my handle method like :

   $ch = curl_init($URL);
        curl_setopt($ch, CURLOPT_MUTE, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $output = curl_exec($ch);
        curl_close($ch);
alexw23 commented 9 years ago

Try guzzle instead

vyuldashev commented 9 years ago

Why do you need to connect via "curl"?

alexw23 commented 9 years ago

I think this question is more relevant for discussion on Laravel, it's unrelated to a specific driver, and more so related to using laravel queues.

oguzcicek commented 9 years ago

i tired to connect a SMS service with curl.