From: Daniel R. <dtr...@us...> - 2004-03-19 02:01:23
|
Update of /cvsroot/bkm/bkm/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32006/misc Modified Files: clsGetTitle.cls Log Message: Don't try to get the title of a file that won't have a title Speed up title-getting by restricting to first 5K of the document Index: clsGetTitle.cls =================================================================== RCS file: /cvsroot/bkm/bkm/misc/clsGetTitle.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** clsGetTitle.cls 12 Jan 2004 03:44:21 -0000 1.1 --- clsGetTitle.cls 19 Mar 2004 01:51:41 -0000 1.2 *************** *** 53,60 **** strMURL = strURL ! ' Check Set cHTTP = New clsHTTP blnHTTPFinished = False ! cHTTP.Download strMURL ' Wait until the file has been downloaded --- 53,76 ---- strMURL = strURL ! ' Check to be sure we can get the title ! If Right$(strMURL, 1) <> "/" Then ' assume index pages are OK ! ' get titles from htm/html, xml, asp, php, cfm, srv, others? ! If (InStr(1, strMURL, ".htm") _ ! And InStr(1, strMURL, ".xml") _ ! And InStr(1, strMURL, ".asp") _ ! And InStr(1, strMURL, ".php") _ ! And InStr(1, strMURL, ".cfm") _ ! And InStr(1, strMURL, ".srv") _ ! ) Then ! 'no good extensions found - use the URL and don't bother with the rest ! strMTitle = strMURL ! Exit Function ! End If ! End If ! ! ' Download Set cHTTP = New clsHTTP blnHTTPFinished = False ! cHTTP.Download strMURL, 5 ' Wait until the file has been downloaded |