Visit url: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>StDoodle mNo edit summary |
||
Line 17: | Line 17: | ||
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}}.| | 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}}.| | ||
improvecode=yes| | |||
code1={{CodeSample| | code1={{CodeSample| |
Revision as of 19:21, 9 March 2010
needs(better_code_samples);
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/");
Special
Note that this function returns void if the page does not exist or if the request times-out.
Attention KoLmafia Experts!
We need your help; some details of this function's operation are unknown or unclear.
The following specific question has been raised:
- Is the special note correct? It appears to sometimes return an empty string & sometimes void; I'm unclear on how the two interact