Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




How Can One Get Real Time Stock Quotes For An Online-community?


For one of our web-communities we plan an offer of real time stock
quotes incl. advanced notification services. I have the following
questions:

- Do you know of any services, that already offers such services in a
decent way?

And more important:
- Does anybody know a provider of such services, that offers a
real-time stock quote data stream for such a usage at a decent price? I
only know of Deutsche Börse offering it for 1駨 Euro per month. That
is too expensive for us.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Online Friendship Community
We need to create an online frindship community for a specific region. Is there any GOOD script for creating a friendship community?

How To Get Italian Stock Quotes
anyone knows if there is a service that provides italian stock quotes? (better if free )
what i need is MIBTEL, MIB30 and NUMTEL.

Need Quotes From The London Stock Exchange (LSE)?
How do you get quotes from the London Stock Exchange (LSE)
using PHP?

Problems With Php Date/time - Real Time Clock
On my website i would like to have a real time clock....i mean to show seconds
running one after another...how can i do this?

Another problem is how to get time into a variable (which then i will insert
into a database table)?

Real-time Output?
I'm a relative PHP newbie, so I apologize if this is a simple question.

Anyway, here's my problem. I'm using a PHP script to pre-render a bunchload of insert files for an HTML page. Right now there's about 1,600, but that number could get much, much higher when the site goes live.

I'll only need to re-render the whole batch once or twice a year (if that) but it's still something I'd like to be able to do in case I have to move the site to a different server, or there's a hard drive crash or etc.

Basically what the script does is grab a whole bunch of information from a database and write the insert file. It does this for every single one.

The problem of course, is that PHP by default does all this server-side, and then sends it to the browser. Because this process takes like ten or twenty minutes to do, the browser times out long before it's finished.

Is there a way to get progressive output with PHP? Or do I need to re-do this in another language like Perl?

Real Time Chat
There's anyone out there that can give me a light on real time chat using sockets. I've seen some using push technics but they all hang up after an elapsed amount of time.

Real Time Echo'ing Of Var In A Loop
i have a big loop, and rather then waiting until its done for me too see what happened, every time it runs, how can i get the browser to echo the result, and proceed to keep running the loop.

basically this loop takes a long time to finish, and i had to set my max runtime past 30 seconds. i guess incorporating a refresh of some sort like this would eliminate the need for the time extension too?

Read Data From MS Access Into MySQL In Real-time
I am currently working on a project that involves reading information from a inventory system into Access via ODBC and display the info on the web site using MySQL.

I would like to create a live link between the MS Access(local) and MySQL (remote) whenever the inventory system is updated MySQL will be updated as well.

I know that MyODBC will let me do the opposite of what I would like to accomplish by reading data in MySQL into Access. Is it possible to do the reverse way.

User Online Time
I was searching trough internet and didn't find anything useful ..

I want to do user online time counter... Like this one on phpFreaks.

Total time logged in: 180 hours and 15 minutes.

Online Merchant Gateway / Php... First Time Help
For the first time, I'd like to learn how to integrate automated payment processing through a gateway online.

I'd like to do it all myself, for the following reasons-

I've already built a custom shopping cart that is heavily SEO modified, includes tracking statistics, etc. So far, I've just had it store the CC and billing information in the mySQL database, where it was processed by hand at a POS terminal later.

What am I looking for?

Good tutorials on how to integrate your current site with Verisign, or other easy options.

Time Online User System
I'm building something special but dont really know whats the best way to start this
i want to messure time online from users that signup for it So i can make a toplist of the best visitors that where online and active But how do i messure time and how do i abort it when they are not active for a <? while ?>?

Track Users Online Time
I need to track the time online of my users on a site. Just like on here where you can see how many days/hours/minutes you have been logged in. I'm a little stuck on how to start. I've done some searches for this sort of thing but I haven't come up with anything decent. Any ideas or places that you can point me to?

Regresive Time Counter In PHP For An Online Trivia
I need to make an online trivia, and send the results via email with the date, time and time that took the user to answer the trivia questions.

The send results via email I already know how to do it, but how can I stamp the time and date of the day, in the email I'll receive and also, how can I display a regresive counter in the web form, and when the user clicks on the send button, include in the same email, the time spent by the user, in answering the trivia questions.

Converting TIMESTAMP Fields Into "real Time"?
Is there a code for converting a db field that is TIMESTAMP into "real time"?
Meaning if the field is 2007-03-21 10:51:28have is output: "10:51 am",
Or: 2007-03-21 13:51:28output: "1:51pm"?

