Activity Stream
48,167 MEMBERS
63297 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 10 of 10
  1.     
    #1
    Member

    Default [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.ObjectByVal e As System.EventArgsHandles 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(byteArray0byteArray.Length)

            
    dataStream.Close()

            
    Dim response As WebResponse request.GetResponse()

            
    MsgBox(CType(responseHttpWebResponse).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 
    I'm getting this responses.

    "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

  2.   Sponsored Links

  3.     
    #2
    Member
    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.

  4.     
    #3
    Member
    Quote Originally Posted by AppDeveloper View Post
    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.
    My English not good for this article. Please can you show me an example?

    This issue very important to me. If you can help would be most grateful.

    Thank you very much for your response.

    Regards.

  5.     
    #4
    Member
    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.

  6.     
    #5
    Member
    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?

  7.     
    #6
    Member
    Yes, exactly! But let your script take on of the results you get from getserver.php. Don't write it directly in your script.

  8.     
    #7
    Member
    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>&bullError #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>

    ... 
    Thank you very much for your response.

    Regards.

  9.     
    #8
    Member
    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.

  10.     
    #9
    Member
    Quote Originally Posted by jubster View Post
    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.
    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.

  11.     
    #10
    Member
    Still can't finish the project.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3867
    Last Post: 18th Nov 2012, 06:44 AM
  2. Netload Working Link Checker ?
    By sahil00150 in forum File Host Discussion
    Replies: 11
    Last Post: 30th Aug 2012, 04:46 PM
  3. Netload: sorry, file is blacklisted aaarrggg
    By Eddie Morra in forum File Host Discussion
    Replies: 22
    Last Post: 1st Feb 2012, 02:04 PM
  4. [Selling] MU/MV/Netload/Storage/Hotfile Premium link Generator Script
    By Streax in forum Completed Transactions
    Replies: 11
    Last Post: 16th Dec 2009, 06:21 PM
  5. Netload.in Plugin - Dman's Multiple Link Checker
    By CyberJ37 in forum Webmaster Resources
    Replies: 0
    Last Post: 21st Feb 2009, 08:37 AM

Tags for this Thread

BE SOCIAL