Skip to content

Instantly share code, notes, and snippets.

@TiagoGouvea
Created November 4, 2015 09:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TiagoGouvea/65f12b3fa9bd5a6cde3f to your computer and use it in GitHub Desktop.
Save TiagoGouvea/65f12b3fa9bd5a6cde3f to your computer and use it in GitHub Desktop.
Teste curl_wrap with Agile CRM in PHP
<?php
// Test Agile curl_wrap
require 'php-api-master/curlwrap_v2.php';
$email = "some@email.com";
// 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>";
Copy link

ghost commented May 22, 2018

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 :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment