PHP Classes

File: cron_example.php

Recommend this page to a friend!
  Classes of YP  >  Proxier  >  cron_example.php  >  Download  
File: cron_example.php
Role: Example script
Content type: text/plain
Description: Example of cron script
Class: Proxier
Retrieve proxy lists and store them in a database
Author: By
Last change:
Date: 16 years ago
Size: 532 bytes
 

Contents

Class file image Download
<?php

//example of a PHP script, which can be
//run from cron and update/check list of proxies

   
chdir(preg_replace("|/[^/]+$|", '', $argv[0]));
    require_once(
'Proxier.class.php');
   
$config = array(
       
'do_connect_to_db'=>true,
       
'db_host'=>'localhost',
       
'db_name'=>'mydb',
       
'db_login'=>'mylogin',
       
'db_password'=>'password',
       
'db_table'=>'proxies',
       
'test_page_path'=>'/home/user/public_html/proxytest.txt',
       
'test_page_url'=>'http://mysite.com/proxytest.txt',
    );
   
$Proxier =& new Proxier(1, $config);
?>

For more information send a message to info at phpclasses dot org.