IBM developerWorks
           Project Help Wanted
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherProject Help Wanted

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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 30th, 2002, 11:12 PM
Xoltaric Xoltaric is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Xoltaric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
An easy one...

Ok... I'm sure the answer to my question is very simple... but I'm a web designer .. not a developer.. I just sort of fell into this whole web business in the first place.

Here's what I want to do...

Create a web site that tracks a virtual stock market, with market data (ie share price) updated by individual registered users on the web. This information is compiled in a database and individual entries can be called by any page on the internet (for example, I want to let everyone know how my virtual company is doing on my geocities Web site.)

Updates can be made on my site but ideally (I'd be as happy as pie) any registered user would be able to update their company on any page that links to the database (ie, a geocities site)... but the site would automatically know who it is and update the proper company.

Unfortunately I don't know too much about scripting technologies ... what I'd really want is someone to point me in the right direction... what would the best place for me to start? php? jsp?

Any help would be great...

Reply With Quote
  #2  
Old September 1st, 2002, 02:47 AM
cirox cirox is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 6 cirox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to cirox
<-- its thata way chief!

Ok seriously.
PHP would be great IF you were on an apache server... but services like Geocities just won't cut it. You should look into geting your own server, and running something like the ever-common Apache 1.3/PHP4/MySQL combo.

For your virtual companies, you could set up a database with a table called "company" and have it store all these variables for you "open_price", "close_price", "change", "date" or something like that. Then you have some options - A) use .htaccess for user-authentication, or B) make a table in your database that can store the user info. B is far simpler, but for that same reason, far more insecure than using http-sessions and .htaccess.

Hope that gives you a starting point.
Any more questions (or if you need a site to host this project off of) email me cirox@stealthx.com. I'de be glad to help.

Reply With Quote
  #3  
Old September 10th, 2002, 07:23 PM
Xoltaric Xoltaric is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Xoltaric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the info...

I know databases and that side of it.. but what I can't figure out is how to get information in my database on my server displayed on your website.

I'm really sorry if I'm not explaining this clearly.

Here's an example of the kind of thing I'm looking for. www.tag-board.com offers a chat-like function that anyone can add to their website.. it can be used on free hosts because (it seems to me) all the work is done on the tag-board site.

Can I just have them call a javascript file on my server and have that file return results from the database?

Reply With Quote
  #4  
Old September 10th, 2002, 07:39 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
You need:
1. a server (http://www.apache.org/).
2. a server side language (http://www.php.net/).
3. a website.. (you provide).

You need to learn:
1. the server
2. the language
3. basic CGI programming concepts (Hero Zzyyxx posts a link to a very good online tutorial from time to time in people's posts, especially in the perl forum. Search the forums for cgi tutorial to find it).

Javascript is generally client-side. You use server side languages like perl or PHP to database work.

Reply With Quote
  #5  
Old September 10th, 2002, 08:15 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
And here it is!

Your clown scares me. . .

Reply With Quote
  #6  
Old September 10th, 2002, 08:21 PM
Xoltaric Xoltaric is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Xoltaric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the info..

"rtfm" lol..

Everything I've read through so far on PHP is all about what gets displayed on my site...

Surely someone on geocities can't just query the database on my server? Can they? This is the part I haven't found any information on at all. Maybe I just have a mental roadblock or something... that's why I called this thread "An easy one.."

If the information was being displayed only on my site I wouldn't have any problem at all as the rest of it is QED.

Reply With Quote
  #7  
Old September 10th, 2002, 10:01 PM
Hartmann's Avatar
Hartmann Hartmann is offline
chown python:users\ /world
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Texas Tech
Posts: 95 Hartmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
No because you can't use PHP/MySQL on GeoCities.... There are no server side technologies allowed at Geocities.
__________________
Hartmann
badice.com

Reply With Quote
  #8  
Old September 10th, 2002, 10:34 PM
Xoltaric Xoltaric is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Xoltaric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That's what I figured..

So how can it be done?

I've really appreciated everybody's input on this... and thanks to Hero Zzyzzx for the tutorial link... it'll help the authentication bit quite a bit.

Reply With Quote
  #9  
Old September 11th, 2002, 12:12 AM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
I don't understand what you're trying to do I guess. You just want to set up a website that uses a database, right? Nothing special, just put up a website on a server that uses a database on the same server, right?

Hero.. you don't like my clown? Don't make my clown come over there....!

Reply With Quote
  #10  
Old September 11th, 2002, 01:49 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
You CAN do it with javascript, actually. Well, sorta. When you include an external javascript file in your page, it doesn't have to be a .js file. I know this because I've successfully included a jsp file that dynamically creates the paths for several image swaps. Whatever file you point the src attribute of the script tag at just has to return valid javascript.

So, like everyone else has been saying (and it sounds like you already know), knock yourself out with php/perl/jsp/asp/zope/c/c++/python/insert-custom-language-here , but create your page so that it returns javascript rather than html.

Reply With Quote
  #11  
Old September 11th, 2002, 05:10 PM
Pasiphae1213's Avatar
Pasiphae1213 Pasiphae1213 is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: Pennsylvania
Posts: 171 Pasiphae1213 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Pasiphae1213 Send a message via Yahoo to Pasiphae1213
Querying from Geocities

Hmmm, correct me if I am wrong, but can't you connect to a mySQL server by IP address with the Java language? Thus, would a java applet be able to query the database and display the results? Then any webpage that wants to display this information just downloads and inserts the applet into their page.

I am only a beginner in Java, but in my head, it sounds like this should work.

Reply With Quote
  #12  
Old September 11th, 2002, 06:19 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Ermmm.. there's a whole lot of unnecessary kludging going on here. You just need to select a web hosting service that lets you use server side scripting technologies such as perl, php, etc. and also offers database access. That's it. Honestly, I hate to say it but if your site is going to sit on Geocities or some other "free webpage" service, you're pretty much SOL on dynamic content, database or otherwise...

Reply With Quote
  #13  
Old September 11th, 2002, 07:52 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Ctb, you're missing the problem. Xoltaric's cool with that backend stuff, it's getting content generated by server A (php/mysql) to display on server B (geocities/etc.), that's the problem.

Reply With Quote
  #14  
Old September 11th, 2002, 08:47 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
Create your pages in whatever language you wish on a server that supports whatever server-side scripting language you wish.

Using cron jobs, create static files that your write out to the file system, perhaps named with the username of those in your system.

Then figure out how to deliver these pages to your users on crappy hosting services like GeoCities- the most likely culprit would be to use iframes, which they would just put into their static pages. These iframes would load the content from your site. Look into iframes, if you haven't already, they are pretty easy.

Aside from getting their FTP info, you're going to have to host the mini-pages on your own site if they don't use a host that supports web scripting languages.

Netscape 4 apparently doesn't support iframe. . . TOo many eyes. . .<twitch>

Last edited by Hero Zzyzzx : September 11th, 2002 at 08:51 PM.

Reply With Quote
  #15  
Old September 12th, 2002, 07:19 PM
Xoltaric Xoltaric is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Xoltaric User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks bricker for helping to clarify!

But Hero... I think you are my hero.. That'll totally work.

Actually couldn't I just use iframes to call the script, which would return html? I can pass the username through the src like this:

<iframe src="http://www.myserver.com/my.script?name=username" width="125" height="250"></iframe>

If so, that's EXACTLY what I'm trying to do.

See, I told you it was easy...

*runs away to avoid sharp projectiles*

Reply With Quote
Reply

Viewing: Dev Shed Forums