Programming Help Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Downloading PDF Expand / Collapse
Author
Message
Posted 7/16/2011 9:56:19 AM
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
Post #7573
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: ProgrammingHelp, Viral Unity, Matt.Hill, DaveL, Alex.D

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 10:36pm

Homework help programming
Execution: 1.279. 9 queries. Compression Disabled.