Visit url: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle m moved Visit url() to Visit url over redirect |
imported>StDoodle No edit summary |
||
Line 1: | Line 1: | ||
{{ | |||
#vardefine:name|visit_url}}{{ | |||
#vardefine:return_type|buffer}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | |||
function_category=String Handling Routines| | |||
function1={{Function| | |||
name={{#var:name}}| | |||
aggregate={{#var:aggregate}}| | |||
return_type={{#var:return_type}}| | |||
return_also={{#var:return_also}}| | |||
parameter1={{Param|string|page}}| | |||
p1desc={{Pspan|page}} is the page to visit| | |||
}}| | |||
function_description=Returns the HTML from the visited page (not just what is displayed when visiting the page, but all markup). Note that for addresses inside of KoL, it is only necessary to supply the page name for {{pspan|page}}, and KoLmafia will populate the rest of the url. However, pages outside of KoL require the full url to be supplied for {{pspan|page}}.| | |||
code1={{CodeSample| | |||
title=Code Samples| | |||
description=Visits your private character sheet.| | |||
code= | |||
<syntaxhighlight> | |||
visit_url( "charsheet.php" ); | |||
</syntaxhighlight>}}| | |||
code2={{CodeSample| | |||
description=Visits google.| | |||
code= | |||
<syntaxhighlight> | |||
visit_url( "http://www.google.com/"); | |||
</syntaxhighlight>}}| | |||
}} |
Revision as of 17:25, 9 March 2010
Function Syntax
buffer visit_url(string page )
- page is the page to visit
Returns the HTML from the visited page (not just what is displayed when visiting the page, but all markup). Note that for addresses inside of KoL, it is only necessary to supply the page name for page, and KoLmafia will populate the rest of the url. However, pages outside of KoL require the full url to be supplied for page.
Code Samples
Visits your private character sheet.
visit_url( "charsheet.php" );
Visits google.
visit_url( "http://www.google.com/");