Em Andamento

Remote signup API form creation (only 3 fields)

I need a simple three field form created on the home page for a newsletter signup.

It is for [url removed, login to view] and they provide us the remote access instructions below.

Emma's Remote Signup API logout

Emma offers a Web Service API that allows Emma customers with programming know-how to create a direct connection between a remote signup or entry form and their Emma audience.

They have offered us the following options for a Remote signup API:

Examples of the Remote Signup API

Code examples save a new user with the following information:

first name: Bob

email:

to the group:

references to "**username**" and "**password**" should be replaced with the Remote Signup username and password you were given.

ASP w/ ServerXMLHTTP in VBScript

string stringPost = [url removed, login to view]() 'remember a post is essentially a string delimited in a special way

stringPost = stringPost + "&username=**username**&password=**password**"

stringPost = stringPost + "&signup_post=24842&emma_account_id=14714"

stringPost = stringPost + "&group[]=1&emma_member_name_first=Bob&emma_member_email="

dim xmlhttp

set xmlhttp = [url removed, login to view]("MSXML2.ServerXMLHTTP")

[url removed, login to view] "POST","[url removed, login to view]:RemoteSignup",false

[url removed, login to view] "Content-Type", "application/x-www-form-urlencoded"

[url removed, login to view] DataToSend

[url removed, login to view] = "text/xml"

stringResult = [url removed, login to view] ' This is where you get the return value for evaluation

Set xmlhttp = nothing

ASP.NET w/ HTTPWebRequest and HTTPWebResponse in C#

string stringPost = [url removed, login to view](); // remember a post is essentially a string delimited in a special way

stringPost = stringPost + "&username=**username**&password=**password**";

stringPost = stringPost + "&signup_post=24842&emma_account_id=14714";

stringPost = stringPost + "&group[]=1&emma_member_name_first=Bob&emma_member_email=";

HttpWebRequest httpWebRequest = (HttpWebRequest)[url removed, login to view]("[url removed, login to view]:RemoteSignup");

[url removed, login to view] = "POST";

[url removed, login to view] = [url removed, login to view];

[url removed, login to view] = "application/x-www-form-urlencoded";

StreamWriter streamWriter = null;

streamWriter = new StreamWriter([url removed, login to view]());

[url removed, login to view](stringPost);

[url removed, login to view]();

HttpWebResponse httpWebResponse = (HttpWebResponse)[url removed, login to view]();

using (StreamReader streamReader = new StreamReader([url removed, login to view]())) {

stringResult = [url removed, login to view](); // This is where you get the return value for evaluation

[url removed, login to view]();

}

PHP w/ PEAR's HTTP_Client package

require_once("HTTP/Client.php");

$emma_client = new HTTP_Client();

$emma_client->setMaxRedirects(20);

// POST should be filtered appropriately

$_POST['emma_account_id'] = '14714';

$_POST['signup_post'] = '24842';

$_POST['username'] = '**username**';

$_POST['password'] = '**password**';

$_POST['group'][] = 1

$_POST['emma_member_name_first'] = 'Bob';

$_POST['emma_member_email'] = '';

$emma_client->post("[url removed, login to view]:RemoteSignup", $_POST);

$response_code = $emma_client->currentResponse();

PHP w/ cURL

$post = "signup_post=24842&emma_account_id=14714&username=**username**&password=**password**&group[]=1";

$post .= "&emma_member_email=&emma_member_name_first=Bob";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"[url removed, login to view]:RemoteSignup");

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS,$post);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

$response_code = curl_exec ($ch);

curl_close ($ch);

ColdFusion MX

<CFHTTP url="[url removed, login to view]:RemoteSignup" method="POST" throwonerror="yes">

<CFHTTPPARAM type="FORMFIELD" name="emma_account_id" value="14714">

<CFHTTPPARAM type="FORMFIELD" name="signup_post" value="24842">

<CFHTTPPARAM type="FORMFIELD" name="username" value="**username**">

<CFHTTPPARAM type="FORMFIELD" name="password" value="**password**">

<CFHTTPPARAM type="FORMFIELD" name="group[]" value="1">

<CFHTTPPARAM type="FORMFIELD" name="emma_member_name_first" value='Bob'>

<CFHTTPPARAM type="FORMFIELD" name="emma_member_email" value="">

</CFHTTP>

<CFSET ResponseCode = CFHTTP.fileContent>

Habilidades: ASP, PHP

Ver mais: myemma api, emma api, myemma remote signup, emma remote forms, coldfusion emma api, myemma remote signup api, myemmacom api, myemma api coldfusion, emma api php, myemma api asp, aspnet emma remote signup, emma remote signup api, emma remote signup, php remote direct form, emma api curl php, asp remote api, emma_account_id, myemma aspnet, https appe2manetappview login, vbscript httpwebrequest, signup api, https appe2manetapp, e2ma signup form, net httpwebrequest emma email, curlopt_ssl_verifypeer coldfusion

Acerca do Empregador:
( 82 comentários ) Vista, United States

ID do Projeto: #174057