[PHP] Re: Need Reply About BBS

2003-04-03 Thread Daniel Leighton
Below is a link to a list of PHP-based discussion boards.  I'm sure they'll be plenty 
with the features you are looking for.  After looking at several, I decided to go with 
Invision Power Board which seems to be quite good so far.

http://www.hotscripts.com/PHP/Scripts_and_Programs/Discussion_Boards/

At 10:30 PM -0500 on 4/3/03, blade xtreme wrote:


>I need help finding PHP bullitin board similar to:
>
>http://www.hardknox.com/discus/messages/1491/1491.html?1049330252
>
>This one is cgi and I would like to have the same thing in php.
>
>Thanks
>Blade
>
>
>
>
>
>_
>MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
>http://join.msn.com/?page=features/virus
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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



[PHP] RE: Mac IE File download problem - any solutions?

2003-03-26 Thread Daniel Leighton
Hi Phillip,

If you see the original message it's already in there (it was snipped out in the 
replies).  Here is the code:

header('Content-Type: application/octet-stream');
header('Content-Length: '. filesize($file_info['full_file_path']));
header('Content-Disposition: attachment; filename="' .
   $file_info['filename'] . '"');
header('Connection: close');

readfile($file_info['full_file_path']);

Any other ideas?  Thanks for your help.

Daniel


At 10:09 AM -0800 on 3/26/03, Philip Hallstrom wrote:


