Pro API for Remote Operations #223

Open
raamdev opened this Issue Jun 9, 2015 · 4 comments

Projects

None yet

4 participants

@raamdev
Member
raamdev commented Jun 9, 2015

KB Article Creation Checklist
  • Write initial draft for this KB Article; label this issue draft and either questions or tutorials
  • Add required YAML configuration
  • Add Tags for this KB Article to the YAML config (see YAML Keys (Explained))
  • Edit and finalize draft for publishing (remove draft label, add draft-finalized label)
  • Assign Issue to yourself and create Markdown file (remove draft-finalized label, add pending)
  • Project Lead: Review and Publish KB Article (remove pending label, add published label)
Additional TODOs

Additional TODO list items go here.


:octocat: View Markdown File | ✏️ Edit Markdown File
📃 Published KB Article: http://s2member.com/kb-article/pro-api-for-remote-operations/


@raamdev raamdev self-assigned this Jun 9, 2015
@raamdev raamdev closed this Jun 9, 2015
@raamdev raamdev added published and removed draft labels Jun 9, 2015
@yaronelh

The article only talks about PHP, it would be nice to know if other languages are supported in remote Operators. And maybe an example in another language other than PHP.

Other articles even linked in this one, talk about constance and globals in js, so it would be nice to have some additional information here

A few words about that, would have saved me the ticket.

@jaswsinc
Member

@yaronelh Thanks for the feedback. I'm reopening this issue for further enhancements.

@jaswsinc jaswsinc reopened this Jul 27, 2015
@yaronelh

@jaswsinc You're welcome, and thank you for the answer you sent in the ticket.
We are still working with that, trying to make it work for what we need. Cheers.

@renzms
Contributor
renzms commented Dec 3, 2015

Work in progress for cURL equivalent for file_get_contents()

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://my-url.com/?s2member_pro_remote_op=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HEADER => false,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => "content-type: application/x-www-form-urlencoded",
  CURLOPT_POSTFIELDS     => 's2member_pro_remote_op='.urlencode(serialize($op)),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
@raamdev raamdev removed their assignment Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment