', $wpage);
//$htmlis = "
";
$htmlis = "";
$thisimg = "";
$thistitle = "";
$thishref = "";
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);
$htmlis = str_replace(" | ", " | ", $htmlis);
$thisij--;
}
file_put_contents(dirname(__FILE__) . "/zero.html", str_replace("/wordpress/", "/ITblog/", $htmlis));
}
//echo "here2";
unlink(dirname(__FILE__) . "/wpage.txt");
}
//echo "here3";
?>