I'm trying to write an html, or javascript code that automatically downloads a file when a user visits the web page. Can anyone help me with this please? Thanks :)

Recommended Answers

All 8 Replies

What kind of file are you trying to download (now i am interested to hear this...).

I know its possible to figure out if a user visits a page but why would you want to download a file for EVERY SINGLE USER visiting the page?

Also, what have you tried out...?

I do internet security and anti virus, and I wanted to find any codes in order to download something automatically to a computer, in order to figure out a way to defend against it. Just testing this stuff out. How about files such as .zip or BATCH files?

Member Avatar for LastMitch

I do internet security and anti virus, and I wanted to find any codes in order to download something automatically to a computer, in order to figure out a way to defend against it. Just testing this stuff out. How about files such as .zip or BATCH files?

I don't think anyone can post a code like that, as you mention you do internet security & anti virus for a living.

Why would anyone create a code that hijack someones computer?

Why would anyone create a code that hijack someones computer?

Maybe wants to figure out how to put a virus on someone's computer or some other file in someone's computer....

Haha, I don't try to put viruses on other people's computers. I just wanted to know, it's okay if you don't feel like telling me.

I am actually kind of curious to know how it is done myself...

Exactly! It's interesting to know how to do this. :) I hope someone that knows can tell me haha

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.