>You might try...
>
>header("Content-Disposition: attachment; filename=$filename");
>
>maybe?
>
>On Tue, 25 Mar 2003, Daniel Leighton wrote:
>
>> Actually, I think you may have misunderstood.  On Mozilla (Mac), Netscape (Mac) and 
>> Safari the script works exactly as I have intended: sending the "Content-Type: 
>> application/octet-stream" header causes the file to download; sending the 
>> "Content-Type: video/quicktime" causes the file to be played within the browser.  
>> On IE (Mac OS X), some files with the .mov extension download when the 
>> "Content-Type: application/octet-stream" header is sent, while others play 
>> in-browser, while all play in-browser, as they should.
>>
>> From what I understand, "Content-Type: application/octet-stream" header should 
>> ALWAYS cause a download.  This is not an issue of post-processing (the settings in 
>> the browser which tell it to open a file in a certain application AFTER the file 
>> has been downloaded - that is not a problem).  BTW, even if I change my preferences 
>> in IE to save .mov files to disk, they still play in-browser.
>>
>> After re-compiling PHP with mime-magic enabled, the mime_content_type() function is 
>> returning "video/quicktime" for the file which does not download and "text/plain" 
>> for the one which does (even though the "text/plain" file plays fine both 
>> in-browser and once it is downloaded).  In any case, that will be my next area of 
>> investigation.
>>
>> At 12:03 PM -0800 on 3/25/03, Jennifer Goodie wrote:
>>
>>
>> >This is not a MAC IE problem, it is the way browsers work.  If the MIME type
>> >is mapped to an application, the browser will launch the application.  IE
>> >does it inline, while Netscape tends to launch it separately.
>> >
>> >You can send false headers with a made up type and a missing file extension,
>> >but then the browser will not know what type of file it is and the save as
>> >is harder for the user as they have to put the right extension on.  It is a
>> >work around, but a really poor one.
>> >
>> >header("Content-disposition: filename=$filenamewithoutextension");
>> >header("Content-type:reallyreallyreallybigcsv");
> > >
> > >
> > >
> > >
> > >-Original Message-
> > >From: Step Schwarz [mailto:[EMAIL PROTECTED]
> > >Sent: Tuesday, March 25, 2003 11:49 AM
> > >To: Daniel Leighton; [EMAIL PROTECTED]
>> >Subject: Re:  Mac IE File download problem - any solutions?
>> >
>> >
>> >[...]
>> >> The problem:  When downloading certain files on a Mac using IE 5.x, files
>> >are
>> >> displayed within a browser window instead of downloading.  This seems to
>> >occur
>> >> mostly with quicktime files (.mov, .mp3).  Some quicktime files work,
>> >while
>> >> others with the same extension do not.
>> >[...]
>> >
>> >Hi Daniel,
>> >
>> >I believe this is a browser setting, is it not?  Using the default setup of
>> >Explorer 5.2 for Mac, a clicked .mov file will play in IE.
>> >
>> >To change this behavior, go to Explorer > Preferences... > File Helpers,
>> >select QuickTime Movie and click Change... then switch Handling from "View
>> >with Browser" to "Save to File".
>> >
>> >I would be surprised if a file header could override this.. but if you find
>> >a way, please let us know!
>> >
>> >-Step
>> >
>> >
>> >
>> >--
>> >PHP General Mailing List (http://www.php.net/)
>> >To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> --
>>
>> Daniel Leighton
>> Chief Technology Officer
>> Webolution
>> http://www.webolution.com
>>
>>  This email may conta

RE: [PHP] Mac IE File download problem - any solutions?

2003-03-25 Thread Daniel Leighton
Actually, I think you may have misunderstood.  On Mozilla (Mac), Netscape (Mac) and 
Safari the script works exactly as I have intended: sending the "Content-Type: 
application/octet-stream" header causes the file to download; sending the 
"Content-Type: video/quicktime" causes the file to be played within the browser.  On 
IE (Mac OS X), some files with the .mov extension download when the "Content-Type: 
application/octet-stream" header is sent, while others play in-browser, while all play 
in-browser, as they should.

>From what I understand, "Content-Type: application/octet-stream" header should ALWAYS 
>cause a download.  This is not an issue of post-processing (the settings in the 
>browser which tell it to open a file in a certain application AFTER the file has been 
>downloaded - that is not a problem).  BTW, even if I change my preferences in IE to 
>save .mov files to disk, they still play in-browser.

After re-compiling PHP with mime-magic enabled, the mime_content_type() function is 
returning "video/quicktime" for the file which does not download and "text/plain" for 
the one which does (even though the "text/plain" file plays fine both in-browser and 
once it is downloaded).  In any case, that will be my next area of investigation.

At 12:03 PM -0800 on 3/25/03, Jennifer Goodie wrote:


>This is not a MAC IE problem, it is the way browsers work.  If the MIME type
>is mapped to an application, the browser will launch the application.  IE
>does it inline, while Netscape tends to launch it separately.
>
>You can send false headers with a made up type and a missing file extension,
>but then the browser will not know what type of file it is and the save as
>is harder for the user as they have to put the right extension on.  It is a
>work around, but a really poor one.
>
>header("Content-disposition: filename=$filenamewithoutextension");
>header("Content-type:reallyreallyreallybigcsv");
>
>
>
>
>-Original Message-
>From: Step Schwarz [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, March 25, 2003 11:49 AM
>To: Daniel Leighton; [EMAIL PROTECTED]
>Subject: Re: [PHP] Mac IE File download problem - any solutions?
>
>
>[...]
>> The problem:  When downloading certain files on a Mac using IE 5.x, files
>are
>> displayed within a browser window instead of downloading.  This seems to
>occur
>> mostly with quicktime files (.mov, .mp3).  Some quicktime files work,
>while
>> others with the same extension do not.
>[...]
>
>Hi Daniel,
>
>I believe this is a browser setting, is it not?  Using the default setup of
>Explorer 5.2 for Mac, a clicked .mov file will play in IE.
>
>To change this behavior, go to Explorer > Preferences... > File Helpers,
>select QuickTime Movie and click Change... then switch Handling from "View
>with Browser" to "Save to File".
>
>I would be surprised if a file header could override this.. but if you find
>a way, please let us know!
>
>-Step
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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



[PHP] Mac IE File download problem - any solutions?

2003-03-19 Thread Daniel Leighton
I know this has been addressed before, but I'm wondering if anyone has ever found a 
solution.

The code:


header('Content-Type: application/octet-stream');
header('Content-Length: '. filesize($file_info['full_file_path']));
header('Content-Disposition: attachment; filename="' .
   $file_info['filename'] . '"');
header('Connection: close');

readfile($file_info['full_file_path']);


The problem:  When downloading certain files on a Mac using IE 5.x, files are 
displayed within a browser window instead of downloading.  This seems to occur mostly 
with quicktime files (.mov, .mp3).  Some quicktime files work, while others with the 
same extension do not.  BTW, after doing some research I changed this:
header('Content-Disposition: attachment; filename="' .
   $file_info['filename'] . '"');
to this:
header('Content-Disposition: filename="' .
   $file_info['filename'] . '"');

but it did not help.  I've also tried several other iterations of the above to no 
avail.

Problem #2:  if I change the first header to:
header('Content-Type: application/force-download');

a save-as dialog box comes up, but it does not carry-through the file name of the file 
being downloaded - instead it sets the default file name to the name of the script 
that's being executed (i.e. download_file.php).

Any help is, as always, greatly appreciated.
-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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



[PHP] Re:[PHP] Help with classes (oop)

2003-02-03 Thread Daniel Leighton
Hi Leonard,

Try this:

total = $age.$name;
}
}

//main script
$obj = new first(35, "chris");

print $obj->total;
?>


The problem with what you were doing is that when you were instantiating the class, 
with the way you have set this up, you need to pass arguments because when you create 
a new instance of the class the function with the same name as the class is called 
and, in this case, it is expecting arguments.  Another example of a class set-up would 
be:

second(35, "chris");

print $test;
?>


At 2:27 PM -0500 on 2/3/03, Leonard Burton wrote:



>Greetings,
>
>   I am trying to figure out using classes.  I have read and read and read
>about them but still cannot figure them new fangled things out.  Could
>someone please alter this snippet just a bit so it would be a correct test
>script with a call to it?
>
>When  I run the script I get this in my browser <<
>
>Warning: Missing argument 1 for first() in /usr/~index.php on
>line 8
>Warning: Missing argument 2 for first() in /usr/~/index.php
>on line 8
>35chris
>>>
>
>As you see it does print the output.  What am I doing wrong?
>
>Thanks,
>
>Leonard
>[EMAIL PROTECTED]
>
>class first
>{
>var $age;
>var $name;
>
>function first($age, $name)
>{
>return $age.$name;
>}
>}
>
>//main script
>$first = new first;
>$test=$first->first(35, "chris");
>
>print $test;
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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




[PHP] Re:[PHP] POST without a form

2003-01-30 Thread Daniel Leighton
I think what you want to use is CURL.  I don't know if that's the canonical way to do 
it, but it is certainly a way.  You can get more info here:
http://www.php.net/manual/en/ref.curl.php

At 1:28 AM +0100 on 1/31/03, arthur.chereau wrote:


>Hi,
>
>A PHP page (main.php) loads another page (doit.php) via a form. doit.php gets the data
>via $_POST.
>
>Now, from a third page (other.php), I need to load doit.php with other data, but
>automatically, without a form.
>
>How can I redirect to doit.php and send POST data at the same time ? (as if a form was
>filled)
>
>I tried the fsockopen method, described at e.g.
>http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51, but it doesn't
>redirect to a page, it just gets its output. It need something like header("Location:
>doit.php") with POST data.
>
>doit.php can't be modified. I can't use javascript.
>
>What is the canonical way to do this in PHP ?
>
>--
>
>Faites un voeu et puis Voila ! www.voila.fr
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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




[PHP] Re:[PHP] Register globals on and off

2003-01-29 Thread Daniel Leighton
Hi Davy,

I found the following in the php manual:

Please note that register_globals cannot be set at runtime (ini_set()). Although, you 
can use .htaccess if your host allows it as described above. An example .htaccess 
entry: php_flag register_globals on.

on this page: http://www.php.net/manual/en/configuration.directives.php

I've also used this format in apache conf files and, I believe, in .htaccess files:
php_value include_path /web/lib/php:.


Daniel


At 7:52 AM +0100 on 1/30/03, Davy Obdam wrote:


>Hello people,
>
>On my development machine (win XP/Apache 2.0.44/PHP 4.3.0/MySQL 3.23.55) i have 
>several websites that i made some time ago that require register globals to be On in 
>the php.ini. Ofcourse i know thats not a good idea at all for security, but rewriting 
>all this code is not an option. However in my php.ini i have set register globals to 
>Off because that better. Is it possible to configure my webserver/php so that only 
>those sites that require register globals to be On have that setting, for instance in 
>a .htacces file?? Any help is appreciated:-)
>
>Best regards,
>
>Davy Obdam
>mailto:[EMAIL PROTECTED]
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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




[PHP] getting the size of a quicktime movie or other media files

2003-01-28 Thread Daniel Leighton
Hi,

I'm writing a php based fileserver/ftp app and I need to be able to display quicktime 
(and eventually other media) files via the object/embed tags.  I've got everything 
working except for the sizing.  I'd like to avoid asking users to specify the size of 
the file upon upload, if possible.  Also, making the size very large to fit anything 
inside causes major layout problems, so that is not an option.

So, I was wondering if anyone knew of a way to get this info from a file.  Is there 
something analogous to getimagesize() for quicktime?  I couldn't find anything in the 
manual.  Are there any other ways to deal with this issue?

Thank you for your help. 
-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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