A Real Challenge For Real PHP Programmers
<?php
/*
A challenge to every PHP programmer.The one who's gonna solve this
problem would be deemed as

PSP(PHP Supreme Programmer).The problem is this : You have to write a
script that displays a list of

categories and subcategorieslike this one:

<select name="category">
<option value="1">Main</option>
<option value="2">Main > Computers</option>
<option value="4">Main > Computers > Hardware </option>
<option value="8">Main > Computers > Hardware > PC</option>
<option value="7">Main > Computers > Hardware > Mac</option>
<option value="9">Main > Computers > Hardware > Atari</option>
<option value="11">Main > Computers > Hardware > PC > History of
Pc</option>
<option value="">etc...</option>
</select>

The categories and subcategories details are stored in these two
tables in a MySQL database.
-categories : the categories names and ids.
-cat_relations : the relations between categories.It shows which
subcategory belongs to which category.
The belongings between categories can go very deep and the number of
categories is unlimited. This script will create the two tables and
fill them with sample data. All you need to do is to change the four
variables below. You can send the script back to this email :
yasbergy@yahoo.com.
*/

//Here starts the script. Please change the values of these variables
to fit your settings
$user = "prospective_PSP";
$database = "db";
$server = "localhost" ;
$pwd = "" ;
//Connection to the database that you created
mysql_connect($server,$user,$pwd) ;
mysql_select_db($database);
//Creation of the two tables : categories and cat_relations
$categories = " CREATE TABLE `categories` (`id` INT not null
AUTO_INCREMENT, `name` VARCHAR(100) not null , PRIMARY KEY (`id`),
INDEX (`id`), UNIQUE (`id`)) comment = 'The categories details' ";
mysql_query($categories) ;
$cat_relations = "CREATE TABLE `cat_relations` (`id` INT not null
AUTO_INCREMENT, `daughter_id` INT not null, `mother_id` INT not null ,
PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'Which
category is the daughter of which category'";
mysql_query($cat_relations) ;

