<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Using HttpClient.class.php: How to get JSON response?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Using HttpClient.class.php: How to get JSON response?</description>
<language>en</language>
<pubDate>Wed, 08 Apr 2026 12:41:07 +0000</pubDate>

<item>
<title>yuniar on "Using HttpClient.class.php: How to get JSON response?"</title>
<link>https://www.machform.com/forums/topic/using-httpclientclassphp-how-to-get-json-response#post-7314</link>
<pubDate>Wed, 16 Sep 2009 13:20:54 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">7314@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Try this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$pageContents = HttpClient::quickPost($target_url, $target_data);
require(&#38;#39;includes/JSON.php&#38;#39;);

$json = new Services_JSON();
$wildfire_response  = $json-&#38;gt;decode($pageContents);

$response_id = $wildfire_response-&#38;gt;id;
$response_loginUrl = $wildfire_response-&#38;gt;loginUrl;
$response_password = $wildfire_response-&#38;gt;password;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>alexjames01 on "Using HttpClient.class.php: How to get JSON response?"</title>
<link>https://www.machform.com/forums/topic/using-httpclientclassphp-how-to-get-json-response#post-7311</link>
<pubDate>Wed, 16 Sep 2009 03:09:54 +0000</pubDate>
<dc:creator>alexjames01</dc:creator>
<guid isPermaLink="false">7311@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I am using HttpClient.class.php to pass info to a social network API (wildfire) to sign up users on that network via one of my forms... I need to get the JSON response and parse part of it to redirect from one of the MachForms.&#60;/p&#62;
&#60;p&#62;An example JSON response would be:&#60;/p&#62;
&#60;p&#62;---------&#60;/p&#62;
&#60;p&#62;{&#60;br /&#62;
    &#34;id&#34;: &#34;72e334df-5d35-4ca0-bcba-49fb4d2070e2&#34;,&#60;br /&#62;
    &#34;loginUrl&#34;: &#34;http://yourwildfiredomain.com/securi...c-afe367ac17fa&#34;,&#60;br /&#62;
    &#34;password&#34;:&#34;zODqFbeN&#34;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;---------&#60;/p&#62;
&#60;p&#62;I need to catch the loginUrl and redirect them on form submission. &#60;/p&#62;
&#60;p&#62;Here is the code I am using (starting line 1183 on post-functions.php)&#60;/p&#62;
&#60;p&#62;---------&#60;/p&#62;
&#60;p&#62;if($form_id == 1 &#124;&#124; $form_id = 3){&#60;br /&#62;
	$target_url = 'http://****.wildfireactionnetwork.com/api/users';&#60;/p&#62;
&#60;p&#62;    // SEND WILDFIRE API KEY&#60;br /&#62;
	$target_data['apiKey']				= &#34;****&#34;;&#60;/p&#62;
&#60;p&#62;    // SEND WILDFIRE THE FULL NAME&#60;/p&#62;
&#60;p&#62;	$firstnm = $table_data['element_1_1'];&#60;br /&#62;
	$lastnm = $table_data['element_1_2'];&#60;br /&#62;
	$fullnametmp = $firstnm . &#34; &#34; . $lastnm;&#60;/p&#62;
&#60;p&#62;	$target_data['fullName'] 			= $fullnametmp;&#60;/p&#62;
&#60;p&#62;	// SEND WILDFIRE THE EMAIL&#60;br /&#62;
	$target_data['email'] 			= $table_data['element_2'];&#60;/p&#62;
&#60;p&#62;	require 'lib/HttpClient.class.php';&#60;/p&#62;
&#60;p&#62;     $pageContents = HttpClient::quickPost($target_url, $target_data);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;-------
&#60;/p&#62;</description>
</item>

</channel>
</rss>
