-
January 10th, 2012, 03:10 AM
#1
Hi Hows it going? I'm new and already need help!
Hi guys! I'm Andrew! aka Sullydude!
Ok so I've been following a tutorial on cod project called PONTA, basically it allows you to get your internet history from IE, and store it how you like. I currently have mine in a string. but the piece of code I'm trying to understand is this:
url.DeleteHistoryEntry("http://www.facebook.com" + letters.Any() + "/" + letters.Any(), 1);
As you can see I'm "attempting" to to delete a unknown url from facebook history. but the only problem I seem to be having is its not detecting whole words. so for instance
the url is super long so I would like to delete the entire chain of characters by detecting if there's any text in the url. so for instance:
url.DeleteHistoryEntry("http://www.facebook.com" + YOU + ARE + HERE + "/" + Random, 1);
I would really like to delete the You, Are, Here, Random, without knowing what word or character they are. I'm trying to explain as best i can so sorry for any misunderstandings
I'm trying to accomplish this with this string[]
string[] letters = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "`", "~", "!", "@", "#", "4", "%", "^", "&", "*", "(", ")", "{", "}", ":", ";", "'", "\"", ",", ">",
"," , ".", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "\\", "/", "?"};
PLAESE HELP!
Thank you in advance
- Sullydude
-
January 10th, 2012, 05:30 AM
#2
Re: Hi Hows it going? I'm new and already need help!
Don't really have enough info, but letters.Any() isnt going to work in the way you expect
Perhaps consider a loop that iterates through the history and if the url StartsWith() "http://www.facebook.com" then delete the entry
-
January 10th, 2012, 10:05 PM
#3
Re: Hi Hows it going? I'm new and already need help!
Originally Posted by cjard
Perhaps consider a loop that iterates through the history and if the url StartsWith() "http://www.facebook.com" then delete the entry
The Only problem I see with that is if there is more than 1 entry that has the beginning "http://www.facebook.com". what if i want to keep 1. what I'd really like to do is detect if there is any form of characters in the url.
so for instance, "http://www.Youtube.com/ifthereistextherethendelete;
I would like to detect that there is any string after the youtube.com/.
so if even it doesnt = ifthereistextherethendelete
but = ifthereistextherethen(I)delete
I would like to delete that as well.
I appreciate all the help your giving me btw!
- Sullydude
-
January 11th, 2012, 06:32 AM
#4
Re: Hi Hows it going? I'm new and already need help!
try to read history as a text file.Than you make connection to that location :
string filePath="C:\\Temp\\....." ---------------location of history file
file = new StreamReader(filePath); ------------------constructor
while ((line = file.ReadLine()) != null) ---------------read file from start to the end
{
if (line.Contains("facebook")) ---------------if line contains facebook
{
string x = line.Replace("facebook...", ""); --------------replace line with nothing
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|