473,511 Members | 14,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web page capture / compression

I'm working on an app where a page is created dynamically via a CMS,
and I need to save the page similar to the way you can save a
'complete web page' via a browser. I need to save the graphics,
links, embedded applets, flash, etc.

Is there any way that I can use native PHP code to 'capture' the web
page and maintain the functionality of the page?
Jul 17 '05 #1
5 3155
Steve High wrote:
I'm working on an app where a page is created dynamically via a CMS,
and I need to save the page similar to the way you can save a
'complete web page' via a browser. I need to save the graphics,
links, embedded applets, flash, etc.

Is there any way that I can use native PHP code to 'capture' the web
page and maintain the functionality of the page?


AFAIK, not unless you count using system() or exec() ;) in that case,
you could call up wget to do the capture and saving of files.

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com
Jul 17 '05 #2
Hello,

On 09/27/2004 06:00 PM, Steve High wrote:
I'm working on an app where a page is created dynamically via a CMS,
and I need to save the page similar to the way you can save a
'complete web page' via a browser. I need to save the graphics,
links, embedded applets, flash, etc.

Is there any way that I can use native PHP code to 'capture' the web
page and maintain the functionality of the page?


You may want to try this HTTP client class to retrieve the current page
HTML. If you need to login the class can also handle the eventual
cookies and redirection if needed. Than you need to parse the HTML and
figure which other elements you need to retrieve and save.

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #3
sc****@comcast.net (Steve High) wrote in message news:<52**************************@posting.google. com>...
I'm working on an app where a page is created dynamically via a CMS,
and I need to save the page similar to the way you can save a
'complete web page' via a browser. I need to save the graphics,
links, embedded applets, flash, etc.

Is there any way that I can use native PHP code to 'capture' the web
page and maintain the functionality of the page?


Hmmm. I figured out how to do it...so i will post here in case anyone
else has the same problem.
I used cURL to grab the url as a file stream, then parsed the
<object>, <img>, and <applet> tags to look for the source. I then
created a dynamic 'images' directory and an 'objects' directory where
the images, swfs, and applet jars are stored.
Then i replaced the source in the file stream to point to my new
directories. Finally, i bundled the files and folders with php
compression utility to make one zip-readable file...

it's a lot of jerry-rigging, but it works pretty well.
anyone interested in the source should email me.
Jul 17 '05 #4
Steve -

I'm looking for a compression utility I can use from PHP on a server that
gives me WinZip-compatible files for convenient user download.

I noticed in an old post of your a passing reference to how you
"...bundled the files and folders with php compression utility"

Could you give me a few more details?

Many thanks

Tony Reynolds
Jul 21 '05 #5
JDS
On Tue, 19 Jul 2005 10:53:55 -0400, tonyreynolds wrote:
I'm looking for a compression utility I can use from PHP on a server that
gives me WinZip-compatible files for convenient user download.


On a Linux host? Try "zip"

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2469
by: Shiperton Henethe | last post by:
Dreamweaver 4 Hi Can anyone recommend a decent utility for compressing HTML that is safe - i.e. that *definitely* doesn't mess with the appearance in any browsers. I run a growing website...
2
409
by: Jim Hubbard | last post by:
I went to the compression newsgroups, but all I saw was spam. So, I thought I'd post his question here to get the best info I could from other programmers. Which compression algorithm offers...
11
2693
by: Laurent Compere | last post by:
Hi, I'm trying to do something I thought easy. Explanation : I've recently bought a Multimedia Player DVX-500E. This player is connected via ethernet on my local network et allows among other...
1
2338
by: chris.atlee | last post by:
I'm writing a program in python that creates tar files of a certain maximum size (to fit onto CD/DVD). One of the problems I'm running into is that when using compression, it's pretty much...
7
1557
by: Dylan Parry | last post by:
Hi folks, I've got a page that outputs XML, but in some cases the size of the page is several MB. So I figured the best way to deal with it is to ZIP the contents of the page and send that to...
20
2898
by: chance | last post by:
Hello, I want to add compression to a memory stream and save it in an Oracle database. This is the code I have so far: //save the Word document to a binary field, MemoryStream dataStream = new...
10
10671
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, Please help me to write a dll in C# , that will read each pages of a tiff image from a file and a memory stream object ( need two ways) and creatre a new tiff image object.The dll should...
21
5977
by: =?Utf-8?B?VkJB?= | last post by:
I compressed a file with GZipStream class and is larger than the original file.... how can this be?, the original file is 737 KB and the "compressed" file is 1.1 MB. Did i miss something or is...
3
7501
by: GiJeet | last post by:
Hello, we have an app that scans documents into TIFF format and we need to transfer them over the internet. If anyone knows of a SDK we can use that can compress TIFFs on the fly or even if it can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.