how to get screenshot of a web page - php

I have a website running on my own server, using PHP and Sliverlight.
I want to implement a function that when a user click a button, the server takes a screenshot of the page and saves the picture on the server. Note that user behavior will change the page.
I wonder how to solve this using php and javascript? Does wkhtmltopdf managr it ? Any idea is appreciate.

Related

How can I screenshot the whole desktop?

Is it possible to screenshot the whole desktop of users visiting my website?
I am using the PHP function imagegrabscreen() but it's only working on localhost. Is this done on the server or can I do this with WebRTC without a chrome extension?
Is this done on the server
Yes. Of course. PHP is a server-side language.
Is it possible to screenshot the whole desktop of users visiting my website?
Not without asking them to do so.

How do I enable PHP to run on my website instead of a 405 error?

I'm trying to use a HTML/PHP form on my website. The problem is submit just opens a new page displaying my php as text, this is when I open the html file on my computer using Google Chrome. When I uploaded to my hosting service, TK dot com, I get a 405 error when using the form. I've tested on working/downloadable php forms and the same thing happens.
From my understanding, I can't just use php on my site without setting up an environment. I've read I need to use some sort of program to do this (apache). Which kind of confuses me further, how would I enable this type of service, which installs to my computer, to run on my website when my computer is off?
Any tips or guides on how to do use apache for PHP forms on my website or similar that I can be redirected to would be really helpful. Please let me know if any extra information is needed.

Questions about phonegap

I built a mobile website using jquery mobile (client side) and php/mysql (server side)
I found phonegap to put it in a native app. But despite many researches, i didnt found the answer for those questions :
how do phonegap loads pages in those two cases :
When the page refreshes without ajax
When a jqm page is loaded and injected with ajax
This question is crucial because if the page is loaded from my server, i would be able to put php into it. If pages are stored and brought directly from the client where the app is installed, I have to remove all php from my pages. On the other side, storing pages on the client would improve drastically the speed of the loading.
The best would be to choose for each ajax call of jqm, by a parameter, whether the first or the second scenario. Controlers written in php and returning json would be loaded from the server each time, but the jqm pages would be stored into the client phone as he download the app.
I have a second question:i ve downloaded the phonegap desktop app but i still dont know how to build an entiere app sendable to the stores. I found several technologies like phonegap build, do you recomand it ? i dont know a word in java..
Thanks for your help and please excuse me if Im wrong with english sometime.

PHP_Printer From LAMP Server

I am dying trying to figure this out. Googled my heart off with no luck.
I am making a web application to print labels and it should be done through the browser. My webserver is LAMP so I cannot use the PHP_Printer because that is windows based.
Is there an alternative PHP solution for printing from a LAMP server to the client. (ie: Online server is LAMP and they will run the web app through their browser and will be printed to the clients printer).
Thanks for any help!
EDIT
So this turned out to be harder than expected. My solution is going to be to use http://www.fpdf.org/ to create a PDF using the user submitted variables. And I will add custom js to the pdf to print without dialogue box as soon as it is opened.
Workflow: User submits stock variables (Qty, Product Number) [Submit] -> Stock added to DB and PDF gets generated and auto printed for the label.
So here is my solution to the problem. I found it in another post here Can a PDF file's print dialog be opened with Javascript?
I will generate a PDF for the labels using FPDF and then add a script to auto print the pdf when its opened.
Script: http://www.fpdf.org/en/script/script36.php
Thanks for helping me think this through guys

Create Screen Shot of web page that user is visting in our site

I have to create screen shot of web page that user is visiting in our site, through PHP. I have testing many script, working well when I pass URL of live site like google etc, But i have to create screen shoot of page that the user is visiting in our site.
This isn't possible via PHP, you'd have to trigger a system event to open a browser and take a screenshot or have service installed on a machine specifically aimed at doing this.. It's a lot more involved than coding something up in PHP.
Command line program to create website screenshots (on Linux)

Categories