phpnovice 0 Newbie Poster

Post your code or

Try the following code.

<?php

$wave_file = generate_wavfile(); //This is the example one.
//Generate/Get wave file name without .wav extension format.

echo "<EMBED SRC=\"$wave_file.wav\" HIDDEN=\"TRUE\" AUTOSTART=\"TRUE\"></EMBED>";

?>

Hi PoA,

I tried and it worked.

Thank you very very much.

phpnovice :cheesy:

phpnovice 0 Newbie Poster

Post your code or

Try the following code.

<?php

$wave_file = generate_wavfile(); //This is the example one.
//Generate/Get wave file name without .wav extension format.

echo "<EMBED SRC=\"$wave_file.wav\" HIDDEN=\"TRUE\" AUTOSTART=\"TRUE\"></EMBED>";

?>

Hi PoA,

Thank you very much. I will try it this evening and let you know.

phpnovice :lol:

phpnovice 0 Newbie Poster

You can embed html code in php.

Example,
<EMBED SRC="yourfile.wav" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED>

Hope it helps.

Hi PoA,

Thanks for your help. I tried your code and it only worked outside php. I use dynamic .wav file name that is generated by php, it can not be used outside php.

I will appreciate it very much if you have further suggestion.


phpnovice :cry:

phpnovice 0 Newbie Poster

Greetings,

Would some experts show me php code to play a .wav file?

Thank you very much in advance.

phpnovice

phpnovice 0 Newbie Poster

You can look for a web service that has stock quotes and parse the XML. Try http://www.xmethods.net/

Hi,

Thanks. I will try it.

By the way flash is very cool! I wish I could do the same sometime.

phpnovice

phpnovice 0 Newbie Poster

One of these might help as well: http://www.hotscripts.com/cgi-bin/search.cgi?bool=AND&query=stocks&catid=all

Here you helped me again.

Thanks.

phpnovice

phpnovice 0 Newbie Poster

That would acctually make quite a nice bedtime read! So when you goto bed after a hard day coding, and are ready to unwind, you can have a nice thorough read! I have done similar before and have acctually dreamt about programming!

Nice, it must be very fancy if you display your programming dream on web. I can not because I can only spend a little time each day on this.

Thanks for your help.

pnpnovice

phpnovice 0 Newbie Poster

Also I find this handy if I want to completely block users from viewing the contents of a folder; just put deny from all in a .htaccess file to block all users! :) This is great for a folder that contains include files that are included by other scripts but are never seen directly :)

Hi Gary,

Thanks for your help. I tried .htaccess, but it did not work. Once I set it up, I could not access mysql. Any attempt was refused by mysql. I tried different php code, and none of them worked. Then I switched my apache server to abyss server. Now I can easily access mysql. The problem is that abyss appears not support .htaccess. It will be greatly appreciated if you would help me set this protection up.

Thank you very much.

phpnovice

phpnovice 0 Newbie Poster

Hi,

Thanks a lot for your reply. I will try your code sometime. But I guess the problem might come from Apache because it works fine now when I switched to Abyss.

It appears Apache has more protection than that Abyss does. So, I will switch back and test your code.

Do you have any thoughts on my reply? As my name, php novice, indicates, any reply will be helpful.

Thank you again.

phpnovice

<?php
mysql_connect("localhost", "username", "password");
?>

Change to:

<?php
$conn = mysql_connect("localhost", "username", "password");
          or die ("Couldn't connect to server.");
?>

YoungCoder

phpnovice 0 Newbie Poster

Hi,

I have apache, php, phpmyadmin, and mysql in my computer.

I could connect to mysql and manipulate database well before. But for an unknown reason, I can't do it now. Each time when I tried to do this, it gave an error message as "Can't create TCP/IP socket (10091)". My simplified php script is:

<?php
mysql_connect("localhost", "username", "password");
?>

I will really appreciate it if someone would help me.

Thanks a lot.

phpnovice :sad:

phpnovice 0 Newbie Poster

Hi,

Thanks for your help. I am not sure I will try if it violates something. But at least you gave me some knowledge.

phpnovice


I think there's a reason that those sites point you to Yahoo! As far as I know, nothing like that is available. However, since that data is just that, data, you could build a parser with extensive searching (a la preg_match) and simply steal Yahoo!'s information for everything. I've got a feeling it would violate Yahoo!'s terms of service, but if it's for personal or classroom use, I hardly assume they'd even notice anyone using a utility like that.

phpnovice 0 Newbie Poster

Thanks a lot. I am working on it.

phpnovice

Use .htaccess and .htpasswd to protect folders

Read more.
http://www.clockwatchers.com/htaccess_tool.html
http://web-bureau.com/modules/bsecure.php

Hope it helps.

phpnovice 0 Newbie Poster

Hi,

I built a homepage. Some folders/pages should be no-accessible to visitors. Could someone show me a simple php script to do this.

Thanks.

phpnovice :lol:

phpnovice 0 Newbie Poster

Greetings,

This is my first post in this group.

I am new to php script language. I am trying to use it get stock information and plot them in my way. A lot of examples showed to get stock quote in csv format from yahoo finance. In stead of quote, does anyone know the addresses to get other stock information, such as P/E, Key Statistics, etc from any public web site?

Thank you much.

phpnovice