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

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

# updated: 2026-04-27T01:14:57Z
PmWiki:Upgrades pmwiki-2.5.9


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.213122
namelookup_time0.38984
connect_time0.553912
pretransfer_time0.722947
size_upload0
size_download56276
speed_download46389
speed_upload0
download_content_length56276
upload_content_length0
starttransfer_time0.887552
redirect_time0
redirect_url 
primary_ip23.254.203.248
certinfoArray (0 elements)
primary_port443
local_ip192.168.1.201
local_port63445
http_version2
protocol2
ssl_verifyresult0
schemeHTTPS
appconnect_time_us722886
connect_time_us553912
namelookup_time_us389840
pretransfer_time_us722947
redirect_time_us0
starttransfer_time_us887552
total_time_us1213122
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 (https://kiwiwiki [period] co [period] nz/TestExtensions/UrlGet) - Testing the [[Extensions/UrlGet extension. See PmWiki Cookbook:UrlGet" | email page as link ]]