php写的生成ubuntu自动切换壁纸xml文件
<?php
/*
* 生成ubuntu自动切换壁纸xml文件
*/
//图片目录
$dir = ‘/home/yuxing/background’;
$hd = opendir($dir) or die(‘can not open dir’);
$files = array();
while($file = readdir($hd)) {
$tem = "$dir/$file";
if (is_file($tem) && in_array(strtolower(substr(strrchr($file,’.’), 1)), array(‘jpg’, ‘gif’)))
$files[] = $tem;
}
closedir($hd);
unset($file);
$xw = new xmlWriter();
$xw->openMemory();
$xw->setIndent(true);
$xw->setIndentString(‘ ‘);
$xw->startDocument(‘1.0’, ‘utf-8’);
$xw->startElement(‘background’);
$xw->startElement(‘starttime’);
$xw->writeElement(‘year’, ‘2000’);
$xw->writeElement(‘month’, ’01’);
$xw->writeElement(‘day’, ’01’);
$xw->writeElement(‘hour’, ’00’);
$xw->writeElement(‘minute’, ’00’);
$xw->writeElement(‘second’, ’00’);
$xw->endElement();
$count = count($files);
for ($i=0; $i<$count; $i++) {
$xw->startElement(‘static’);
//$xw->writeElement(‘duration’, ‘1795.0’);
$xw->writeElement(‘duration’, ‘30.0’);
$xw->writeElement(‘file’, $files[$i]);
$xw->endElement();
$xw->startElement(‘transition’);
$xw->writeElement(‘duration’, ‘5’);
$xw->writeElement(‘from’, $files[$i]);
$xw->writeElement(‘to’, isset($files[$i+1]) ? $files[$i+1] : $files[0]);
$xw->endElement();
}
$xw->endElement();
$xml = $xw->outputMemory(true);
//生成文件
$hd = fopen($dir . "/yuxing.xml", ‘wb’);
fwrite($hd, $xml);
fclose($hd);
echo ‘ok’;
波比源码 » php写的生成ubuntu自动切换壁纸xml文件
brand levaquin brand levaquin
order avodart 0.5mg pills tamsulosin 0.2mg without prescription ondansetron buy online
spironolactone online buy buy finasteride 5mg pill buy fluconazole generic
buy fildena 50mg generic robaxin 500mg oral methocarbamol usa
suhagra 50mg cost estrace 2mg cheap order generic estrace
purchase lamotrigine pill order tretinoin gel for sale tretinoin cost
cheap tadalafil 10mg order tadalafil 10mg sale voltaren 50mg canada
brand accutane 10mg cheap amoxil generic order zithromax 250mg online cheap
indomethacin online buy indocin order amoxicillin 500mg without prescription
cheap cialis 40mg Buy viagra in us purchase sildenafil pill
buy anastrozole 1mg online cheap order clarithromycin 500mg order viagra 50mg pills
buy prednisone 40mg online cheap deltasone 5mg cheap sildenafil drug
cialis fГјr frauen tadalafil generika rezeptfrei kaufen viagra 50mg kaufen
isotretinoin 20mg cost amoxil 250mg sale ivermectin 500ml
provigil online order Cialis in usa order acetazolamide 250 mg without prescription
altace order order altace pills azelastine 10ml usa
terazosin online buy actos uk purchase sulfasalazine online
generic benicar 20mg benicar for sale acetazolamide 250mg brand
tacrolimus buy online order tacrolimus without prescription buy urso 300mg online
buy bupropion 150mg sale bupropion 150mg pills order seroquel 50mg online cheap
brand salbutamol sildenafil pills 50mg generic sildenafil
order tadalafil 40mg discount coupons for generic viagra viagra 50mg oral
buy tadalafil 40mg pill order generic tadalafil buy symmetrel 100 mg pills
dapsone without prescription avlosulfon sale aceon 4mg pill
medroxyprogesterone 5mg cheap brand praziquantel 600 mg purchase periactin generic
luvox us order fluvoxamine 100mg pill glipizide 10mg brand
buy isotretinoin online cheap cheap amoxicillin pill order deltasone 20mg online
buy azithromycin 250mg pills prednisolone tablets buy gabapentin tablets
order cialis for sale viagra 50mg pill sildenafil over counter
tadalafil for sale online anafranil buy online order clomipramine 50mg online
buy generic glucophage 1000mg cialis 40mg drug generic tadalafil
buy zyprexa pills valsartan uk valsartan 160mg oral
norvasc over the counter order amlodipine 10mg pills tadalafil canada
clozaril online ipratropium online buy buy dexamethasone 0,5 mg without prescription
cheap sildenafil pill lisinopril online order order lisinopril 10mg pill
omeprazole online cheap research paper writers best casino slots online
generic metoprolol vardenafil 10mg cheap cost levitra 10mg
dissertation writers online poker game online poker real money
purchase levitra sale medrol 8mg pills buy methylprednisolone 4 mg online
tadalafil 20mg oral viagra 25 mg sildenafil 100mg england
order dapoxetine pill oral priligy 30mg synthroid canada
order tadalafil 10mg pills cialis 5mg ca overnight delivery for viagra
xenical over the counter diltiazem tablet acyclovir for sale online
cost cialis 40mg buy tadalafil pill oral plavix 150mg
domperidone online domperidone 10mg pill buy cyclobenzaprine
losartan cost purchase esomeprazole topamax 100mg us
buy lioresal sale purchase baclofen online cost toradol 10mg
colchicine 0.5mg sale best casinos free poker online games
free casino slots gambling casinos blackjack online real money
simvastatin drug order valacyclovir 1000mg buy propecia 1mg without prescription
metronidazole 200mg price augmentin usa bactrim oral
order keflex 125mg online cheap buy cephalexin online erythromycin 500mg canada
brand cialis 10mg order sildenafil viagra next day
sildenafil 50mg brand viagra 50mg cheap buy cialis 20mg pill
cefuroxime 500mg price robaxin price order methocarbamol sale
real money spins free slots games oral cialis 20mg
buy a essay online stromectol 12mg drug ivermectin 6mg dosage
purchase sildalis generic oral lamictal 50mg lamictal 50mg oral