', $wpage); $htmlis = "
"; $thisimg = ""; $thistitle = ""; $thishref = ""; if (sizeof($warticles) >= $numtoshow) { $thisij = sizeof($narray) - 1; for ($jh=(sizeof($warticles) - 1); $jh>=(sizeof($warticles) - $numtoshow); $jh--) { $ahrefis = explode("var dv=document.getElementById(", $warticles[$jh]); if (sizeof($ahrefis) > 1) { if (substr($ahrefis[sizeof($ahrefis) - 1], 0, 1) == "'") { $thesehref = explode("'", substr($ahrefis[sizeof($ahrefis) - 1], 1)); $thishref = "http://www.rjmprogramming.com.au/ITblog/?p=" . str_replace("d", "", $thesehref[0]); } else if (substr($ahrefis[sizeof($ahrefis) - 1], 0, 1) == '"') { $thesehref = explode('"', substr($ahrefis[sizeof($ahrefis) - 1], 1)); $thishref = "http://www.rjmprogramming.com.au/ITblog/?p=" . str_replace("d", "", $thesehref[0]); } else { $thesehref = explode(" ", $ahrefis[sizeof($ahrefis) - 1]); $thishref = "http://www.rjmprogramming.com.au/ITblog/?p=" . str_replace("d", "", $thesehref[0]); } } else { $hrefis = explode("href=", $warticles[$jh]); if (substr($hrefis[1], 0, 1) == "'") { $thesehref = explode("'", substr($hrefis[1], 1)); $thishref = $thesehref[0]; } else if (substr($hrefis[1], 0, 1) == '"') { $thesehref = explode('"', substr($hrefis[1], 1)); $thishref = $thesehref[0]; } else { $thesehref = explode(" ", $hrefis[1]); $thishref = $thesehref[0]; } } $titleis = explode("title=", $warticles[$jh]); if (substr($titleis[1], 0, 1) == "'") { $thesetitle = explode("'", substr($titleis[1], 1)); $thistitle = $thesetitle[0]; } else if (substr($titleis[1], 0, 1) == '"') { $thesetitle = explode('"', substr($titleis[1], 1)); $thistitle = $thesetitle[0]; } else { $thesetitle = explode(" ", $titleis[1]); $thistitle = $thesetitle[0]; } $imgis = explode("src=", $warticles[$jh]); if (substr($imgis[1], 0, 1) == "'") { $theseimg = explode("'", substr($imgis[1], 1)); $thisimg = $theseimg[0]; } else if (substr($imgis[1], 0, 1) == '"') { $theseimg = explode('"', substr($imgis[1], 1)); $thisimg = $theseimg[0]; } else { $theseimg = explode(" ", $imgis[1]); $thisimg = $theseimg[0]; } $icont = file_get_contents($thisimg); file_put_contents(dirname(__FILE__) . "/" . $narray[$thisij] . ".jpg", $icont); exec("ffmpeg -i " . dirname(__FILE__) . "/" . $narray[$thisij] . ".jpg -vf scale=105:-1 " . dirname(__FILE__) . "/" . $narray[$thisij] . ".jpeg"); $htmlis = str_replace("", "" . $thistitle . "", $htmlis); $thisij--; } file_put_contents(dirname(__FILE__) . "/zero.html", str_replace("/wordpress/", "/ITblog/", $htmlis)); } unlink(dirname(__FILE__) . "/wpage.txt"); } ?>