Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 29th, 2003, 03:04 AM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sequential images on website

Okay, I really don't know where else to go for any advice on this, or even what to search for...hell, i don't know if this is possible or not even

Okay, I have some webcam software (Peephole 3) that I want to use for a webpage. We are hosting a LAN party this weekend, and want to have a live image from the event on our website. This program will let you overwrite an image every xx seconds, or save in order (like, image001.jpg, image002,jpg, etc).

The webcam software takes a picture every 30 seconds, and the webpage refreshes every 30 seconds. My question is...

If i were to take the pics and have them saved like livefeed001.jpg, livefeed002.jpg, etc, is there any script i could use to have the page load the picture that has the highest number? I really want to have an archive of all these pics, and I can't think of any other way to do it.

Any help is GREATLY appreciated.

Thanks In Advance!

Reply With Quote
  #2  
Old January 29th, 2003, 03:13 AM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
actually, if anyone could give me some good JS that would make the pic refresh every 30 seconds instead of using the meta tag to do it, that would be great too.

Reply With Quote
  #3  
Old January 29th, 2003, 11:40 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
this is the server-side java forum.
you need to get into streaming and use RealMedia, MPEG or maybe Flash. but for a lan-party, this is probably much oversized. guess you are wrong here.

if you would have asked in client-side JavaScript forum, i would have told you:
- save all images with the same name, no numbers.
- and use: <meta http-equiv="refresh" content="30; url=...your url here...">
for a quick-n-dirty solution.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #4  
Old January 29th, 2003, 03:58 PM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no no.....i don't want to do any live streaming. i just want a different still-image on the site every 30 seconds. i already have that meta tag in there for the auto-reload.

lemme re-explain....i want to have an archive of all the shots, but if i archive all the shots, i don't know how to put the most current on on the website

Reply With Quote
  #5  
Old January 30th, 2003, 01:25 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
hard to do without server-side programming. how would you know the current number?
maybe mix the two solutions, make the webcam write the file to a sequentally numbered AND to one that always has the same name...
my webcam came with a pre-made java applet, but i canīt remember if it kept a "history" of the old files...
you could need some server side code that always inserts the right picture (-number). do you have access to any server side programming languages for this?

Reply With Quote
  #6  
Old January 30th, 2003, 01:47 AM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i'll be honest with you ...i have no idea what you mean by server side

but, i will tell you this, the server is running on my computer with apache, so i guess if you are saying i would need to put any java script stuff on the server, that is not a problem,

and, as far as saving sequentually and overwriting a file, the software will NOT do both, and i have tried about 10 programs.

Reply With Quote
  #7  
Old January 30th, 2003, 02:54 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
hmmm. we have a basic understanding problem here.

let me try to explain:
there is two partys for an internet connection. for the www, this is:
- you, using your browser (internet explorer, netscape, ...). this side is called the client.
- the other one that has the html documents and stuff you want to read. this is called the server.
a program can run on any of these, giving you different approaches for solving a problem.

for you, this means:
a) you can use a JavaScript program that runs in the browser and just counts up a number, then tries to get the file with that number.
if the connection is dropped or delayed, you will come out-of-sync and canīt get the right pictures anymore nor can you re-sync.
b) you can use a php / perl / ... program running on the server. you always request for instance "www.yourdomain.com/image.jpg", but the program running on the server will catch this request and deliver the image with the highest number instead. this cannot get out-of-sync as a program running on the server can actually determine the image with the highes number.

if you can get php to run on apache (read the php manual, chapter installation. itīs easy once you found this.), you would do this for example:
PHP Code:
 $j=0;
for (
$i=0;$i<100000;$i++) {
  if (
file_exists('image'.$i.'.jpg')) $j=$i;
}
header("Content-type: image/jpeg");
readfile("image".$j.".jpg"); 

do you understand what this program would do?

remarks:
Additionally you would need some headers to convince the browser that it really should reload the image from the page even though the url is already in itīs cache. If you understand what i want to say, iīll look up these headers tomorrow, but right now i am too lazy

Reply With Quote
  #8  
Old January 30th, 2003, 03:03 PM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
alright...i think we're starting to click here

i DO have php installed and configured with apache...i was originally working on some pages that were going to be php based and using sql till i realized that it was way over my head.

i know a guy here that knows php fairly well...i will see if he can help me out with the php coding (after i try what you listed).

i will get back with ya and let you know if it worked.

i appreciate your patience with a n00b


Reply With Quote
  #9  
Old January 30th, 2003, 03:09 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
I asked a moderator to move this thread to "beginners" as it doesnīt fit here at all. If you canīt find it here anymore, look there.
Shiju, maybe you can even make this "sticky"?

Reply With Quote
  #10  
Old January 30th, 2003, 03:35 PM
DgNmurderINC DgNmurderINC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 6 DgNmurderINC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yeah...this IS a beginners type post...and it really has nothing to do with java anymore

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > sequential images on website


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway