Extension Hub -
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
cURL connection info
| Key | Value |
| url | https://www.pmwiki.org/pmwiki/recipelist |
| content_type | |
| http_code | 200 |
| header_size | 260 |
| request_size | 0 |
| filetime | -1 |
| ssl_verify_result | 20 |
| redirect_count | 0 |
| total_time | 1.213122 |
| namelookup_time | 0.38984 |
| connect_time | 0.553912 |
| pretransfer_time | 0.722947 |
| size_upload | 0 |
| size_download | 56276 |
| speed_download | 46389 |
| speed_upload | 0 |
| download_content_length | 56276 |
| upload_content_length | 0 |
| starttransfer_time | 0.887552 |
| redirect_time | 0 |
| redirect_url | |
| primary_ip | 23.254.203.248 |
| certinfo | Array (0 elements) |
| primary_port | 443 |
| local_ip | 192.168.1.201 |
| local_port | 63445 |
| http_version | 2 |
| protocol | 2 |
| ssl_verifyresult | 0 |
| scheme | HTTPS |
| appconnect_time_us | 722886 |
| connect_time_us | 553912 |
| namelookup_time_us | 389840 |
| pretransfer_time_us | 722947 |
| redirect_time_us | 0 |
| starttransfer_time_us | 887552 |
| total_time_us | 1213122 |
| effective_method | GET |
| capath | |
| cainfo | |
Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile This test failed as expected
|
Messages