' Present Web Browser Favourites in Dropdown on Local Web Server MyFavourites.html R.Metcalfe July 2013 RJM Programming ' When dropdown option picked give a summary of line/word/character count before going to that website. Imports System Imports System.IO Module Module1 Function anotherlayer(ByVal inurl As String, ByVal phpcheckplace As String) As String anotherlayer = inurl If System.IO.File.Exists(phpcheckplace + "fgc.php") = False Then System.IO.File.WriteAllText(phpcheckplace + "fgc.php", " alert('" + Chr(34) + " . $uris . " + Chr(34) + " consists of " + Chr(34) + " . $linecount . " + Chr(34) + " lines and " + Chr(34) + ";" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", "$bigblurb = " + Chr(34) + "" + Chr(34) + ";" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", "for ($i=0;$i 0) $wordcount += 1;" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", " for ($ii=1;$ii" + Chr(34) + ";" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", " $out = str_replace(" + Chr(34) + "" + Chr(34) + ",($bigblurb . " + Chr(34) + "" + Chr(34) + "),$convert[$i]);" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", " $out = str_replace(" + Chr(34) + "" + Chr(34) + ",($bigblurb . " + Chr(34) + "" + Chr(34) + "),$out);" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", " echo $out;" + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", "} " + Chr(13) + Chr(10)) System.IO.File.AppendAllText(phpcheckplace + "fgc.php", "?>" + Chr(13) + Chr(10)) End If If System.IO.File.Exists(phpcheckplace + "fgc.php") = True Then anotherlayer = "http://127.0.0.1/fgc.php?inurl=" + inurl.Replace("?", "~!~") End If End Function Sub Main() Dim ourpath As String = Environment.GetEnvironmentVariable("PATH") Dim iplace As Integer = ourpath.ToLower().IndexOf("easyphp") Dim jplace As Integer Dim localrootdir As String = "" Dim localrootfile As String = "" If iplace > 0 Then jplace = iplace While (jplace < ourpath.Length And ourpath.Substring(jplace, 1) <> "\" And ourpath.Substring(jplace, 1) <> ";") localrootdir = localrootdir + ourpath.Substring(jplace, 1) jplace = jplace + 1 End While jplace = iplace - 1 While (jplace > 0 And ourpath.Substring(jplace, 1) <> ";") localrootdir = ourpath.Substring(jplace, 1) + localrootdir jplace = jplace - 1 End While localrootdir = localrootdir + "\www\" Dim fplace As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites) Dim ourdi As DirectoryInfo = New DirectoryInfo(fplace + "\") Dim ourfls() As FileInfo = ourdi.GetFiles("*.url", SearchOption.AllDirectories) Dim ourfl As FileInfo Dim baseurl As String = "" Dim cnt As Integer = 0 For Each ourfl In ourfls If localrootfile.Length = 0 Then localrootfile = "MyFavourites.html" System.IO.File.WriteAllText(localrootdir + localrootfile, "Your Favourites

Your Favourites