home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _4b287085e3c32b1d52ccb48b6873d1ad < prev    next >
Text File  |  2000-03-23  |  7KB  |  170 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Netscape::HistoryURL - URI::URL subclass with Netscape history information</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Netscape::HistoryURL - URI::URL subclass with Netscape history information</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#constructor">CONSTRUCTOR</A></LI>
  26.     <LI><A HREF="#methods">METHODS</A></LI>
  27.     <UL>
  28.  
  29.         <LI><A HREF="#visit_time  return the time of last visit">visit_time - return the time of last visit</A></LI>
  30.         <LI><A HREF="#first_visit_time  the time you first visited the url">first_visit_time - the time you first visited the URL</A></LI>
  31.         <LI><A HREF="#last_visit_time  the time you last visited the url">last_visit_time - the time you last visited the URL</A></LI>
  32.         <LI><A HREF="#title  the title of the associated page">title - the title of the associated page</A></LI>
  33.         <LI><A HREF="#visit_count  the number of times you have visited the page">visit_count - the number of times you have visited the page</A></LI>
  34.         <LI><A HREF="#expire  the expire value for the url">expire - the expire value for the URL</A></LI>
  35.     </UL>
  36.  
  37.     <LI><A HREF="#see also">SEE ALSO</A></LI>
  38.     <LI><A HREF="#author">AUTHOR</A></LI>
  39.     <LI><A HREF="#copyright">COPYRIGHT</A></LI>
  40. </UL>
  41. <!-- INDEX END -->
  42.  
  43. <HR>
  44. <P>
  45. <H1><A NAME="name">NAME</A></H1>
  46. <P>Netscape::HistoryURL - URI::URL subclass with Netscape history information</P>
  47. <P>
  48. <HR>
  49. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  50. <UL>
  51. <LI>Windows</LI>
  52. </UL>
  53. <HR>
  54. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  55. <PRE>
  56.     use Netscape::HistoryURL;
  57. </PRE>
  58. <PRE>
  59.  
  60.     $url = new Netscape::HistoryURL('<A HREF="http://foobar.com/">http://foobar.com/</A>',
  61.                                     LAST, FIRST, COUNT, EXPIRE, TITLE);</PRE>
  62. <P>
  63. <HR>
  64. <H1><A NAME="description">DESCRIPTION</A></H1>
  65. <P>The <CODE>Netscape::HistoryURL</CODE> module subclasses <A HREF="../../../site/lib/URI/URL.html">the URI::URL manpage</A> to provide
  66. a URL class with methods for accessing the information which is stored
  67. in Netscape's <EM>history database</EM>.</P>
  68. <P>The history database is used to keep track of all URLs you have visited.
  69. This is used to color previously visited URLs different, for example.
  70. The information stored in the history database depends on the version
  71. of Netscape being used.</P>
  72. <P>
  73. <HR>
  74. <H1><A NAME="constructor">CONSTRUCTOR</A></H1>
  75. <PRE>
  76.     $object = new Netscape::HistoryURL( URL,
  77.                                         LAST, FIRST, COUNT, EXPIRE, TITLE );</PRE>
  78. <P>This creates a new instance of the Netscape::HistoryURL object class.
  79. This supports all the methods supported by the URI::URL class.
  80. Please see the documentation for that module.</P>
  81. <P>The first argument passed is a string which contains a valid URL.
  82. The remaining arguments are information (usually) extracted from Netscape's
  83. history database.</P>
  84. <P><STRONG>LAST</STRONG> is the time the URL was last visited, and <STRONG>FIRST</STRONG> is the time
  85. when the URL was first visited. <STRONG>COUNT</STRONG> is the number of times you
  86. have visited the URL. We're not really sure what <STRONG>EXPIRE</STRONG> is yet.
  87. <STRONG>TITLE</STRONG> is the title of the referenced page.</P>
  88. <P>You will normally not use the constructor yourself;
  89. it is usually invoked by the <CODE>next_url()</CODE> method of the
  90. Netscape::History class.</P>
  91. <P>
  92. <HR>
  93. <H1><A NAME="methods">METHODS</A></H1>
  94. <P>The <STRONG>Netscape::HistoryURL</STRONG> class supports all methods of the URI::URL
  95. class, and additional methods as described below.
  96. Please see the documentation for URI::URL for details of
  97. the other methods supported.</P>
  98. <P>
  99. <H2><A NAME="visit_time  return the time of last visit">visit_time - return the time of last visit</A></H2>
  100. <PRE>
  101.     $time = $url->visit_time();</PRE>
  102. <P>This routine is provided for backwards compatibility with the previous
  103. versions of this module. You should use <CODE>last_visit_time()</CODE> instead.</P>
  104. <P>
  105. <H2><A NAME="first_visit_time  the time you first visited the url">first_visit_time - the time you first visited the URL</A></H2>
  106. <PRE>
  107.     $time = $url->first_visit_time();</PRE>
  108. <P>This method returns the time you first visited the URL,
  109. in seconds since the last epoch.
  110. This can then be used with any of the standard routines for formatting
  111. as a string.
  112. The following example uses ctime(), from the Date::Format module:</P>
  113. <PRE>
  114.     print "Time of last visit for $url : ", ctime($url->first_visit_time);</PRE>
  115. <P>
  116. <H2><A NAME="last_visit_time  the time you last visited the url">last_visit_time - the time you last visited the URL</A></H2>
  117. <PRE>
  118.     $time = $url->last_visit_time();</PRE>
  119. <P>This method returns the time you last (most recently) visited the URL,
  120. in seconds since the last epoch.</P>
  121. <P>
  122. <H2><A NAME="title  the title of the associated page">title - the title of the associated page</A></H2>
  123. <PRE>
  124.     $title = $url->title();</PRE>
  125. <P>This method returns the title of the referenced page, if one
  126. was available. The value will be <A HREF="../../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A> otherwise.</P>
  127. <P>
  128. <H2><A NAME="visit_count  the number of times you have visited the page">visit_count - the number of times you have visited the page</A></H2>
  129. <PRE>
  130.     $count = $url->visit_count();</PRE>
  131. <P>This method returns the number of times you have visited the page.</P>
  132. <P>
  133. <H2><A NAME="expire  the expire value for the url">expire - the expire value for the URL</A></H2>
  134. <PRE>
  135.     $expire = $url->expire();</PRE>
  136. <P>This method returns the expire values which is stored for the URL.
  137. We don't know what this is for yet, or the right way to interpret it.</P>
  138. <P>
  139. <HR>
  140. <H1><A NAME="see also">SEE ALSO</A></H1>
  141. <DL>
  142. <DT><STRONG><A NAME="item_Netscape%3A%3AHistory">Netscape::History</A></STRONG><BR>
  143. <DD>
  144. An object class for accessing the Netscape history database.
  145. <P></P>
  146. <DT><STRONG><A NAME="item_URI%3A%3AURL">URI::URL</A></STRONG><BR>
  147. <DD>
  148. Base-class, which provides heaps of functionality.
  149. <P></P></DL>
  150. <P>
  151. <HR>
  152. <H1><A NAME="author">AUTHOR</A></H1>
  153. <P>Neil Bowers <<A HREF="mailto:neilb@cre.canon.co.uk">neilb@cre.canon.co.uk</A>> and
  154. Richard Taylor <<A HREF="mailto:rit@cre.canon.co.uk">rit@cre.canon.co.uk</A>>.</P>
  155. <P>
  156. <HR>
  157. <H1><A NAME="copyright">COPYRIGHT</A></H1>
  158. <P>Copyright (c) 1997-1999 Canon Research Centre Europe. All rights reserved.
  159. This module is free software; you can redistribute it and/or modify
  160. it under the same terms as Perl itself.</P>
  161. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  162. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  163. <STRONG><P CLASS=block> Netscape::HistoryURL - URI::URL subclass with Netscape history information</P></STRONG>
  164. </TD></TR>
  165. </TABLE>
  166.  
  167. </BODY>
  168.  
  169. </HTML>
  170.