You are here

Convert xml to gz create.

1 post / 0 new
Tudatlan
Offline
Tudatlan's picture
Joined: 10 months
Last seen: 3 months
Convert xml to gz create.

My script:

analhit.php:

<?php
$data = implode("", file("/var/www/tudatos/guide.xml"));
$gzdata = gzencode($data, 9);
$fp = fopen("/var/www/tudatos/guide.xml.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>

And cron command:

0 5 * * * /usr/local/bin/php /var/www/tudatos/analhit.php

guide.xml ----> create gz file guide.xml.gz

Hy...

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl