August 30th, 2002, 11:12 PM
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...
September 1st, 2002, 02:47 AM
<-- its thata way chief!
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 email@example.com. I'de be glad to help.
September 10th, 2002, 07:23 PM
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.
September 10th, 2002, 07:39 PM
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).
September 10th, 2002, 08:15 PM
And here it is!
Your clown scares me. . .
September 10th, 2002, 08:21 PM
Thanks for the info..
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.
September 10th, 2002, 10:01 PM
No because you can't use PHP/MySQL on GeoCities.... There are no server side technologies allowed at Geocities.
September 10th, 2002, 10:34 PM
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.
September 11th, 2002, 12:12 AM
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....!
September 11th, 2002, 01:49 AM
September 11th, 2002, 05:10 PM
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.
September 11th, 2002, 06:19 PM
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...
September 11th, 2002, 07:52 PM
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.
September 11th, 2002, 08:47 PM
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.
September 12th, 2002, 07:19 PM
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*