suavebum Posted September 23, 2009 Share Posted September 23, 2009 My company is trying to create on demand emails through MyEmma (A newsletter site) using an API call. They have provided me with this sample code: 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'] = '2975'; $_POST['signup_post'] = '24863'; $_POST['username'] = '**username**'; $_POST['password'] = '**password**'; $_POST['group'][5376249] = 1; $_POST['emma_member_name_first'] = 'Bob'; $_POST['emma_member_email'] = '[email protected]'; $emma_client->post("https://app.e2ma.net/app/view:RemoteSignup", $_POST); $response_code = $emma_client->currentResponse(); I have never used PHP before and we are trying to keep this in house instead of using our contractors. Unfortunately, no one in house knows PHP and so this project has fallen on me and I am at a loss of where to start. I first just want to create a simple html file with 2 text boxes for member first name and member email just to test it. Would the best way be to put this code into the html file? Or to call a PHP file through the html file? Any suggestions on how to get this working, or where to find more information would be greatly appreciated. Thank you. Link to comment https://forums.phpfreaks.com/topic/175257-need-help-with-an-api-call/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.