Jump to content

Capture part of a webpage served up by php


droidgoo

Recommended Posts

Searching for how to capture only part of a webpage being served up by a host server along with server side php script additions to modify the DOM.

The domain host server offers php scripting so that it can serve up dynamic webpage content to browsers. The part i want to capture is the part modified by the php script before it is served up to the browser. Just rendering the client side DOM, as many 3rd party scripts and websites offer, does not capture the dynamic effects from the php script on the server side.

Ideally, the DOM snippet is a single html element that is easily identifiable by class or id. The capture process would involve duplicating that snippet of the DOM using all the applicable CSS and php rules to a buffer where it could be rendered as an image file (.jpg or .png) for sharing via social media or downloading.

The process is basically trying to emulate a screen capture from the client screen but using the server side knowledge of the DOM to do it.

Any ideas?

the attached is the fully rendered DOM object (unordered list) as served by the host after php scripts have been applied to it... short of taking a screen graph from my monitor, i don't know how else to capture just this <ul> or the <div> that contains it.freed.JPG.e123f134b3413036d3daaabb8a6c9e14.JPG

Link to comment
Share on other sites

  • 2 weeks later...

If it's something simple why not just simply make PHP draw a image that looks like the HTML output. If you want take a screenshot of the whole site, it's going to be a different story, might be web services you can use. To capture the screen you could make a bash script taking a screen shot of the server entering the site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...