Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Here is curl :
  2. $url = http://amt-ars-d.sevenverbs.com/api/v1/contacts?expand
  3. $ch=curl_init();
  4. curl_setopt($ch,CURLOPT_URL, $url);
  5. curl_setopt($ch,CURLOPT_POST, 1);
  6. curl_setopt($ch,CURLOPT_POSTFIELDS, "Href=null&ReturnCode=null&ForeignContactId=1234567890&ForeignAgentId=1234567890&CommunicationStartDate=3/31/2015 9:34:27 AM&Status=Customer&FirstName=First&LastName=Last&Email=developertest@gmail.com&Phone=null&City=null&SignupDate=3/31/2015 9:34:27 AM&BirthDate=3/31/2015 9:34:27 AM&AnniversaryDate=3/31/2015 9:34:27 AM");
  7. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  8.  
  9. $templateval1 =http://amt-ars-d.sevenverbs.com/api/v1/contacts?expand={"Href=null&ReturnCode=null&ForeignContactId=1234567890&ForeignAgentId=1234567890&CommunicationStartDate=3/31/2015 9:34:27 AM&Status=Customer&FirstName=First&LastName=Last&Email=developertest@gmail.com&Phone=null&City=null&SignupDate=3/31/2015 9:34:27 AM&BirthDate=3/31/2015 9:34:27 AM&AnniversaryDate=3/31/2015 9:34:27 AM"}
  10. $templateval = str_replace(' ','%20',trim($templateval1));
  11.  
  12. $ch=curl_init();
  13. curl_setopt($ch,CURLOPT_URL, $url);
  14. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  15. $buffer = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement