1 Replies - 10975 Views - Last Post: 09 March 2011 - 06:09 AM Rate Topic: -----

#1 epidemik  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 14-June 08

A php to cf conversion question

Posted 08 March 2011 - 10:02 PM

I am trying to convert this to cold fusion, trying to figure out the variables, i know that $room is a var and can be set with cfset but what about the $hash variable. Just trying to find and understanding to be able to get this done for now and future projects thanks for any help


<?php

$room = "RappinLounge";
$ip_address = $_SERVER['REMOTE_ADDR'];
$api_secret_key = "00b93188189a21ff2b3b7fe16981e446";

$hash = md5($room . ":" . $ip_address . ":" . $api_secret_key);

?>

<script type='text/javascript'> 
var tinychat = { room: "4d76e9e0dc332", key: "api_key", autoop: "<?=$hash;?>"};
</script> 
<script src="http://tinychat.com/js/embed.js"></script> 
<div id="client"></div>
</body>
</html>



Is This A Good Question/Topic? 0
  • +

Replies To: A php to cf conversion question

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1947
  • View blog
  • Posts: 3,488
  • Joined: 13-January 08

Re: A php to cf conversion question

Posted 09 March 2011 - 06:09 AM

View Postepidemik, on 09 March 2011 - 12:02 AM, said:

...i know that $room is a var and can be set with cfset but what about the $hash variable...


CF9 Hash function
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1