翻译PHP代码的Xcode

我有这样的PHP代码:

$tvip = "192.168.1.96"; //IP Address of TV $myip = "192.168.1.200"; //Doesn't seem to be really used $mymac = "00-0c-29-3e-b1-4f"; //Used for the access control/validation, but not after that AFAIK $appstring = "iphone..iapp.samsung"; //What the iPhone app reports $tvappstring = "iphone.LE46C650.iapp.samsung"; //Might need changing to match your TV type $remotename = "Perl Samsung Remote"; //What gets reported when it asks for permission/also shows in General->Wireless Remote Control menu $ipencoded = base64_encode($myip); $macencoded = base64_encode($mymac); $messagepart1 = chr(0x64) . chr(0x00) . chr(strlen($ipencoded)) . chr(0x00) . $ipencoded . chr(strlen($macencoded)) . chr(0x00) . $macencoded . chr(strlen(base64_encode($remotename))) . chr(0x00) . base64_encode($remotename); $part1 = chr(0x00) . chr(strlen($appstring)) . chr(0x00) . $appstring . chr(strlen($messagepart1)) . chr(0x00) . $messagepart1; $messagepart2 = chr(0xc8) . chr(0x00); $part2 = chr(0x00) . chr(strlen($appstring)) . chr(0x00) . $appstring . chr(strlen($messagepart2)) . chr(0x00) . $messagepart2; $key = "KEY_" . $_REQUEST["key"]; $messagepart3 = chr(0x00) . chr(0x00) . chr(0x00) . chr(strlen(base64_encode($key))) . chr(0x00) . base64_encode($key); $part3 = chr(0x00) . chr(strlen($tvappstring)) . chr(0x00) . $tvappstring . chr(strlen($messagepart3)) . chr(0x00) . $messagepart3;

所以,现在我想写在Xcode这个代码! 我不知道它是如何工作!

--------------解决方案-------------

你不能指望一个正确的答案错误的问题!

  • 你要哪种编程语言使用?
  • 在哪个平台会在运行此代码?
分类:php 时间:2015-03-15 人气:0
本文关键词: PHP,Xcode中
分享到:

相关文章

Copyright (C) 55228885.com, All Rights Reserved.

55228885 版权所有 京ICP备15002868号

processed in 0.656 (s). 10 q(s)