Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is curl :
- $url = http://amt-ars-d.sevenverbs.com/api/v1/contacts?expand
- $ch=curl_init();
- curl_setopt($ch,CURLOPT_URL, $url);
- curl_setopt($ch,CURLOPT_POST, 1);
- 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");
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- $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"}
- $templateval = str_replace(' ','%20',trim($templateval1));
- $ch=curl_init();
- curl_setopt($ch,CURLOPT_URL, $url);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- $buffer = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement