LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Fooling a HTML document? (https://www.linuxquestions.org/questions/programming-9/fooling-a-html-document-253316/)

eantoranz 11-10-2004 01:51 PM

Fooling a HTML document?
 
Is it possible to fool a HTML document?

I mean... I want to send through email one HTML document. I tested it and it works well.... however, all the links and images are dinamically linked to the original location in internet of the HTML document I want to send... in a few words: they're broken.

Is it possible to fool the document (I'd say the browser instead) to think that the document is being downloaded from a given place instead of the mail, so the images and links are not broken?

Bruce Hill 11-10-2004 02:11 PM

What you need to do is send the "folder" which contains
all the contents, as well as the .html file. Or just send the
link like this ->

Hey Joe, check out this page ->
http://www.google.com/linux

eantoranz 11-10-2004 02:18 PM

Not an option, man... can't send a 500 kb mail to a bunch a people. :)

or just send the links like what? The google/linux link?

That's OK for a couple of links or images to change their directions to static, man.... but how about if there are a couple of dozens.... or hundreds? I don't want to spend a whole day just changing some directions in a HTML file (don't even want to spend 5 minutes!!!! :D)

eantoranz 11-10-2004 02:25 PM

I thought something like
Code:

<html src="www.whocareswhere.org/blahblah/theoriginallocationofthefile.htm">
</html>

would do.

is there a way to do it?

greg108 11-10-2004 02:41 PM

I think it has to start with "http://www........."

eantoranz 11-10-2004 02:42 PM

:confused:

Bruce Hill 11-10-2004 04:07 PM

Quote:

Originally posted by eantoranz
Not an option, man... can't send a 500 kb mail to a bunch a people. :)
Why not? I get it from spammers and lists like Northwest Airlines
every week...

Quote:

or just send the links like what? The google/linux link?
Just send the link like this:

Dear Bunch a people,

You can get the help you need here ->
http://www.livingwaters.com/listenwatch.shtml

Quote:

That's OK for a couple of links or images to change their directions to static, man.... but how about if there are a couple of dozens.... or hundreds? I don't want to spend a whole day just changing some directions in a HTML file (don't even want to spend 5 minutes!!!! :D)
Well, sorry I posted mate. I obliviously don't understand what
you're getting at...and as for spending time, why don't you just
right-click "view page source" in some that you got, and read
the html?

eantoranz 11-10-2004 07:18 PM

???
This is getting personal, now. :D

Look. I do work with the source... linux forum, remember? ;)

As I sais in the begining, I just want to know if there's a standard way to make the browser "assume" that the page is being downloaded from a given internet address instead of the mail itself so that the links provided in the page itself don't get broken.

wapcaplet 11-10-2004 07:19 PM

I'm not sure what you are asking. Do you want to send people an email that appears to be a complete HTML document, but is actually just a link to another site? (that is, somehow "embed" some webpage from somewhere else on the internet into your email?) If so, you're pretty likely to run into a lot of link problems.

If you copy and paste the HTML code from your website into an email message, all the links should work fine if they are absolute links, like this:

Code:

<a href="http://www.yoursite.com/abc.html">...</a>
If they are relative links like this:

Code:

<a href="abc.html">...</a>
then they will not work.

But I think Chinaman has the better idea: why not just tell people "Hey, go visit this site: http://www.mysite.com/" That way you can just post everything on the webpage, and you only have to send a very short email.

eantoranz 11-10-2004 07:25 PM

Why do people assume I'm just too dumb? :D

That would be my FIRST solution to it.... but the BOSS (the one in command) wants the %&(%/&(/$%&/$&/()&=(/ email to show up just like the &/())&/()%&$&/ page that is on the site. ;)

So... what I tried first was:
Send a HTML mail with a unique frame that would contain the web page at the server.... sounds easy... and effective. The only problem with that approach is that it didn't actually work.

seconf choice: What the hel. I'll just grab the page at the Web server and send it to the recipients..... but OF COURSE all links are gonna be broken. so.... well.... now you know where I'm standing.

Any ideas?

randyding 11-10-2004 09:56 PM

In the html document header, you need the tag
<base href="http://www.webserver.com/whatever/">

eantoranz 11-11-2004 07:42 AM

NOW we're talking!

Thank you man. It worked just fine! :cool:


All times are GMT -5. The time now is 08:24 AM.