Testing the PmWiki Cookbook:TestUrlGet extension, used on the TTC website
example
(:urlget:)
{$UrlGetMsg}
|
UrlGet
The internal PmWiki variable "$UrlGetFunction" is set to "UrlGet\UrlGet"
"allow_url_fopen" is not enabled.
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"
"allow_url_fopen" is not enabled.
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,056 lines and 56,223 characters returned. First two lines:
# updated: 2026-04-16T07:29:01Z
cURL connection info
| Key | Value |
| url | https://www.pmwiki.org/pmwiki/recipelist |
| content_type | |
| http_code | 200 |
| header_size | 260 |
| request_size | 142 |
| filetime | -1 |
| ssl_verify_result | 0 |
| redirect_count | 0 |
| total_time | 0.770484 |
| namelookup_time | 0.000538 |
| connect_time | 0.153549 |
| pretransfer_time | 0.311896 |
| size_upload | 0 |
| size_download | 56223 |
| speed_download | 72971 |
| speed_upload | 0 |
| download_content_length | 56223 |
| upload_content_length | 0 |
| starttransfer_time | 0.465617 |
| redirect_time | 0 |
| redirect_url | |
| primary_ip | 23.254.203.248 |
| certinfo | Array (0 elements) |
| primary_port | 443 |
| local_ip | 103.96.117.12 |
| local_port | 41006 |
| http_version | 2 |
| protocol | 2 |
| ssl_verifyresult | 0 |
| scheme | https |
| appconnect_time_us | 311783 |
| connect_time_us | 153549 |
| namelookup_time_us | 538 |
| pretransfer_time_us | 311896 |
| redirect_time_us | 0 |
| starttransfer_time_us | 465617 |
| total_time_us | 770484 |
| effective_method | GET |
| capath | |
| cainfo | /etc/pki/tls/certs/ca-bundle.crt |
Test UrlGet with https://www.pmwiki.org/pmwiki/nosuchfile This test failed as expected
|
Messages
RecipeCheck
Check recipes