Function file_get_contents(sURL)
dim xmlhttp, sResult
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET",sURL, false
xmlhttp.send sURL
sResult = xmlhttp.ResponseText
set xmlhttp = nothing
file_get_contents = sResult
End Function
Date :
2010-08-17 16:50:12
By :
Gg
No. 2
Guest
Code (ASP)
<%
Function File_Get_Contents(strFile)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, 1)
File_Get_Contents = objFile.ReadAll()
Set objFile = Nothing
Set objFSO = Nothing
End Function
Function File_Put_Contents(strFile, strContents, blnAppend)
If blnAppend Then
intMode = 8
Else
intMode = 2
End If
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, intMode, True)
objFile.Write(strContents)
Set objFile = Nothing
Set objFSO = Nothing
End Function
%>