diff --git a/snapshots.php b/snapshots.php index d99fbf9..f630bb0 100644 --- a/snapshots.php +++ b/snapshots.php @@ -1,49 +1,81 @@ " . "" . "

Download KMyMoney Snapshots

" ; foreach($products as $product) { $productName = $product[0]; $path = $product[1]; $baseName = $product[2]; echo "

branch: $productName

" ; foreach($archs as $arch) { $url = getUrl($path, $arch); - - echo "" - . "

After clicking on the button below you will be redirected to the related download page to get a $productName snapshot

" - . "" - ; + if (function_exists('curl_init')) { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $page = curl_exec($ch); + curl_close($ch); + #echo "$url - $page"; + $lines = explode("\n", $page); + $portableLink = ""; + $setupLink = ""; + $debugPackageLink = ""; + foreach($lines as $line) { + # href="mingw64-kmymoney-portable-4.8.3cf78f9c1-lp151.76.16.noarch.rpm"><..." + preg_match('/\ 0) { + #echo "+++
".$matches[1]."
+++"; + if (strstr($matches[1], "portable") !== FALSE) + $portableLink = $matches[1]; + if (strstr($matches[1], "setup") !== FALSE) + $setupLink = $matches[1]; + if (strstr($matches[1], "debugpackage") !== FALSE) + $debugPackageLink = $matches[1]; + } + } + echo "$arch bit
"; + echo "
" + ; + } else { + echo "" + . "

After clicking on the button below you will be redirected to the related download page to get a $productName snapshot

" + . "" + ; } + } } echo "

The rpm container can be unpacked with 7-zip.

" . "" ; - - -