Login   Register  
PHP Classes

File: saveCompletePage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sarfraz Ahmed  >  PHP Save Complete HTML Page  >  saveCompletePage.php  >  Download  
File: saveCompletePage.php
Role: Example script
Content type: text/plain
Description: saveCompletePage.php
Class: PHP Save Complete HTML Page
Save HTML pages complete with images, CSS and JS
Author: By
Last change:
Date: 10 months ago
Size: 823 bytes


Class file image Download

if (isset($_POST['submit'])) {
$url $_POST['url'];
    if (! 
trim($url)) {
header('LOCATION: index.php?e=' urlencode('No URL Specified'));
$contentonly = isset($_POST['content']) ? true false;
$keepjs = isset($_POST['javascript']) ? true false;
$compress = isset($_POST['compress']) ? true false;

# include the class
require_once 'includes/htmlSaveComplete.php';
$htmlSaveComplete = new htmlSaveComplete($url);
$html $htmlSaveComplete->getCompletePage($keepjs$contentonly$compress);
    if (! 
$html) {
header('LOCATION: index.php?e=' urlencode('Error saving the page, please try again later.'));
header('LOCATION: index.php?s=1');
else {
header('LOCATION: index.php');