Advertisement
Guest User

tbt

a guest
May 12th, 2015
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.14 KB | None | 0 0
  1. <%
  2. Function BinaryToString(Binary)
  3.  IF isNull(Binary)=True Then Exit Function
  4.  Dim cl1, cl2, cl3, pl1, pl2, pl3
  5.  Dim L
  6.  cl1 = 1
  7.  cl2 = 1
  8.  cl3 = 1
  9.  L = LenB(Binary)
  10.  Do While cl1<=L
  11.   pl3 = pl3 & Chr(AscB(MidB(Binary,cl1,1)))
  12.   cl1 = cl1 + 1
  13.   cl3 = cl3 + 1
  14.    IF cl3>300 Then
  15.     pl2 = pl2 & pl3
  16.     pl3 = ""
  17.     cl3 = 1
  18.     cl2 = cl2 + 1
  19.      IF cl2>200 Then
  20.       pl1 = pl1 & pl2
  21.       pl2 = ""
  22.       cl2 = 1
  23.      End If
  24.     End If
  25.  Loop
  26.  BinaryToString = pl1 & pl2 & pl3
  27. End Function
  28. '--------------------------------
  29. cekimalani="http://www.ntv.com.tr"
  30. yazimalani="dosyam.html"
  31. '--------------------------------
  32. Set xml = Server.CreateObject("Microsoft.XMLHTTP")
  33. xml.Open "GET", cekimalani, False
  34. xml.Send
  35. IF xml.Status = 200 Then
  36.   Set FSO=Server.CreateObject("Scripting.FileSystemObject")
  37.    Set objTextStream = FSO.CreateTextFile(server.mappath(yazimalani),True,True)
  38.     objTextStream.Write(BinaryToString(xml.responseBODY))
  39.    objTextStream.Close:Set objTextStream = Nothing
  40.   Set FSO=Nothing
  41.   Response.Write("ne çektin be asp")
  42. ELSE
  43.  Response.Write("errör")
  44. END IF
  45. Set xml=Nothing
  46. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement