I've been assigned the Danbooru Ressurection project on EA Networx. I now have in my possession the 20GB "image" of the site. Now one step required is running php -f rip.php 0 1041 to rip all 1041 bases. The rip.php script however is written to use php_domxml.dll which is a Windows PHP script. I believe Linux has php_domxml.so compiled in the php.ini, which is supposed to be the Linux version of php_domxml.dll. Question is how do I make my Debian 3.1 server run it properly? My Windows 2000 Professional running Windows Apache 2.2.4 and Windows PHP 4.2.1 compiles it fine in theory. But is there any way to run it on a Linux server?
rip.php
When I run this script however I get the following:
(thats just an example, it generates an error just like that one, except the script name is different, the line number is however correct)
Any way on how I can get this script to run in a Linux environment? It used to be run on Bluehost...and they only do Linux I believe, so surely there is a way? :confused4
rip.php
PHP:
<?php
dl('php_domxml.dll');
$server = "http://danbooru.lolitron.org/data";
$start = 0;
$end = 1041;
if ($argc == 3) { $start = $argv[1]; $end = $argv[2]; }
echo "running from $start to $end\n\n\n";
for($i = $start; $i <= $end; $i++) {
$xmlfile = sprintf("xml/%06d00.xml", $i);
if(!file_exists(dirname(__FILE__).'/'.$xmlfile.'.done')) {
echo "$xmlfile:\n--------\n\n";
$dom = domxml_open_file(dirname(__FILE__).'/'.$xmlfile);
if($dom) {
foreach($dom->get_elements_by_tagname('post') as $post) {
echo $file = $post->get_attribute('file_name');
$bytes = file_put_contents(dirname(__FILE__).'/pics/'.$file, file_get_contents($server.'/'.$file[0].$file[1].'/'.$file[2].$file[3].'/'.$file));
echo ($bytes > 0) ? ' '.$bytes." bytes\n" : " failed\n";
}
$dom->free();
touch($xmlfile.'.done');
}
}
}
?>
When I run this script however I get the following:
Code:
PHP Warning: Unknown(): Unable to load dynamic library './php_domxml.dll' - ./php_domxml.dll: cannot open shared object file: No such file or directory in Unknown on line 21
(thats just an example, it generates an error just like that one, except the script name is different, the line number is however correct)
Any way on how I can get this script to run in a Linux environment? It used to be run on Bluehost...and they only do Linux I believe, so surely there is a way? :confused4
Last edited: