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,057 lines and 56,280 characters returned. First two lines:

# updated: 2026-10-23T07:29:01Z
PmWiki:Upgrades pmwiki-2.7.6


cURL connection info

KeyValue
url"https://www.pmwiki.org/pmwiki/recipelist"
content_typenull
http_code200
header_size260
request_size157
filetime-1
ssl_verify_result0
redirect_count0
total_time0.790442
namelookup_time0.000787
connect_time0.153471
pretransfer_time0.330521
size_upload0
size_download56280
speed_download71240
speed_upload0
download_content_length56280
upload_content_length0
starttransfer_time0.484744
redirect_time0
redirect_urlempty string
primary_ip"23.254.203.248"
certinfoArray (0 elements)
primary_port443
local_ip"103.96.117.42"
local_port50336
http_version2
protocol2
ssl_verifyresult0
scheme"HTTPS"
appconnect_time_us330401
connect_time_us153471
namelookup_time_us787
pretransfer_time_us330521
redirect_time_us0
starttransfer_time_us484744
total_time_us790442
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." ]]