Login   Register  
PHP Classes
elePHPant
Icontem

File: cron_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2005-07-29 20:31
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);
?>