Skip to main content
Question Protected by CommunityBot
Tweeted twitter.com/#!/StackWordPress/status/256637030870704128
added 61 characters in body
Source Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459

ImI'm trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible?

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://xxx'); curl_setopt($ch, CURLOPT_POST, 7); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( 'auth_token' => 'xxxxxx', 'list_id' => 'xxxxx, 'name' => 'Office', 'campaign_id' => 'xxxxx', ))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://xxx');
curl_setopt($ch, CURLOPT_POST, 7);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
    'auth_token' => 'xxxxxx',
    'list_id' => 'xxxxx,
    'name' => 'Office',
    'campaign_id' => 'xxxxx',
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);

Im trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible?

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://xxx'); curl_setopt($ch, CURLOPT_POST, 7); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( 'auth_token' => 'xxxxxx', 'list_id' => 'xxxxx, 'name' => 'Office', 'campaign_id' => 'xxxxx', ))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);

I'm trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible?

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://xxx');
curl_setopt($ch, CURLOPT_POST, 7);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
    'auth_token' => 'xxxxxx',
    'list_id' => 'xxxxx,
    'name' => 'Office',
    'campaign_id' => 'xxxxx',
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);
Source Link
Jeces
  • 31
  • 1
  • 2

API integration with WordPress

Im trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible?

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://xxx'); curl_setopt($ch, CURLOPT_POST, 7); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( 'auth_token' => 'xxxxxx', 'list_id' => 'xxxxx, 'name' => 'Office', 'campaign_id' => 'xxxxx', ))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

curl_close($ch);