dsn1327 2011-01-28 05:32
浏览 15
已采纳

我的服务器上的网站截图取决于USER

Hi,

I came upon many similar questions like this but i could not find simple answer.Also my requirement is to create my web page thumbnail onto my server for a particular User (depending on SESSION) .Website is dynamic means for every different user content changes like that contents of users on facebook.

What I need to do here is generate a screen shot when user experiences problem with the application and click the capture button

enter image description here

I got many options like

  • libwkhtmltox
  • wkhtmltopdf

but not getting which I should use also suggest other if better.

I have linux server and using core PHP and have shell access to it.

Please don't refer external site as they are unable to get snapshot in my case (as I said SESSION variable is maintained for every user).

Please help me with the tutorial.

Thanks in advance

  • 写回答

1条回答 默认 最新

  • douqi1928 2011-01-28 06:41
    关注

    libwkhtmltox and wkhtmltopdf are both great technologies for capturing images of web pages. However, the problem is that it's really hard to get these technologies to have the same session as your user, if not impossible. Additionally, many errors users experience aren't reproducible on a second request. (Errors caused by db connection errors, caching, etc.) So doing something like this will have limited value. One alternative would be to throw a popup when they click your send errorpage snap that explains how to take a screenshot.

    If you absolutely want to go down this path of automating the screenshot, here's a crazy, probably stupidly insecure idea. As wkhtmltopdf is built on webkit, there are options to set cookies. As long as your php session is cookie based, you could pass the user's session_id to wkhtmltopdf, and hijack your own user's session, thereby recreating the page when wkhtmltopdf makes the request. I'm so getting downvoted for suggesting this...

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

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100