The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Other
> Project Help Wanted
|
An easy one...
Discuss An easy one... in the Project Help Wanted forum on Dev Shed. An easy one... Project Help Wanted forum provides a meeting place for people interested in working on a project or projects “off-site.” Find your next programming partners here.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 30th, 2002, 11:12 PM
|
|
Junior Member
|
|
Join Date: Aug 2002
Posts: 6
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...
|

September 1st, 2002, 02:47 AM
|
|
Junior Member
|
|
Join Date: Sep 2002
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
<-- 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.
|

September 10th, 2002, 07:23 PM
|
|
Junior Member
|
|
Join Date: Aug 2002
Posts: 6
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?
|

September 10th, 2002, 07:39 PM
|
 |
An Ominous Coward
|
|
|
|
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.
|

September 10th, 2002, 08:15 PM
|
 |
11
|
|
Join Date: Jul 2001
Location: Lynn, MA
|
|
And here it is!
Your clown scares me. . .
|

September 10th, 2002, 08:21 PM
|
|
Junior Member
|
|
Join Date: Aug 2002
Posts: 6
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.
|

September 10th, 2002, 10:01 PM
|
 |
chown python:users\ /world
|
|
Join Date: Jul 2000
Location: Texas Tech
Posts: 95
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
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
|
|
Junior Member
|
|
Join Date: Aug 2002
Posts: 6
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.
|

September 11th, 2002, 12:12 AM
|
 |
An Ominous Coward
|
|
|
|
|
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
|
|
Moderator =(8^(|)
|
|
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710
Time spent in forums: 20 m 38 sec
Reputation Power: 13
|
|
|
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.
|

September 11th, 2002, 05:10 PM
|
 |
Web Developer
|
|
Join Date: Oct 2001
Location: Pennsylvania
Posts: 171
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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
|
 |
An Ominous Coward
|
|
|
|
|
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
|
|
Moderator =(8^(|)
|
|
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710
Time spent in forums: 20 m 38 sec
Reputation Power: 13
|
|
|
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
|
 |
11
|
|
Join Date: Jul 2001
Location: Lynn, MA
|
|
|
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
|
|
Junior Member
|
|
Join Date: Aug 2002
Posts: 6
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*
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|