PHP Classes

File: sample_cron.php

Recommend this page to a friend!
  Classes of Tomasz Malewski   adv_wdt   sample_cron.php   Download  
File: sample_cron.php
Role: Example script
Content type: text/plain
Description: Example of cron job for watchdog
Class: adv_wdt
Track changes of pages in a MySQL database
Author: By
Last change: Accessible for everbody
Date: 13 years ago
Size: 812 bytes


Class file image Download

// Sample CRON job for adv_wdt class to scanning website for changes.

include 'adv_wdt.php';
$wdt = new adv_wdt;

$wdt->sql_connect ('localhost','user','password','dbname','adv_wdt'); // connect to temporary SQL table, need create first one
// $wdt -> sql_conect ('host','username','password','database','table');

// this section add any records to show how diffURLcron works. For real cron remove flush & addURL because now it's no sense.
$wdt->sql_flush(); // delete everything from temporary table - use carefull !!! we do this to prove code sample workable
// finish here

$wdt->sql_diffURLcron(); // checking is active URL in table and execute diff on it