Page 1 of 1

urgent Help

Posted: Thu Feb 27, 2003 5:45 pm
by karthik_vik
Hi,

I have created a website and have huge video files. I have burned these files onto a CD ROM. Now, i want all the links on my website to point to the video in the CDROM.

the links that i created dont work when i click on them. Is there anything special that i need to do inorder to achieve this.

Thanks

karthik

Posted: Thu Feb 27, 2003 6:48 pm
by McGruff
I'm only guessing but I think you'd use your IP address, and then specify a file path. Won't work if you have a dynamic IP though and sounds dodgy as hell from a security point of view.

Do you have room on your server? I'd upload them there if so.

Posted: Thu Feb 27, 2003 7:05 pm
by hedge
What OS. did you mount the cdrom under your www root? What error do you get.

If you can't mount the cdrom under the www root then you should be able to build a helper script to get the file and send it to the browser.

Posted: Fri Feb 28, 2003 12:43 am
by decoy1
I agree with the crime dog. Imagine multiple, simultaneous requests for files on a cd drive??

Put em on the server, compress them maybe?

Posted: Fri Feb 28, 2003 6:28 am
by karthik_vik
hi,

thanks all for ur help. But the thing is i will be distributing the CDROM's to all my clients.

When they run the CD. it automatically opens the webbrowser to point to my site and they will be accessing most of the pages from my server.
But all the videos instead of downloading them from the server, when they click on the link to the video, it should be run off the CDROM

So, each client will have a CD with the videos in it.

This is my problem.

Karthik.

Posted: Fri Feb 28, 2003 6:31 am
by volka
if the html pages are on the same medium (the cd) use relative paths to link the videos.

Posted: Fri Feb 28, 2003 6:35 am
by karthik_vik
Hi,

Well actually, a HTML file in the server has a link to another HTML file in the CD which has the Video link which is also in the CD

Thanks

Karthik

Posted: Fri Feb 28, 2003 6:53 am
by volka
pointing to the video from the page on the cd should be no problem.
Assume a page test.html in the directory /html and a video promo.mpeg in /videos , then you link the video e.g. by

Code: Select all

<html><body>
   <a href="../videos/promo.mpeg">open video</a>
</body></html>
the tricky part is to let the server-document point to test.html on the cd. E.g. I could put the CD in my DVD-drive and the uri would be file:///g:/html/test.html or I insert it in my CD-RW causing the URI to be file:///h:/html/test.html. Or I decide to watch it on the linux-box (where the cd-rom is located at /mnt/cdrom ) and so on and so on...
You might store that info for each (logged in) user on your server but if this is such a good idea... prepare yourself for non-tech users' call-backs ;)

Posted: Fri Feb 28, 2003 9:03 am
by karthik_vik
Hi,

Yeah, i am doing that, i.e before the user logs in he/she has a page where they specify the CD drive that they shall be using.

I store this in the database and use it to point my HTML page to point to the HTML page in the CD ROM.

But there something of relative addressing involved in this, because if i simply say....

Code: Select all

<a href="d:/equipment/test.html">testpage</a>
the link does not seem to work. i mean when i click on it nothing happens.

By the way, I am not the root user of the server. Does that make any difference?

thanks a lot for ur advice

Karthik

Posted: Fri Feb 28, 2003 9:13 am
by volka
By the way, I am not the root user of the server. Does that make any difference?
no, this is part of the client, but you have to set the used protocol. Since the document has been requested via http (and most browser implement this as default protocol) you have to explicitly change it to the local storage. Again, the first cd-rom of my windows-box is located at file:///g:/ not simply g:/ if the browser is involved.

btw: Did you consider putting a complete working (sub-)site on the CD?
It might contain a (well placed) link to your site but users would be able to view the content even without an internet connection

Posted: Fri Feb 28, 2003 11:55 am
by karthik_vik
Hi,

i have tried what u had said but it still dosent work as a link..... :(

here is the code for u to look at....

Code: Select all

<?PHP
		$cfgProgDir =  'phpSecurePages/';
		include($cfgProgDir . "secure.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
		<title>Equipments</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">		
	</head>
	<body>
		<div align="left">
			<p>&nbsp;</p>
			<font color="#000000" size="2"><strong><font face="Verdana, sans-serif">Transcievers :</font></strong></font></div>
		<ul>
			<li>
				<div align="left"><font color="#000000" size="2" face="Verdana, sans-serif">
						<a href="file:///<?php echo $CDDrive ?>/Equipment/transceivers/toptic/toptic.html" target="_blank">Toptic</a>
					</font>
				</div>
			</li>
			<li>
				<div align="left"><font color="#000000" size="2" face="Verdana, sans-serif">
					<a href="file:///<?php echo $CDDrive ?>/Equipment/transceivers/tethernet/tethernet.html" target="_self">Tethernet</a></font></div>
			</li>
		</ul>
		<div align="left">
			<font color="#000000" size="2" face="Verdana, sans-serif"><strong>Switches & Hub:</strong></font></div>
		<ul>
			<li>
				<div align="left"><font color="#000000" size="2" face="Verdana, sans-serif">
					<a href="file:///<?php echo $CDDrive ?>/Equipment/switch/catalyst4005/switchcatalyst4005.html" target="_self">Catalyst 4005</a></font></div>
			</li>
		</ul>
	</body>
</html>

here the php variable $CDDrive stores the drive info.....I have also tried it without using echo

and to your other query, i cannot put the site on my CD bcoz my employers want it the other way..... :(

Anyways, thanks a ton for your help.

Karthik.

Posted: Fri Feb 28, 2003 1:07 pm
by karthik_vik
Hi,
Since the document has been requested via http (and most browser implement this as default protocol) you have to explicitly change it to the local storage
how do i explicitly change the protocol to local storage?

excuse me if this is very simple....i am a newbie

thanks

karthik

Posted: Fri Feb 28, 2003 2:31 pm
by karthik_vik
Hi,

i just tested what u had said in windows 2000 and it worked perfectly.....

but dosent seem to work in Windows XP....Know any walkaround..

Karthik

Posted: Fri Feb 28, 2003 4:31 pm
by volka
hm, sorry windows xp is something only others suffer from ;)
Does nothing come up or an error message of some kind?

This might a long shot but maybe using a debugger helps you by providing additional information. I guess you're testing with IE on WinXP? There was a debugger freely available at microsoft's site but since I own DevStudio for quite a while I must admit I forgot where it was located. Maybe it was in the platform sdk or this winDbg-thing from http://www.microsoft.com/ddk/debugging/
But before installing (if) note that your internet explorer then will raise a message box each time it encounters an error on a webpage and you will be amazed how many errors there are to encounter ;)

Posted: Fri Feb 28, 2003 4:53 pm
by karthik_vik
Hi,

thanks for all your help. Really appreciate it. I guess i will have to deal with IE on Win XP....

Personally, i am a unix person :)

but have to deal with windows as my clients would have them...

Anyways, Thanks again.

Karthik