Results 1 to 10 of 10
-
25th Aug 2012, 02:23 PM #1OPMember
[VB.NET] Netload API - Get file link
Can anyone help me about how to use Netload API on VB.Net? I don't know how to use HttpWebRequest. Paid or free.
---------- Post added at 02:23 PM ---------- Previous post was at 11:16 AM ----------
PHP Code:Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim request As WebRequest = WebRequest.Create("http://api.netload.in/getserver.php")
request.Method = "POST"
Dim postData As String = "modus = file_upload, file = C:\Users\x\Desktop\sc.rar, auth = (Auth Code), user_id = (user no), user_password = (user pass)"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
MsgBox(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
MsgBox(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
End Sub
End Class
"http://upload1.netload.in/api.php, ttp://upload2.netload.in/api.php, ttp://upload3.netload.in/api.php, ... etc"
Help me about post data string.wolfallen Reviewed by wolfallen on . [VB.NET] Netload API - Get file link Can anyone help me about how to use Netload API on VB.Net? I don't know how to use HttpWebRequest. Paid or free. ---------- Post added at 02:23 PM ---------- Previous post was at 11:16 AM ---------- Imports System Imports System.IO Imports System.Net Rating: 5
-
5th Sep 2012, 05:42 AM #2Member
well, read it http://tools.ietf.org/html/rfc2388 and construct the post format properly,
sending data via "application/x-www-form-urlencoded" will not work or at least not considered standard for HTTP POST request that have raw binary data.
-
5th Sep 2012, 02:30 PM #3OPMember
-
5th Sep 2012, 05:28 PM #4Member
You're getting a list of the available upload servers. Choose one of them and append /upload.php?id=9 at the end. Then send the file upload/POST request to this address.
-
5th Sep 2012, 06:26 PM #5OPMember
If I understand you are saying,
Change this line
PHP Code:Dim request As WebRequest = WebRequest.Create("http://api.netload.in/getserver.php")
to
PHP Code:Dim request As WebRequest = WebRequest.Create("http://upload1.netload.in/upload.php?id=9")
Right? Is it helpful?
-
5th Sep 2012, 08:48 PM #6Member
Yes, exactly! But let your script take on of the results you get from getserver.php. Don't write it directly in your script.
-
5th Sep 2012, 09:37 PM #7OPMember
As you said, the response is netload error page source code.
PHP Code:...
<div id="Content_Container">
<div id="InLine_Content_Container">
<br/><div class="InPage_Error"><pre>• Error #01: Upload failed or the file doesn't meet our
<a href="http://netload.in/index.php?id=13">Terms of Service</a>.</pre></div><br/></div></div>
...
Regards.
-
5th Sep 2012, 10:59 PM #8Member
ContentType or enctype should be multipart/form-data
Also include all other post fields of the form where the file upload field is located. Just have a closer look at the netload.in source code. Netload.in doesn't allow archive uploads with passwords (except you are sending the password too) or encrypted archives.
-
6th Sep 2012, 01:19 AM #9OPMember
Just ".rar", no password no compression. Actually I don't know how to use "multipart/form-data" and I think post data string has a mistake too.
Thank you very much for every posts and helps.
Regards.
-----------------------------------------------------------
http://www.besthostingforums.com/1359639-post19.htm
There is PHP codes for Netload API but I don't know PHP. If anyone know PHP, can you translate or convert to VB.NET for me? What should I do? As I said, paid or free. Doesn't matter. I just want to finish this project as soon as possible.
Sorry for bad English.
-
18th Sep 2012, 09:25 AM #10OPMember
Still can't finish the project.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Netload Discussion Thread - Post your discussions related to Netload here.
By inject0r in forum File Host DiscussionReplies: 3867Last Post: 18th Nov 2012, 06:44 AM -
Netload Working Link Checker ?
By sahil00150 in forum File Host DiscussionReplies: 11Last Post: 30th Aug 2012, 04:46 PM -
Netload: sorry, file is blacklisted aaarrggg
By Eddie Morra in forum File Host DiscussionReplies: 22Last Post: 1st Feb 2012, 02:04 PM -
[Selling] MU/MV/Netload/Storage/Hotfile Premium link Generator Script
By Streax in forum Completed TransactionsReplies: 11Last Post: 16th Dec 2009, 06:21 PM -
Netload.in Plugin - Dman's Multiple Link Checker
By CyberJ37 in forum Webmaster ResourcesReplies: 0Last Post: 21st Feb 2009, 08:37 AM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...