Testing the PmWiki Cookbook:TestUrlGet extension, used on the TTC website
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"
Linux (Linux)
Test UrlGet with https://www.pmwiki.org/pmwiki/recipelist 1,058 lines and 56,353 characters returned. First two lines:
# updated: 2026-12-06T08:29:02Z
cURL connection info
| Key | Value |
| url | "https://www.pmwiki.org/pmwiki/recipelist" |
| content_type | "text/plain" |
| http_code | 200 |
| header_size | 235 |
| request_size | 157 |
| filetime | -1 |
| ssl_verify_result | 0 |
| redirect_count | 0 |
| total_time | 1.440557 |
| namelookup_time | 0.094738 |
| connect_time | 0.358168 |
| pretransfer_time | 0.649859 |
| size_upload | 0 |
| size_download | 56353 |
| speed_download | 39134 |
| speed_upload | 0 |
| download_content_length | 56353 |
| upload_content_length | 0 |
| starttransfer_time | 1.177027 |
| redirect_time | 0 |
| redirect_url | empty string |
| primary_ip | "212.83.150.5" |
| certinfo | Array (0 elements) |
| primary_port | 443 |
| local_ip | "103.96.117.42" |
| local_port | 32910 |
| http_version | 2 |
| protocol | 2 |
| ssl_verifyresult | 0 |
| scheme | "HTTPS" |
| appconnect_time_us | 649785 |
| connect_time_us | 358168 |
| namelookup_time_us | 94738 |
| pretransfer_time_us | 649859 |
| redirect_time_us | 0 |
| starttransfer_time_us | 1177027 |
| total_time_us | 1440557 |
| effective_method | "GET" |
Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile This test failed as expected
|
Messages
RecipeCheck
Check recipes