Extension Hub -
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"
|
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"
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-16T07:29:01Z
cURL connection info
| Key | Value |
| url | "https://www.pmwiki.org/pmwiki/recipelist" |
| content_type | null |
| http_code | 200 |
| header_size | 260 |
| request_size | 148 |
| filetime | -1 |
| ssl_verify_result | 20 |
| redirect_count | 0 |
| total_time | 0.927071 |
| namelookup_time | 0.013446 |
| connect_time | 0.193534 |
| pretransfer_time | 0.376776 |
| size_upload | 0 |
| size_download | 56379 |
| speed_download | 60814 |
| speed_upload | 0 |
| download_content_length | 56379 |
| upload_content_length | 0 |
| starttransfer_time | 0.569235 |
| redirect_time | 0 |
| redirect_url | empty string |
| primary_ip | "23.254.203.248" |
| certinfo | Array (0 elements) |
| primary_port | 443 |
| local_ip | "192.168.1.201" |
| local_port | 56325 |
| http_version | 2 |
| protocol | 2 |
| ssl_verifyresult | 0 |
| scheme | "https" |
| appconnect_time_us | 376668 |
| queue_time_us | 25 |
| connect_time_us | 193534 |
| namelookup_time_us | 13446 |
| pretransfer_time_us | 376776 |
| redirect_time_us | 0 |
| starttransfer_time_us | 569235 |
| posttransfer_time_us | 376776 |
| total_time_us | 927071 |
| effective_method | "GET" |
| capath | empty string |
| cainfo | empty string |
| used_proxy | 0 |
| httpauth_used | 0 |
| proxyauth_used | 0 |
| conn_id | 0 |
Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile This test failed as expected
|
Messages