How would I get the ticker contents in C#, and filter it to threads you post in and that mention your name?
I've got it grabbing the ticker.php page, but it just prints the source.
I can't figure it out at all.
Thanks.
There was a thread where a guy made a Facepunch post monitor that harnessed the Ticker. I'll see if i can locate the thread.
[QUOTE=Senney;16483812]There was a thread where a guy made a Facepunch post monitor that harnessed the Ticker. I'll see if i can locate the thread.[/QUOTE]
Yes I know this, but he didn't release the source code.
[QUOTE=Blynx6;16483884]Yes I know this, but he didn't release the source code.[/QUOTE]
Yeah he did?
[QUOTE=BrokenGlass;16483950]Yeah he did?[/QUOTE]
He did? Can you link me please?
I sound two links with applications related to the ticker.
[url=http://www.facepunch.com/showthread.php?t=744338&highlight=ticker]The Facepunch Monitor App [Beta Release] [/url]
[url=http://www.facepunch.com/showthread.php?t=744079&highlight=ticker]WPF Facepunch Ticker [/url]
You'll probably need some HTML parser class/library. Mainly to remove the HTML or possibly to search for the attributes or whatever that specify read threads and your own posts etc.
When I made the first one which garry condemed it used JSON requests, but I haven't been here in basically a year so it may of (probably has) changed.
[QUOTE=Blynx6;16483884]Yes I know this, but he didn't release the source code.[/QUOTE]
If it's .net just reflect it anyways.
I released the [url=http://users.d2k5.com/itsbth/files/FPTicker_Source.rar]source code[/url] of my ticker...
[QUOTE=itsbth;16490197]I released the [url=http://users.d2k5.com/itsbth/files/FPTicker_Source.rar]source code[/url] of my ticker...[/QUOTE]
Fuck yeah I was about to ask you for this for my next project.
Here's my code so far:
[code]
string sURL;
sURL = "http://www.facepunch.com/fp_ticker.php?aj=1";
WebClient downloadClient = new WebClient();
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
WebProxy myProxy = new WebProxy("myproxy", 80);
myProxy.BypassProxyOnLocal = true;
//wrGETURL.Proxy = WebProxy.GetDefaultProxy();
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
StreamReader objReader = new StreamReader(objStream);
string sLine = "";
int i = 0;
while (sLine != null)
{
i++;
sLine = objReader.ReadLine();
if (sLine != null)
Console.WriteLine("{0}", sLine);
}
Console.ReadLine();
}
[/code]
How can I sort through and add organisation? Right now it just gathers EVERYTHING and prints it into a blob.
[QUOTE=ShaRose_;16485885]If it's .net just reflect it anyways.[/QUOTE]
Yeah, stealing is the way to go.
[QUOTE=BrokenGlass;16502824]Yeah, stealing is the way to go.[/QUOTE]
Reflector doesn't always imply stealing, often times looking through code and getting insight on how something was accomplished can be incredibly useful.
But yeah, blatantly stealing another programmers code is just wrong.
[QUOTE=VoiDeD;16506143]Reflector doesn't always imply stealing, often times looking through code and getting insight on how something was accomplished can be incredibly useful.
But yeah, blatantly stealing another programmers code is just wrong.[/QUOTE]
It's not illegal because I'm a nice guy.
[QUOTE=blankthemuffin;16513148]It's not illegal because I'm a nice guy.[/QUOTE]
Looking is not stealing, there is a distinct difference.
No but reverse engineering can still be illegal depending on license/laws.
Who cares about the reverse engineering. As long as you aren't using it to make money / publishing publicly etc then it really doesn't matter. Also, I gave the source to the OP so it really doesn't matter anymore..
[QUOTE=Blynx6;16496735]How can I sort through and add organisation? Right now it just gathers EVERYTHING and prints it into a blob.[/QUOTE]
I would create a basic struct for each ticker item, and then store them in a List<> (you'll want to parse the JSON). Maybe you could use LINQ to find and sort items in it?
Sorry, you need to Log In to post a reply to this thread.