Created
November 4, 2015 09:45
-
-
Save TiagoGouvea/65f12b3fa9bd5a6cde3f to your computer and use it in GitHub Desktop.
Teste curl_wrap with Agile CRM in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Test Agile curl_wrap | |
require 'php-api-master/curlwrap_v2.php'; | |
$email = "[email protected]"; | |
// Try get contact from Agile | |
$contact = curl_wrap("contacts/search/email/" . $email, null, "GET"); | |
// Get contatct Agile | |
$contact = json_decode(json_encode(array_filter((array)json_decode($contact)))); | |
//echo $contato->properties[0]['name']; | |
echo "<pre>"; | |
//var_dump($contact->properties[0]->value); | |
var_dump($contact); | |
echo "</pre>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Nice code written there! :)
On Line #5, suppose I am sending out emails/newsletter with hyperlink buttons (that will then automatically update the contact's properties), how do we programmatically retrieve the contact's email from the hyperlink buttons?
Because over here we're kinda like hardcoding an email address to $email, as a test case.
Thanks for your help! And sorry I'm a beginner at programming so I'm a bit lost :/