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 :)

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

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用