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.6.0

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-06-06T07:29:01Z
PmWiki:Upgrades pmwiki-2.6.0


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.124607
namelookup_time0.224323
connect_time0.403401
pretransfer_time0.587874
size_upload0
size_download56328
speed_download50086
speed_upload0
download_content_length56328
upload_content_length0
starttransfer_time0.768208
redirect_time0
redirect_url 
primary_ip23.254.203.248
certinfoArray (0 elements)
primary_port443
local_ip192.168.1.201
local_port63877
http_version2
protocol2
ssl_verifyresult0
schemeHTTPS
appconnect_time_us587818
connect_time_us403401
namelookup_time_us224323
pretransfer_time_us587874
redirect_time_us0
starttransfer_time_us768208
total_time_us1124607
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] co [period] nz/TestExtensions/UrlGet) - Testing the [[Extensions/UrlGet extension. See PmWiki Cookbook:UrlGet" | email page as link ]]