Sinisterly
[ALPHA] API for CodeCommunity [WIP] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [ALPHA] API for CodeCommunity [WIP] (/Thread-ALPHA-API-for-CodeCommunity-WIP)

Pages: 1 2 3 4 5 6 7


RE: [ALPHA] API for CodeCommunity [WIP] - Shebang - 08-04-2013

(08-04-2013, 11:36 AM)Platinum Wrote: Guys just stop fucking thrashing MY thread or I'm going to call an admin :/

Quote:update 4:

I've cleaned up the source code for the Alpha release. Besides, if you haven't seen it yet, it's released right here: [link]
  • Cleaned up all code
  • Got rid of some issues
  • Made sure all functions work properly

Currently, the goal is to make every function work FASTER.. Lets say within only a couple of lines or maybe only 1 line (if possible).
Please tell me if you have suggestions!

CURRENT FOCUS: Recoding most of the functions, maybe adding some more (optimization) Making the code FASTER, and making a thread layout (would be nice if someone did it FOR me).

Join my stream, I can help you out with some things.


RE: [ALPHA] API for CodeCommunity [WIP] - Platinum - 08-04-2013

(08-04-2013, 12:02 PM)shebang Wrote:
(08-04-2013, 11:36 AM)Platinum Wrote: Guys just stop fucking thrashing MY thread or I'm going to call an admin :/

Quote:update 4:

I've cleaned up the source code for the Alpha release. Besides, if you haven't seen it yet, it's released right here: [link]
  • Cleaned up all code
  • Got rid of some issues
  • Made sure all functions work properly

Currently, the goal is to make every function work FASTER.. Lets say within only a couple of lines or maybe only 1 line (if possible).
Please tell me if you have suggestions!

CURRENT FOCUS: Recoding most of the functions, maybe adding some more (optimization) Making the code FASTER, and making a thread layout (would be nice if someone did it FOR me).

Join my stream, I can help you out with some things.

Eerhm ok? I prefer something like Skype though.


RE: [ALPHA] API for CodeCommunity [WIP] - Shebang - 08-04-2013

Here's the functions I modified, all the variables stay the same so you should be able to Copy + Paste as needed.

Spoiler: New API Code
[code=vbnet]Public Function ConfigureUID(uid As Integer)
URLProfile = "http://www.codecommunity.net/member.php?action=profile&uid="
URLOnline = "http://www.codecommunity.net/reputation.php?uid="
URLSupMem = "http://codecommunity.net/checku.php?user="
URLProfile = URLProfile & uid.ToString
URLRep = URLRep & uid.ToString
Try
WebC = Web.DownloadString(URLProfile)
Catch ex As WebException
WebC = "Something went wrong in the configuration."
End Try

Try
DimC = New IO.StreamReader(Net.WebRequest.Create(URLProfile).GetResponse.GetResponseStream).ReadToEnd
Catch ex As WebException
DimC = "Something went wrong in the configuration."
End Try

URLSupMem = URLSupMem & GetUsername(uid)
Try
SupMem = New IO.StreamReader(Net.WebRequest.Create(URLSupMem).GetResponse.GetResponseStream).ReadToEnd
Catch ex As Exception
SupMem = "Something went wrong in the configuration." 'GoTos may look nice, but they're bad. Sorry :p
End Try

Return Nothing 'Exiting a function isn't necessary, this is done automatically.
End Function

Public Function GetUsername(uid As Integer) As String
Try
Return Split(WebC, "<title>Code Community - Profile of ")(1).Split("<")(0)
Catch ex As Exception
Return "Error retrieving username."
End Try
End Function

Public Function GetJoinDate(uid As Integer) As String
Try
Return Split(WebC, "<strong>Registration Date:</strong> ")(1).Split("<")(0)
Catch ex As Exception
Return "Error retrieving join date."
End Try
End Function

Public Function GetDateOfBirth(uid As Integer) As String
Try
Return Split(WebC, "<strong>Date of Birth:</strong> ")(1).Split("<")(0)
Catch ex As Exception
Return "Error retrieving date of birth."
End Try
End Function

