Guest User

postDK

a guest
Jun 28th, 2012
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1. <?php
  2. $xml_data =
  3.     '<?xml version="1.0" encoding="ISO-8859-1"?>
  4. <pacsoftonline>
  5. <meta>
  6. <val n=”origin”>407000013</val>
  7. <val n=”created”>2021-06-28 15:00</val>
  8. </meta>
  9. <receiver rcvid="81010">
  10. <val n="name">Mr. Samuel Adams</val>
  11. <val n="address1">Testvejen 123</val>
  12. <val n="address2"></val>
  13. <val n="zipcode">9600</val>
  14. <val n="city">Aalborg</val>
  15. <val n="country">DK</val>
  16. <val n="contact">Sam</val>
  17. <val n="phone">+45 00110395</val>
  18. <val n="doorcode"></val>
  19. <val n="email">[email protected]</val>
  20. <val n="sms">66110395</val>
  21. </receiver>
  22. <shipment orderno="928374">
  23. <val n="from">1</val>
  24. <val n="to">81010</val>
  25. <val n="reference">9283740</val>
  26. <service srvid="P19DK">
  27. <addon adnid="COD">
  28. <val n="amount">450.00</val>
  29. <val n="account">123456789012</val>
  30. <val n="accounttype">accdk</val>
  31. <val n="reference">1234567890123456</val>
  32. </addon>
  33. </service>
  34. <ufonline>
  35. <option optid="enot">
  36. <val n=”from”>[email protected]</val>
  37. <val n="message">Ditt order är klar och paketet på väg.</val>
  38. <val n="to">[email protected]</val>
  39. </option>
  40. </ufonline>
  41. <container type="parcel">
  42. <val n="copies">1</val>
  43. <val n="weight">8</val>
  44. <val n="contents">Böcker</val>
  45. </container>
  46. </shipment>
  47. </pacsoftonline>';
  48.  
  49.  
  50. $URL = "http://www.pacsoftonline.com/ufoweb/order";
  51.  
  52.             $ch = curl_init($URL);
  53.             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  54.             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  55.             curl_setopt($ch, CURLOPT_POST, 1);
  56.             curl_setopt($ch, CURLOPT_POSTFIELDS, '&user=407000013&pin=JP8YP2&type=xml&session=po_SE&xml='.$xml_data);
  57.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  58.             $output1 = curl_exec($ch);
  59.            
  60.                    
  61.             curl_close($ch);
  62.             print_r($output1)
  63.  
  64. ?>
Advertisement
Add Comment
Please, Sign In to add comment