Advertisement
edutrul

Php guzzle send data via post method

Jul 1st, 2013
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * @file
  4.  *
  5.  * This document is only for testing purposes.
  6.  *
  7.  * @author Telaya Escobedo, Luis Eduardo
  8.  */
  9.  
  10. // Let php show all erors.
  11. error_reporting(E_ALL);
  12. ini_set('display_errors', '1');
  13.  
  14. require 'vendor/autoload.php';
  15. use Guzzle\Http\Client;
  16.  
  17. $client = new Client();
  18. $request = $client->post('http://200.31.114.39/Servicio-Rest/STMPOST_SMAR.svc/Registrar_Postulante', null, array('CO_AREA_DESA' => 'test'));
  19. $response = $request->send();
  20. $data = $response->xml();
  21.  
  22. print_r($data);
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement