![]() |
|
[.NET] Pastebin API Library - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Pastebin API Library (/showthread.php?tid=3202604) Pages: Pages
1
2
|
Pastebin API Library - antiven0m - Jan 24, 2013 In my spare time I made an easy way to use the Pastebin API. I'm relatively new to coding DLL's so feedback would be appreciated. Code APIKey = Your API KeyText Style Code List, Get your API Key at http://pastebin.com/api . Example Usage ![]() Here's the source, have fun. Code Public Class Paster* - Only3 - Jan 24, 2013 why dll and not the class its very simple with key as here http://pastebin.com/api * - antiven0m - Jan 24, 2013 (Jan 24, 2013 09:04 AM)Only3 Wrote: why dll and not the class its very simple with key as here http://pastebin.com/api For ease of use. Also, just practicing making Libraries. * - Deliriumâ„¢ - Jan 24, 2013 You can still post the class'es code. * - antiven0m - Jan 24, 2013 Due to popular request, PM me if you want the source. * - Superuser - Jan 24, 2013 (Jan 24, 2013 10:06 AM)antiven0m Wrote: Due to popular request, PM me if you want the Class.Are you retarded or something? haha... * - antiven0m - Jan 24, 2013 (Jan 24, 2013 10:11 AM)Superuser Wrote: Are you retarded or something? haha...I don't see any reason for you to ask? * - Not2EXceL - Jan 24, 2013 The point is why would people post pm for a source code to an api thats very simple to understand and is well documented online. * - antiven0m - Jan 24, 2013 (Jan 24, 2013 10:22 AM)Not2EXceL Wrote: The point is why would people post pm for a source code to an api thats very simple to understand and is well documented online. I do the PM thing so I can actually see if there is interest in what I spent time coding. I want to feel like I've accomplished something by making all this.. And if it's easy, then people can code it for themselves. I'm not saying it hard to code, and i'm not asking a lot to get it. Is it impossible to release something in this section? EDIT: Released it anyways... oh well. * - Only3 - Jan 24, 2013 Below is a PHP example using cURL how to create a new paste: PHP Code Possible Good API Responses: (example) http://pastebin.com/UIFdu235s Use - MsgBox(New System.IO.StreamReader(Net.HttpWebRequest.Create("http://ursite.com/api.php").GetResponse.GetResponseStream()).ReadToEnd) * - antiven0m - Jan 24, 2013 (Jan 24, 2013 10:38 AM)Only3 Wrote: Below is a PHP example using cURL how to create a new paste: Mine doesn't reference to an online API. It sends a POST Request. * - Only3 - Jan 24, 2013 Public Function PasteBinUpload(ByVal code As String) As String System.Net.ServicePointManager.Expect100Continue = False Dim pr As Integer = 0 Dim fi As String = "?paste_private=" & pr & "&paste_format=text" & "&paste_code=" & code Dim w As New System.Net.WebClient() w.Headers.Add("Content-Type", "application/x-www-form-urlencoded") Dim pd As Byte() = System.Text.Encoding.ASCII.GetBytes(fi) Dim rd As Byte() = w.UploadData("http://pastebin.com/api_public.php", "POST", pd) Dim r As String = System.Text.Encoding.ASCII.GetString(rd) Return r End Function theres many examples on web this one quick search of the section * - antiven0m - Jan 24, 2013 (Jan 24, 2013 10:47 AM)Only3 Wrote: Public Function PasteBinUpload(ByVal code As String) As String I'm sure there are, I didn't invent POST Requests. * - Not2EXceL - Jan 24, 2013 (Jan 24, 2013 10:41 AM)antiven0m Wrote: Mine doesn't reference to an online API. It sends a POST Request. I just looked at your source you posted, and it does reference to the pastebin api -_- The example they give is post as well. [img]http://img843.imageshack.us/img843/7695/4f96924d18c141339368892.png[/img] just please don't make yourself look anymore stupid * - antiven0m - Jan 24, 2013 (Jan 24, 2013 10:52 AM)Not2EXceL Wrote: I just looked at your source you posted, and it does reference to the pastebin api -_- You misunderstood my words. Not referencing to an API other than the Pastebin API. He was stating that it could reference another API with the code in the above picture you posted. EDIT: This section may be the biggest group of bigots I've seen. |