justbn wrote:
NC and Hacka,
Thanks for the ideas. Both of these worked perfectly.
justin
If you want to easily get not only the HTML, but all of the linked CSS,
JS, images, etc. you can have PHP point to wget, which as pretty robust
page and site mirroring capabilities. Below is a script and Windows .bat
file I use to bookmark/save sites remotely. There's a link on my browser
bookmark bar that sends the current URL to this script, which saves a
copy of the URL and logs the entry. It's helped me be able to have
cached copies of good information that goes away 6 months later and
given me file-based searching of all of the content in my bookmarks.
fetch.bat should all be one line.
-------------------------------------
J Wynia
Myriad Intellect, Inc.
"Web technology that earns its keep."
www.myriadintellect.com
-------------------------------------
--------addbookmark.php---------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
history.back();
//-->
</script>
</head>
<body>
<?php
$url = $_GET['url'];
system("pathto/fetch.bat \"$url\"");
$filename = 'bookmarks.list';
if($url){
$url = urldecode($url);
$content = ("$url\n");
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
die("Cannot open file ($filename)");
exit;
}
if (fwrite($handle, $content) === FALSE) {
die("Cannot write file ($filename)");
exit;
}
fclose($handle);
} else {
die("Cannot write file ($filename)");
}
print("$url added");
} else {
print("No URL");
}
print("<hr><pre>");
?>
</body>
</html>
--------addbookmark.php---------------
--------fetch.bat---------------
pathto/wget.exe -p --convert-links -P pathwheretosave/sites/ %1
--------fetch.bat---------------