fork download
  1. <?php
  2. $uid = 1205; //(this is a unique user ID, it can be the same as the one you use for your own app)
  3. $name = 'emfluence'; //(this will help you identify your users from within your Cyfe admin panel, the admin panel allows you to "log in as" your client in case you want to see what they were up to)
  4. $theme = 'light'; //(we recommend you use the default "dark" theme, you can change this to "light" if you prefer)
  5. $api_key = 'cj28gf72nfk29fn27fb10g73nf62g0u7'; //(you will be provided with an API key)
  6. $api_secret = 'fj27fjhwl1g8gh37fsqkd62j80abct4s'; //(you will be provided with an API secret)
  7. $ts = 1446056441;//time();
  8. echo $ts . "\n";
  9. $signature = base64_encode(hash_hmac('sha256', $ts.$uid, $api_secret, true));
  10. $auth = urlencode($signature);
  11. $name = urlencode($name);
  12.  
  13. //(this URL will auto login the user into Cyfe, if the user doesn't exist a new account will be auto created for you and we will begin charging you for the new user)
  14. $endpoint = "https://a...content-available-to-author-only...e.com/api/embed?key=$api_key&uid=$uid&ts=$ts&auth=$auth&theme=$theme&name=$name";
  15.  
  16. //echo $signature . "\n";
  17. //echo $endpoint . "\n";
  18. //echo '<iframe src="'.$endpoint.'" style="border:0px; " frameborder="0"></iframe>';
Success #stdin #stdout 0.02s 25776KB
stdin
Standard input is empty
stdout
1446056441