LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-10-2004, 01:51 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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?
 
Old 11-10-2004, 02:11 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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
 
Old 11-10-2004, 02:18 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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!!!! )
 
Old 11-10-2004, 02:25 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I thought something like
Code:
<html src="www.whocareswhere.org/blahblah/theoriginallocationofthefile.htm"> 
</html>
would do.

is there a way to do it?
 
Old 11-10-2004, 02:41 PM   #5
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Rep: Reputation: 30
I think it has to start with "http://www........."
 
Old 11-10-2004, 02:42 PM   #6
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
 
Old 11-10-2004, 04:07 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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!!!! )
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?
 
Old 11-10-2004, 07:18 PM   #8
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
???
This is getting personal, now.

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.
 
Old 11-10-2004, 07:19 PM   #9
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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.
 
Old 11-10-2004, 07:25 PM   #10
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Why do people assume I'm just too dumb?

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?
 
Old 11-10-2004, 09:56 PM   #11
randyding
Member
 
Registered: May 2004
Posts: 552

Rep: Reputation: 31
In the html document header, you need the tag
<base href="http://www.webserver.com/whatever/">
 
Old 11-11-2004, 07:42 AM   #12
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
NOW we're talking!

Thank you man. It worked just fine!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
changeing default document from index.html in apache thebover Linux - Software 3 03-30-2005 09:26 PM
simple q: can you use php inside an html document? BrianK Programming 2 12-10-2004 09:31 PM
Convert openoffice document into ms document through cli? bruno buys Linux - Software 0 07-05-2004 09:59 AM
Fooling OS fingerprint identification raz Linux - Security 10 06-07-2001 06:28 AM


All times are GMT -5. The time now is 04:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration