|
Extensions
Topics |
Url GetUrlGet version 2026-04-16 Summary: A PmWiki extension to replace PmWiki's use of "
file_get_contents" with "cURL"Version: 2026-04-16
Prerequisites: PmWiki pmwiki-2.5.9; PHP 8.3; ExtensionHub
Status: Beta
Maintainer: skiwi
File: urlget-2026-04-16.zip Δ
Categories: Extensions
Discussion: UrlGet-Talk
Questions answered by this extensionI want to use the built in RecipeCheck or Blocklist recipes.
DescriptionThis extension provides a function The internal PmWiki variable " Install as an extension
Usage
ConfigurationThere is no configuration. InternationalisationsThere are no internationalisations. DetailsChange log / Release notes2026-04-16: add a test and documentation
2026-04-08: Initial version based on internal code modding
diag.php to enable RecipeCheck.TestingIt has been possible to carry out only limited testing. The extension is in production use on a Windows and a Linux system. A built in test exercises one successful read and one read failure.
For extension developersTest if allow_url_fopen is enabled // check if allow_url_fopen is enabled
$allowUrlFopen = ini_get('allow_url_fopen') === 1;
if (!$allowUrlFopen) {
$retVal .= RECIPENAME . ': "allow_url_fopen" is not enabled.' . BR;
}
To enable use of this extension SDV($UrlGetFunction, 'file_get_contents'); # defaults to built in function
$fileContents= @$UrlGetFunction($url);
if ($fileContents === FALSE) {
$errMsg = $FmtV['$UrlGetMsg'] ?? '';
$retVal .= RECIPENAME . ': unable to retrieve "' . $url . '" ' . $errMsg . BR;
}
See also
|
tahi Page last modified on 2026 Apr 16 11:32
Edit - History - Recent Changes - WikiHelp - Search - email page as link -> mailto:?Subject="KiwiWiki: Url Get"&Body="From KiwiWiki: Url Get (https://kiwiwiki [period] nz/Extensions/UrlGet) - A PmWiki extension to replace PmWiki's use of "file_get_contents" with "cURL