doumisha5081 2012-03-27 13:30
浏览 59
已采纳

如何实现云计算并在PHP中生成令牌?

I wanted to do a cloud computing project in php. The project is that users will store their files in cloud server and if there is any manipulation in their files without their knowledge, then it should detect and correct it.. My question is that how can i implement this in php???

In base paper it is given that we should generate tokens for each file in server, and while detecting we can use that token to verify..

I didn't use socket programming.. Suggest me how to do pls...

  • 写回答

1条回答 默认 最新

  • doujing5150 2012-03-27 14:28
    关注

    The best way to know if a file as been modified or altered is to save a has copy of that file

    $file = "name.pdf" ;
    $md5 = md5_file($file);
    $sha1 = sha1_file($file); 
    

    Save a copy og each has in a database with the file name ... always check with the hash every time you need to verify or retrieve the file ... you would know if it has been illegally modified

    Automatically correcting the file ... you can also save a backup copy on a CDN hosting and only retrieve it to replace the existing one if it has been modified or tampered with.

    Another option is last modification date .. but that can be tricked ..

    Let me know if this helps

    Thanks :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!