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.5 5601

Url Get

Extension Hub -

UrlGet version 2026-04-16

Extensions

Testing the UrlGet extension. See PmWiki Cookbook:UrlGet

example
(:urlget:)
{$UrlGetMsg}

UrlGet

The internal PmWiki variable "$UrlGetFunction" is set to "UrlGet\UrlGet"

UrlGet is a function that uses "cURl"(approve sites) to retrieve the contents of a URL.
Returns the URL contents as a string, or FALSE, the same as "file_get_contents".
Returns error messages in $FmtV['$UrlGetMsg'].

example
(:urlget test:)
{$UrlGetMsg}

UrlGet

The internal PmWiki variable "$UrlGetFunction" is set to "UrlGet\UrlGet"

UrlGet is a function that uses "cURl"(approve sites) to retrieve the contents of a URL.
Returns the URL contents as a string, or FALSE, the same as "file_get_contents".
Returns error messages in $FmtV['$UrlGetMsg'].

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

# updated: 2026-08-07T07:29:01Z
PmWiki:Upgrades pmwiki-2.7.5


cURL connection info

KeyValue
urlhttps://www.pmwiki.org/pmwiki/recipelist
content_type 
http_code200
header_size260
request_size0
filetime-1
ssl_verify_result20
redirect_count0
total_time1.356293
namelookup_time0.437665
connect_time0.618393
pretransfer_time0.803552
size_upload0
size_download56328
speed_download41530
speed_upload0
download_content_length56328
upload_content_length0
starttransfer_time0.98454
redirect_time0
redirect_url 
primary_ip23.254.203.248
certinfoArray (0 elements)
primary_port443
local_ip192.168.1.201
local_port57099
http_version2
protocol2
ssl_verifyresult0
schemeHTTPS
appconnect_time_us803483
connect_time_us618393
namelookup_time_us437665
pretransfer_time_us803552
redirect_time_us0
starttransfer_time_us984540
total_time_us1356293
effective_methodGET
capath 
cainfo 


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


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 (http://kiwiwiki [period] nz/TestExtensions/UrlGet) - Testing the [[Extensions/UrlGet extension. See PmWiki Cookbook:UrlGet" | email page as link ]]