1) { file_put_contents(dirname(__FILE__) . '/divtagcloud.html', str_replace('
', $classtags[1])[0] . '
')); } //echo "here1"; $numtoshow = 8; $noff=1; //$cury=substr('0000' . date('Y',strtotime ( '-' . ($numtoshow + $noff) . ' day' , strtotime ( $curdateis) ) ),-4,4); //$curm=substr('0' . date('m',strtotime ( '-' . ($numtoshow + $noff) . ' day' , strtotime ( $curdateis) ) ),-2,2); //$curd=substr('0' . date('d',strtotime ( '-' . ($numtoshow + $noff) . ' day' , strtotime ( $curdateis) ) ),-2,2); if (1 == 4) { $spanalt=''; } else { $altalt='"' . $cury . '/' .$curm . '/' . $curd . "'"; } $narray = array("one", "two", "three", "four", "five", "six", "seven", "eight"); $wpage = file_get_contents(dirname(__FILE__) . "/wpage.txt"); //"//www.rjmprogramming.com.au/PHP/wpage.txt"); $warticles = explode('
', $wpage); //$htmlis = "
"; $htmlis = "
"; $thisimg = ""; $thistitle = ""; $thishref = ""; $spanalt=""; if (sizeof($warticles) >= $numtoshow) { //echo "here1a"; $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) { //echo " here1b=" . $thesehref[0] . " "; if (substr($ahrefis[sizeof($ahrefis) - 1], 0, 1) == "'") { $thesehref = explode("'", substr($ahrefis[sizeof($ahrefis) - 1], 1)); $thishref = "//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 = "//www.rjmprogramming.com.au/ITblog/?p=" . str_replace("d", "", $thesehref[0]); } else { $thesehref = explode(" ", $ahrefis[sizeof($ahrefis) - 1]); $thishref = "//www.rjmprogramming.com.au/ITblog/?p=" . str_replace("d", "", $thesehref[0]); } } else { $hrefis = explode("href=", $warticles[$jh]); //echo " here1c "; 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]; } if (substr($thisimg,0,2) == '//') $thisimg='http:' . $thisimg; // new SSL specific line 4/5/2017 $icont = file_get_contents($thisimg); file_put_contents(dirname(__FILE__) . "/" . $narray[$thisij] . ".jpg", $icont); if (file_exists(dirname(__FILE__) . "/" . $narray[$thisij] . ".jpeg")) { unlink(dirname(__FILE__) . "/" . $narray[$thisij] . ".jpeg"); } $zis=0; while (file_exists(dirname(__FILE__) . "/" . $narray[$thisij] . "-" . $zis . ".jpeg")) { unlink(dirname(__FILE__) . "/" . $narray[$thisij] . "-" . $zis . ".jpeg"); $zis++; } exec("/usr/local/cpanel/3rdparty/bin/convert " . dirname(__FILE__) . "/" . $narray[$thisij] . ".jpg -resize 105 -quality 50 -strip " . dirname(__FILE__) . "/" . $narray[$thisij] . ".jpeg"); sleep(5); $prehtmlis=$htmlis; $htmlis = str_replace("", "
" . $spanalt . " . $altalt . ", $htmlis); $thisij--; if ($prehtmlis != $htmlis) { $noff++; $cury=substr('0000' . date('Y',strtotime ( '-' . ($numtoshow - $noff) . ' day' , strtotime ( $curdateis) ) ),-4,4); $curm=substr('0' . date('m',strtotime ( '-' . ($numtoshow - $noff) . ' day' , strtotime ( $curdateis) ) ),-2,2); $curd=substr('0' . date('d',strtotime ( '-' . ($numtoshow - $noff) . ' day' , strtotime ( $curdateis) ) ),-2,2); } if (1 == 4) { $spanalt=''; } else { $altalt='"' . $cury . '/' .$curm . '/' . $curd . '"'; } } file_put_contents(dirname(__FILE__) . "/zero.html", str_replace(" href='",' href="',str_replace("#andabit=-70' title=", '" title=', str_replace("#andabit=-7x' title='","#andabit=-70' title='", str_replace("0' title='","0#andabit=-7x' title='",str_replace("1' title='","1#andabit=-7x' title='",str_replace("2' title='","2#andabit=-7x' title='",str_replace("3' title='","3#andabit=-7x' title='",str_replace("4' title='","4#andabit=-7x' title='",str_replace("5' title='","5#andabit=-7x' title='",str_replace("6' title='","6#andabit=-7x' title='",str_replace("7' title='","7#andabit=-7x' title='",str_replace("8' title='","8#andabit=-7x' title='",str_replace("9' title='","9#andabit=-7x' title='", str_replace("/wordpress/", "/ITblog/", $htmlis))))))))))))))); } //echo "here2"; unlink(dirname(__FILE__) . "/wpage.txt"); } //echo "here3"; ?>