Jump to content
droidgoo

Capture part of a webpage served up by php

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Try to learn to strip specific string content from string, for example a div tag with id for instance, once you can achieveĀ  that. You can use get file contentĀ  to get file content as a string and do the same.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...