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

# updated: 2026-05-17T07: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.141357
namelookup_time0.210906
connect_time0.389856
pretransfer_time0.575013
size_upload0
size_download56329
speed_download49352
speed_upload0
download_content_length56329
upload_content_length0
starttransfer_time0.755161
redirect_time0
redirect_url 
primary_ip23.254.203.248
certinfoArray (0 elements)
primary_port443
local_ip192.168.1.201
local_port63537
http_version2
protocol2
ssl_verifyresult0
schemeHTTPS
appconnect_time_us574973
connect_time_us389856
namelookup_time_us210906
pretransfer_time_us575013
redirect_time_us0
starttransfer_time_us755161
total_time_us1141357
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] nz/TestExtensions/UrlGet) - Testing the [[Extensions/UrlGet extension. See PmWiki Cookbook:UrlGet" | email page as link ]]