Recent Changes - Search:

add Test Extensions page

hide Test Extensions

Test Extensions


hide Topics

Topics

show Changed

Changed

Visitor's book Site map pmwiki-2.7.8 5664

Url Get

Extension Hub -

UrlGet version 2026-09-29

Extensions

Testing the UrlGet extension. See PmWiki Cookbook:UrlGet

example
(:urlget:)
{$UrlGetMsg}

UrlGet

UrlGet is a function that uses "cURl" to retrieve the contents of a URL.
The URL contents are returned as a string, or FALSE, the same as returned by "file_get_contents".
Error messages are returned in in $FmtV['$UrlGetMsg'].

The internal PmWiki variable "$UrlGetFunction" is set to "UrlGet\UrlGet"
The PHP runtime setting "allow_url_fopen" is not enabled.
example
(:urlget test:)
{$UrlGetMsg}

UrlGet

UrlGet is a function that uses "cURl" to retrieve the contents of a URL.
The URL contents are returned as a string, or FALSE, the same as returned by "file_get_contents".
Error messages are returned in in $FmtV['$UrlGetMsg'].

The internal PmWiki variable "$UrlGetFunction" is set to "UrlGet\UrlGet"
The PHP runtime setting "allow_url_fopen" is not enabled.


WINNT (Windows) Test UrlGet with https://www.pmwiki.org/pmwiki/recipelist
This test unexpectedly failed
-> $FmtV['$UrlGetMsg'] = UrlGet: https://www.pmwiki.org/pmwiki/recipelist returned redirect 302 to https://www.pmwiki.net/pmwiki/recipelist(approve sites), redirect not followed
Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile
This test failed as expected

$FmtV['$UrlGetMsg'] = UrlGet: https://www.pmwiki.org/pmwiki/nosuchfile returned redirect 302 to https://www.pmwiki.net/pmwiki/nosuchfile(approve sites), redirect not followed



Messages

Category: Extensions

tahi Page last modified on 2026 Apr 08 07:44

Edit - History - Recent Changes - WikiHelp - Search - ?Subject="KiwiWiki: Url Get"&Body="From KiwiWiki: Url Get (https://kiwiwiki [period] nz/TestExtensions/UrlGet) - Testing the [[Extensions/UrlGet extension. See PmWiki Cookbook:UrlGet" | email page as link ]]