PHP Classes
elePHPant
Icontem

File: publisher.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  UsagiMQ  >  publisher.php  >  Download  
File: publisher.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: UsagiMQ
Manage message queues stored using Redis
Author: By
Last change:
Date: 2 years ago
Size: 512 bytes
 

 

Contents

Class file image Download
<?php
$ch
= curl_init();

curl_setopt($ch, CURLOPT_URL, "http://localhost/UsagiMQ/mq.php?id=200&op=INSERTCUSTOMER&from=SALESSYSTEM" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, "** IT IS WHAT WE WANT TO SEND**" );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain'));

$result=curl_exec ($ch);

echo
$result; // if returns OKI then the operation was successful. Otherwise, it an error.