Search:

⚙️

Tararua Tramping Club

Te rōpū hīkoi o te pae maunga o Tararua   -   100 years of tramping

Webteam Test Url Get

Search Webteam only

(:template each:)

{=$Name}? {=$Summary}

UrlGet version 2026-09-29

Extensions

Testing the PmWiki Cookbook:TestUrlGet extension, used on the TTC website

example
(:urlget:)
{$UrlGetMsg}

UrlGet

UrlGet is a function that uses "cURl"(approve sites) 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"(approve sites) 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.


Linux (Linux) Test UrlGet with https://www.pmwiki.org/pmwiki/recipelist
1,058 lines and 56,353 characters returned. First two lines:

# updated: 2026-12-06T08:29:02Z
PmWiki:Upgrades pmwiki-2.7.11


cURL connection info

KeyValue
url"https://www.pmwiki.org/pmwiki/recipelist"
content_type"text/plain"
http_code200
header_size235
request_size157
filetime-1
ssl_verify_result0
redirect_count0
total_time1.440557
namelookup_time0.094738
connect_time0.358168
pretransfer_time0.649859
size_upload0
size_download56353
speed_download39134
speed_upload0
download_content_length56353
upload_content_length0
starttransfer_time1.177027
redirect_time0
redirect_urlempty string
primary_ip"212.83.150.5"
certinfoArray (0 elements)
primary_port443
local_ip"103.96.117.42"
local_port32910
http_version2
protocol2
ssl_verifyresult0
scheme"HTTPS"
appconnect_time_us649785
connect_time_us358168
namelookup_time_us94738
pretransfer_time_us649859
redirect_time_us0
starttransfer_time_us1177027
total_time_us1440557
effective_method"GET"


Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile
This test failed as expected

$FmtV['$UrlGetMsg'] = UrlGet: https://www.pmwiki.org/pmwiki/nosuchfile returned 404



Messages

RecipeCheck

Check recipes

Category: Extensions

Page last modified on 2026 Apr 07 23:41

Edit - History - Recent changes - Wiki help - Search     About TTC     Contact us     About the website     Site map     email page as link -> mailto:?Subject="TTC: Test Url Get"&Body="From the TTC website: Test Url Get (https://www [period] ttc [period] org [period] nz/Webteam/TestUrlGet) Testing the PmWiki [[Cookbook:TestUrlGet extension, used on the TTC website." ]]