|
|
Forum Newbie
Group: Forum Members Last Login: 7/16/2011 9:47:29 AM Posts: 1, Visits: 1
|
|
Hello,
I hope to find someone who can help me out of a problem I have with Classic ASP:
I have have an URL where I can send a request to. If the request is true, I get a PDF file back:
Example of a request:
http://Kansarax.org/data.asp?Action=PDF&Number=12345678
When I send this, they send me 12345678.pdf back so I can download it.
I have tried this code, but it doesn't work:
url = "http://Kansarax.org/data.asp?Action=PDF&Number=12345678"
br = Request.ServerVariables("HTTP_USER_AGENT")
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
on error resume next
xmlhttp.open "GET", url, false
xmlhttp.setRequestHeader "User-Agent",br
xmlhttp.send ""
if err.number 0 then
response.write "Url not found"
else
response.write xmlhttp.responseText
end if
set xmlhttp = nothing
%>
Any Help Will be greatly appreciated,
Thanks.
Regards,
Kansarax Buda
|
|
|
|