//Filling the two tables with sample data
$cats = array('Main','Computers','Countries','Hardware','S oftware','Programming
languages','Mac','PC','Atari','Winamp','History of the
PC','IBM','Components','High
level','USA','NYC','LA','Manhattan','India','Winzi p');
for ($i=0;$i<count($cats);$i++){
$sql = mysql_query("insert into categories (name)
values('".$cats[$i]."')");
}
mysql_query("insert into cat_relations (daughter_id,mother_id) values
(2,1),(3,1),(4,2),(5,2),(6,2),(7,4),(8,4),(9,4),(1 1,8),(12,8),(13,8),(10,5),(20,5),(14,6),(15,3),(16

,15),(17,15),(18,16),(19,3)");
//Now you can have a look on them through phpMyAdmin
?>

Community Plumbing
What is the best community-plumbing open-source platform in your opinion? Also, does anyone have any example outdoor related websites that use this platform that I could check out?

Community Calendar Code/source?
I would like to find a community calendar source for our 4H group to
use. I would like to to show the days of the month in a typical calendar
method and then have access for an administrative user to add events on
date/time with a title/description. If possible, an XML data file for
the dates or MS Access one....

Escaping Single Quotes, Double Quotes, And Semicolons With STR_REPLACE()
i have this error code unexpected T STRING on this line:

str_replace(addslashes('onmouseover="showImg('name', 'tabla_novedades2', 's_asc.png', 'img1');"'), addslashes('onmouseover="showImg('name', 'tabla_novedades2', 's_desc.png', 'img1');"'), $td_name);

i tried escaping slashes with the addslashes function but obviously this did not work
there is a ";" in the string so i know that is causing the error

I am replacing this string:
'onmouseover="showImg('name', 'tabla_novedades2', 's_asc.png', 'img1');"

with this string:
'onmouseover="showImg('name', 'tabla_novedades2', 's_desc.png', 'img1');"

how do I do this with no errors with the str_replace function??

Stripping Double Quotes And Replacing With Single Quotes
I have a problem I had trouble finding any existing threads on in the forum.

I have tried learning more about str_replace() but have had trouble with implimentation.

Here is what is happening. I am adding text to a variable called $content that looks like this:

Hi everyone. This is text I made up. I think it was Larry that said, "Love is a battlefield". But I think it was Benitar.

Now I want to replace those " " in there with ' ' (single quotes.)

Practical Reason For Single Quotes Vs Double Quotes
I've always wondered why - or even if there's a difference - for using double quotes vs single quotes in php.

My code typically ends up with a mish-mash of both - sometimes I'll use:

$tomorMonth = date('n', $tomorrow); on one line, and then,
$arrMonth = $_POST['arrive_month']; on another line (or lines)

Both seem to work okay - I don't seem to be throwing any errors - but my question here lies in the interest of getting the "best practices" usage straight so I can start implementing single or doubles as appropriate.

So... when SHOULD someone use singles over doubles ... or does it make any difference to php at all?

Single Quotes And Double Quotes Showing As ? On Web Page
I have an issue with quotes showing as question marks on my webpage. I am sure its a UTF-8 related issue, but some of the facts surrounding the issue confuse me. The database is MySQL and stores the text as UTF-8. The PHP script simply takes the data from the database to a string: $desc = $info['description'];

And the text itself, is in a HTML string in the database as:

<P class=MsoNormal style=MARGIN: 0in 0in 0pt>The Golfers will enjoy their favorite sport on the Golf course only 5 min drive from “The Vineyards”.</P>

I am pretty sure that the original source was MS Word, and that the double quotes, in this example, are the special quotes from Word and not the ASCII quotes. When the webpage displays, it displays with the Unicode encoding. So, database is UTF-8, assignment in PHP is simple assignment without any form of stripping, tag removal etc.  And encoding on webpage is Unicode.  So can anyone suggest why they arent being displayed?

In the above example, the latter part of the text shows as ?The Vineyards?
It seems to apply to double quotes for sure, but also to some single quotes, as I have other text that displays as it?s instead of it's.

Need A Stock Ticker Script
I can find lots of scripts for getting information on stock symbols, but does anyone know where I can pull the actual stock market volumes from? Like on http://quote.yahoo.com at the top they got the change in the markets and that right above they're add banner. That's what I want. Anyone know where I can pull this from on someone's backend such as an xml file or INC or TXT or whatever?

Creating The Stock Exchange
How would you go about creating a Simulation Stock Exchange? I basicly just want, a few companies(made up), and they all have a starting rate of $2.00 , and some how code it so it increases or decreases at a maximum of $2 difference, and is updated say every 10 minutes. and would you need a database for this to work?

Partial Ot ... Stock Market Feed
I'm looking to add a page to my site where I can get stock quotes for the
wired, but more importantly, the wireless web(ie my cell phone). I know how
write the needed php and WAP application, I just don't know where to get the
stock market feed, at least not without parsing a finance.yahoo.com page.
Or something else like it that could change at any time. I'm looking for
just the raw data feed. Anyone ever had to do this and can give me some
info on a feed?


Accessing Sage Stock Information
i have a php site, sat on a mysql database works fine, but we want to integrate stock information which is already stored in a sage database on the clients server. He is using sageline 50, V.12, yet we dont have a clue what to do, does sageline sit on an mssql database for example?

How can this be accessed via php? is there any software titles we have to install on the server to make the sageline database available over the net? (the site is stored off-site on a server farm and would need to access the sage database remotely, eg; install a webserver on the sage server so it could be accessed remotely etc?

my main problem here is lack of knowledge in terms of how sage stores data.

Double Quotes & Single Quotes
I have a web page with four input boxes. If a user types in text with either single or double quotes the insert fails.

I have looked into solutions and there seems to be some disagreement on the best method.

Some people say turn on magic quotes while others say not to, or use addslashes and stripslashes and again some say not to.

What about an mssql version of mysql_real_escape_string and mysql_escape_string??

What is the correct method? How do I overcome?

Single Quotes, Double Quotes And "undefined Index"
I am trying to write clean code but keep having trouble deciding
when to quote an array index and when not to.

sometimes when I quote an array index inside of double quotes I
get an error about enased whitespace (to my best memory)

AT other times I get an undefined index notice as below:

Notice: Undefined index: last_reminder_id in...

the 2nd line (which wraps to the 3rd in this posting
is the one listed in the error message:

$sql = "SELECT * from notes
where recall_date &#390;' and recall_date <= '$now' and id >
'$_SESSION[last_reminder_id]'";

what is the correct syntax and/or can anyone point me at a
reference that will explain this ?

Real Ip Behind A Proxy
is there any way to know the real ip, for people behind a proxy?

Getting The REAL Directory?
Is there any way to get the directory/path of the file running the script, not the directory you're inside (Via dir())? I'm allowing the user to navigate through directories, and that part works great - but whenever I attempt to used getcwd(), it returns the directory the user is in - not the directory of the php file - is there any way to get the directory of the .php file the user is using?

Real Length Of Arrays
Sometimes, I want to know how many elements are really in an array (php3).

The count() and sizeof() functions apparently return the number of non-empty array elements, and if you do a while loop checking for empty will stop on the first empty element.

I have been using the following function:
function truecount($theArray) {
if (is_array($theArray)) {
end($theArray);
return key($theArray);
}
}
but if the key is non-numeric, won't that trip me up?
Anyone have a better solution?

Md5 / Sha1 - Any Real Difference?
I use md5 hash with some of my cookies and occassionally a hidden form
field - I know the physical data on my network is insecure (unless being
served via https) but I was wondering if there are any advantages to using
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The
technical webpage on sha1 is lengthy and for the most part over my head...
and other than today, I've never heard of it before... I was wondering if
anyone could offer any comments on it...

Htmlspecialchars/real Escape
I'm creating a BBCode parser, and everything's working but one thing; I need code tags, but I will need to real_escape/htmlspecialchars the post to make sure it isn't malicious. The only problem is if I real_escape with code tags that contain php, the php will be removed. If I specialchars the post with php, I can't have syntax highlighting (or, not easily). How do I get round this?

Real IP Address From Behind Proxy Or NAT
How to get the real IP address of a user, not that of their proxy server or the external NAT address. I was quite sure that this wasn't possible without some kind of process getting the address on the client machine.

I have suggested that these sites could be using Java to get the real IP address, however, I could be wrong and for me the script that I found always returns 127.0.0.1 . This suggests to me that any script attempting to obtain the hosts real IP address infarct rely s on the HTTP-X-FORWARDED-FOR header sent by the proxy server...

Real Audio Download Limiter
i'm running a site with .ra and .ram files, when some visitor download or stream all these files at the same time it causes an huge bandwidth consumption.

so i'd like to limit the download per each IP to a certain number of .ra and .ram files at time.

i wonder if i can use some php script with cookies session but i'm new to this and i don't know where to start.

PHP Template Redirecting To Real Video
I've developed a RealVideo content management system w/ PHP and MySQL. On the back end is a form that sends a Real Video file (.rm) and writes the filename to a database. On the front end is a PHP template that pulls the filename from the database and outputs a string that is read in by a Flash movie. The Flash movie reads in the file location and places HTML-encoded text inside a text field that says "Launch Video."

All works fine -- the Flash movie launches the Real Video file, and the file plays correctly. There's only one problem: the Real Video doesn't stream.

In order for a Real Server to stream a Real Video file, a "stub" file with the extension .ram needs to be placed in the root directory. The only content in these .ram files is a URL pointing to the actual .rm file, and it's written in this format: pnm://ra.domainName.com/realvideoFile.rm

My problem: The form is sending a Real Video file and the receiving page is copying it to the server as well as inserting a record into my database, but it can't write a .ram file to the root directory because to do so I'd have to adjust permissions accordingly (PHP is part of group Apache). That's unacceptable; I won't adjust permissions on the root directory. My solution was to create a redirector that acts as the stub file:
PHP Code:

Real World Singleton Class Example?
Anybody can show me real world singleton class example?
Something that works (is implemented) as part of working solution.
Does it make sense to create database handler class that way?

Is Gmail Homepage Real Ajax?
I saw gmail's storage size on mail.google.com. It was counting size like "Over 2728.845439 megabytes". then increasing... but my dialup connection disconnected I don't understand howto count storage size, when my pc disconnected internet. is it real 2728.845439 MB? or only text?

Stripping Commas From Real Numbers
I have an HTML form in a PHP script which queries the user for a dollar amount of sales.
If a user enters "1,000,000" rather than "1000000" for 1 million, PHP (or MySQL?) treats the commas as a decimal and "1" is entered in the database.

A simple work-around is to simply advise the user "Please enter numbers only, no commas or $'s" but this seems awkward. Is there a built in function or another easy way to have commas and currency signs stripped out of form-entered data?

Can Curl Pretend As Real Browser?
Is curl can pretend to real browser when it get content and how set the browser that it pretend to?

Exploding At Real Breaks Not Wraps
I am working on reading my  pop3 email , and I am trying to return the header data using the function, I get this fine. The question I have is since there is no consistency to the rows, I want to take each row of data, not a wrap of a long line, any idea beyond checking if it has a : in it???

How Convert Http:// Text To Real Hyperlink?
I have some texts in MySQL databases. When I show this texts in webpages using PHP, I need to convert every ocurrence of

http://blablabla.com

to

<a href='http://blablabla.com'>http://blablabla.com</a>

, so my text will really became 'active'. The people who wrote the texts don't know HTML tags so I can't ask them to write explicity <a...> </a> commands. The problem is the same with text that contains the @ charactere, as

name@mailserver.com

. I have to change this to

<a href='mailto:name@mailserver.com'>name@mailserver.com</a>.

Please, I don't know how to use regular expression. I think It can make this replacemments very easy..

Checking If Email Address Is Live And Real?
There's all kinds of ways to validate an email address to make sure
it's well formed and whatnot, but what about checking to see if it's a
valid e-mail account?
Like how you can use checkdnsrr() to check to see if a URL is valid.

I know finger used to be used at one time, no? But server block finger
requests, and I'm not sure many e-mail accounts out there are even
fingerable type accounts anyway.

MySQL Result To Real Array In Function
I'd like to create a function which input is the result of a mySQL
query.
The output should be exactly the same, only not a mySQL result array,
but a 'real' array.
So it should also get the fieldnames returned by mySQL and use those as
keys.

I can't get things to work properly: it should return a
multidimensional array,
like

$result_array[1] = array(
[field1] => field1 value,
[field2] => field2 value,
etc.
)

somehow my result is (with code below)

$result_array[1] = array(
[0] => field1 value,
[field1] => field1 value,
[1] => field2 value,
[field2] => field2 value,
etc.
)

+++++ code ++++++

$get_res= mysql_query(QUERY);

if( $res = mysql_fetch_array( $get_res ) )
{

do{

$result[] = $res;

}while( $res = mysql_fetch_array( $get_res ) );

};

foreach( $result as $key => $value ){

print_r($value);

};

Real Good Content Management System ?
I'm getting somewhat annoyed about how many cms's
there are in PHP/MySQL while so few are really good.
Yesterday I started to like ezPublish, until I decided
the template language is ugly and the process for creating
a maintenance template for a content class is not logical.

I'm starting to think I should write my own cms, but that
will increase the leadtime for my site enormously.
So I would like to know from you if you know a cms that ..

- Is free and open source
- Is PHP/MySQL based ( usable with just about any host )
- Doesn't enforce site/navigation structure
- Has a WYSIWYG editor or one can easily be plugged in
- Has a forum module
- Is also an application framework with good
separation of content, code and layout.
- Does not have its own insane template language
- Supports a moderation process for content
- Has an intuitive process for creating maintenance forms
for posting and maintaining content.

I think Zope comes close, but that's Python :-(

Real Audio Http Streaming Without .ram File
I wanted a way to (http) stream Real Audio files without the need to use
..ram files. In case there are others interested in this, the following is
the solution that worked for me:

<?php
Header("Content-Type: audio/x-pn-realaudio");
echo "http://www.domain.com/audiofolder/track1.rm";
?>

Dynamically Genetrate RAM (Real Media) Text Files
I am working on a record company's site.  They offer a selection of track snippets for stream/download. I would like to be able to dynamically generate the RAM (text File) to save manual input in the DB. 

Currently each RAM file has to be uploaded everytime a new track is added....but I'd like to have this created on the fly when a user is browsing the site.

user selects track...is forwarded to the dynamically generated RAM file...which in turn selects the appropriate media.

I can't think how i'd get this to work as I am trying to create a text file that is parsed rather than a peice of HTML that is read by a user.  Perhaps on the server I'd have to add PHP Parsing to the RAM mime type?

Deduct Date/time From Daste/time To Display Hours/days Difference
what i'm wanting to do is take away date logged from date closed therefore leaving the time between the 2 date/time stamps so that i can work out the average time later on and display as average time: 1day 2hours .

Adjusting Time Displays For User's Local Time
I have a news/comment site where stories and comments are accompanied by the date they were posted. Currently I'm doing that in the GMT format, simply because it's easiest.

What I'd like to do, however, is have the page display posts and comments with "your time," i.e., the local time of the user (example of what I'm talking about here).

I know how to get local time variables from a user with javascript, but I'm not sure how to pass that information to PHP, especially since I'd like to do this on the front page, which means no passing javascript information via query strings.

Determining If Time Falls Into Time Frame
I am having problems determining whether the current time falls into a certain time frame. I want to be able to allow my users to set a start and end time of when they do not want to be disturbed.

for example: between 11pm and 3am every day. I would then store this as 23:00:00 and 03:00:00 in a table. If the times were on the same day then this code would work:
PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved