Re: [PHP] Force-Saving an Audio File

2009-12-09 Thread cool


On Dec 9, 2009, at 12:27 AM, Gaurav Kumar wrote:


You can do two things-

1. Read the file by providing a base directory path of the server  
where the

file exist.
Something like- //htdocs/httpfolder/files/audio/yourfile.mp3
You can take this in a variable  //htdocs/httpfolder/files/audio/.

2. Try using file_get_contents.
Something like $file = file_get_contents('
http://www.example.com/audio/file.mp3', false, $context);

Hope this helps.


Thanks for your help Gaurav,

After a few tests based on your suggestions - I noticed why I think  
there was a problem:


this line:
elseif (! file_exists( $path ) )
worked locally but failed when the path was a http url:
$directory = http://mysite.com/test1/;;

so when I took out that elseif then readfile($path); did work

SO: Is there a php function that can work like file_exists( $path )
and tell if the file exists but work from a URL like:
$thisfile = http://mysite.com/test1/audio.mp3;;




Thanks,
c...@hosting4days.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating a Dynamic PHP/CSS Page (newbie design question)

2009-11-05 Thread cool

SORRY FOR THE EXTRA 2 BAD pre SENDS (accident...)


Thank for all the help!

Getting there... as a baby step - I'm trying this:

(part of this is from - http://sperling.com/examples/pcss/)

1 - I created this style sheet page called css.php with these contents:



.test1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #0099FF;
font-size: 18px;
}

?php
header(Content-type: text/css);
$color = green;// --- define the variable
echo CSS
/* --- start of css --- */
.title-text
{
color: $color;  /* --- use the variable */
font-weight: bold;
font-size: 1.2em;
text-align: left;
}
/* --- end of css --- */
CSS;
?

-

2 - I created this test page called testcss.php with these contents:

PROBLEM: the 'test1' style shows up - but the 'title-text' doesn't  
seem to work

btw: even added this : media=screen from demo 
How do I get it to show up?

==



!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN  
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleUntitled Document/title

link href=css.php rel=stylesheet type=text/css media=screen /
/head

body 
ptest span class=test1this/span/p

p class=title-textand this/p
/body
/html


===


Thanks,
c...@hosting4days.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Plotting a Line Graph

2009-10-16 Thread cool

(sorry about the long Subject line typo - resending)

I have a data file that stores about 500 numbers in a record - meant  
to plot a basic line graph (left to right). The numbers can be  
imported into a record with 500 fields or just stored in a text field  
- which ever is better.


The user might want to pick a few random records and plot them  
together - so the line graph may compare the few records together.


It seems that the google charts work from a url - so 500 points would  
be way to long for any url - so I guess that option is out.


Q: what is the best way to create / display line graphs in with PHP?

Thanks in advance for your help - dave




Thanks,
c...@hosting4days.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] XP + IIS + PHP - Error 405

2002-02-20 Thread Ice CooL

Anyone know why someone would get a 405 Resource not allowed error while 
trying to input to a PHP script from a form, using Windows XP, IIS 5 and PHP 
1.1.1 (CGI Ver.)

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php