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-09-11

Extensions

Testing the UrlGet extension. See PmWiki Cookbook:UrlGet

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.


WINNT (Windows) Test UrlGet with https://www.pmwiki.org/pmwiki/recipelist
1,059 lines and 56,379 characters returned. First two lines:

# updated: 2026-09-17T07:29:01Z
PmWiki:Upgrades pmwiki-2.7.5


cURL connection info

KeyValue
url"https://www.pmwiki.org/pmwiki/recipelist"
content_typenull
http_code200
header_size260
request_size148
filetime-1
ssl_verify_result20
redirect_count0
total_time1.404317
namelookup_time0.503916
connect_time0.684181
pretransfer_time0.867014
size_upload0
size_download56379
speed_download40147
speed_upload0
download_content_length56379
upload_content_length0
starttransfer_time1.046599
redirect_time0
redirect_urlempty string
primary_ip"23.254.203.248"
certinfoArray (0 elements)
primary_port443
local_ip"192.168.1.201"
local_port65099
http_version2
protocol2
ssl_verifyresult0
scheme"https"
appconnect_time_us866936
queue_time_us34
connect_time_us684181
namelookup_time_us503916
pretransfer_time_us867014
redirect_time_us0
starttransfer_time_us1046599
posttransfer_time_us867014
total_time_us1404317
effective_method"GET"
capathempty string
cainfoempty string
used_proxy0
httpauth_used0
proxyauth_used0
conn_id0


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

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 ]]