Public Function GetLocalTime(uid As Integer) As String
Try
Return Split(WebC, "<strong>Local Time:</strong> ")(1).Split("<")(0)
Catch ex As Exception
Return "Error retrieving local time."
End Try
End Function

Public Function GetStatus(uid As Integer) As String
Try
Return Split(WebC, "<strong>Status:</strong> ")(1).Split("<")(0)
Catch ex As Exception
Return "Error retrieving user status."
End Try
End Function

Public Function GetLastVisit(uid As Integer) As String
Try
Return Split(Split(WebC, "<td class=""trow2""><strong>Last Visit:</strong></td>" & vbNewLine)(1).Split("/")(0), ">")(1)
Catch ex As Exception
Return "Error retrieving last visit."
End Try
End Function
.
Public Function GetPosts(uid As Integer, Optional ByRef bolean As Boolean = False) As String
Try
Return Split(Split(WebC, "<td class=""trow1""><strong>Total Posts:</strong></td>" & vbNewLine)(1).Split(")")(0), ">")(1) & ")"
Catch ex As Exception
Return "Error retrieving total posts."
End Try
End Function

Public Function GetOnlineTime(uid As Integer) As String
Try
Return Split(Split(WebC, "<td class=""trow2""><strong>Time Spent Online:</strong></td>" & vbNewLine)(1).Split("/")(0), ">")(1)
Catch ex As Exception
Return "Error retrieving total online time."
End Try
End Function

Public Function GetReferredMembers(uid As Integer) As String
Try
Return Split(WebC, "<td class=""trow1""><strong>Members Referred:</strong></td>" & vbNewLine & "<td class=""trow1"">")(1).Split(" ")(0)
Catch ex As Exception
Return "Error retrieving total referred members."
End Try
End Function[/code]



RE: [ALPHA] API for CodeCommunity [WIP] - Platinum - 08-04-2013

Looking good, not sure if I'm going to use all that but ty for all these examples! ^^


RE: [ALPHA] API for CodeCommunity [WIP] - Blackbone - 08-04-2013

(08-03-2013, 10:02 PM)Eternity Wrote:
(08-03-2013, 09:45 PM)Blackbone Wrote:
(08-03-2013, 06:51 PM)Eternity Wrote:
(08-03-2013, 06:46 PM)Blackbone Wrote:
(08-03-2013, 06:19 PM)Platinum Wrote: And you say this? Look how you're screaming at us now...
I don't like low quality users...

Low quality...really ?
1. Learn to spell properly.
2. Try learning something about the subject before you post saying "lol this is so simple this is webbased u just add the webbrowser and get name values of each php page.."
3. Stop calling us low quality, it's really old. Try calling us idiots or something else than "Ohh that guy is stupid....LOW QUALITY!!!".
4. Get off the forum if you are going to be like this.
I didn't say ur stupid I said ur rude by talking to me by that way... there is some nice way to talk with ppl and not tell them retards... this is why you are a low quality user

Sorry meant "Rude" not "Stupid", my fault.

"Never go full retard" is a meme.
http://knowyourmeme.com/memes/full-retard

"fuck this community,community of shit and rude ppl u sir must take the adminstartion of SHIT u had"
Didn't you say you were leaving this "Shit-Community" ?

I changed my mind, im free to leave and free to enter


RE: [ALPHA] API for CodeCommunity [WIP] - Platinum - 11-17-2013

Bringing this back up, should I renew this for Sinisterly ?


RE: [ALPHA] API for CodeCommunity [WIP] - Blue - 11-17-2013

(11-17-2013, 08:57 PM)Platinum Wrote: Bringing this back up, should I renew this for Sinisterly ?

Well Obviously. ;P


RE: [ALPHA] API for CodeCommunity [WIP] - Leumonic - 11-21-2013

I've created a universal MyBB API. Just upload the PHP files to your forum root and you're good to go. It uses JSON and PDO to access information; no insecurities.