Results 1 to 3 of 3

Thread: How to get Download File name

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2013
    Posts
    175

    How to get Download File name

    Hello All Members
    My download link this

    http://lps.ezdownloadpro.info/hp/?q=...86983590790837

    i find download link
    how can posibal

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    13,282

    Re: How to get Download File name

    What is that link to? and what do you mean about getting the file name? What are you using to download with?

  3. #3
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,592

    Re: How to get Download File name

    Hello kako0000000.
    Code:
    Option Explicit
     
    Private Sub Form_Load()
        Dim objHTTP     As Object
        Dim fNum        As Integer
        Dim Resp        As String
        Dim filename    As String
        Dim index       As Long
        
        Set objHTTP = CreateObject("MSXML2.XMLHTTP")
        Call objHTTP.Open("GET", "http://lps.ezdownloadpro.info/hp/?q=S0g8%2Fqq3YToruztvqo1KxsU7R0pStI407qndYa0XkleRzwJeQ3pHMdYtgjJkLLwijtaXRsStIQ101LuK0Xe%2FmwXHIcje8EJl20%2FLaIWl4rfDiflfxNHdKMnFjAC%2FXqHFTf4Yb1ascFU7yB3MQbLNHtvnUe4b7Pq2uqqY9FlrKXWgLpt172japxchK5BHkwA1uU6X%2B6QOaXqp6tDfW0PVjtMjfTGQzd7l7eI6aPpNBdQGRMwmPLmOX8Ez%2Bzj%2FCK%2BV%2Fddy1rFdRnw8CV0Wv3Z9J98FXVENg4%2BdoG4Z6N%2BQml4uj%2Bm81bdPRWC1YVSDtiN7RlP8vWJeir&external_id=1424486983590790837", False)
        objHTTP.send
        
        Resp = objHTTP.getResponseHeader("Content-disposition")
        index = InStr(1, Resp, "filename=") + 10
        filename = Mid$(Resp, index, Len(Resp) - index)
        
        MsgBox filename
        
        ' Save the file into disk
        fNum = FreeFile
        Open "C:\" & filename For Binary As fNum
        
        Put fNum, , objHTTP.responseBody
        
        Close fNum
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width