Re: [PHP] PHP includes without access to the default directory

2002-12-05 Thread Morgan Hughes
ib/ directory, they can't include each other without taking into account the path from the calling script... Thus why I try to define INC_DIR as early as possible if it's relative. Hope this helps... -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECT

Re: [PHP] Q: Use getImageSize() on image data from email?

2002-12-05 Thread Morgan Hughes
#x27;d consider using ImageMagick's identify command rather than getImageSize(), since it handles many more image types. Depending on what you need you may find the -verbose option helpful, as it gives tons of information, but is slow... -- Morgan Hughes C programmer and highly

Re: [PHP] PHP and the PDFlib

2002-12-02 Thread Morgan Hughes
manipulate, then convert back to PDF. The utilities I'm thinking of are ps2pdf and pdf2ps, which seem to be part of the Ghostscript package and ship with most Linux distros... Hoep this helps! -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] IC

Re: [PHP] Browser going to page twice?

2002-12-02 Thread Morgan Hughes
ion, but I sure admire the problem! ^_^ -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browser going to page twice?

2002-12-02 Thread Morgan Hughes
sers seem to automatically add a slash if you just put in www.domain.com as part of converting it to http://www.domain.com/ but for subdirectories there is often a redirect. hope this helps! -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED]

Re: [PHP] Re: invalid range

2002-12-02 Thread Morgan Hughes
es, a dash has to come last, otherwise the regex engine interprets it as a range. Escaping it may work too, but I've never had trouble moving dashes to the last char in the range, so your regex would look like this: eregi("^([a-zedv_\. -]+)$",$value); -- Morgan Hughes

Re: [PHP] last updated ?

2002-11-30 Thread Morgan Hughes
TML page? Etc... > If you want "website last updated" then from a database sounds OK but > where I'm working its commonly a "page last updated" wanted. In this > case its just a manually entered date in html in the page. Or use stat() to get the page's mtim

Re: [PHP] test for ascii or binary string

2002-11-29 Thread Morgan Hughes
roach is useful... $text = addcslashes(substr($string, 0, 1024), "\\\"'\0..\37\177..\377"); $size = strlen(preg_replace('/[^]/', '', $text)); if ($size < 200) print "mostly text, use addslashes"; else print "mostly bina

Re: [PHP] Streaming audio

2002-11-27 Thread Morgan Hughes
l $dprint_file; if (!$dprint_file) $dprint_file = fopen("/tmp/mp3.log", "a"); fprintf ($dprint_file, "%s", $msg); } Good luck, and if anyone makes something useful out of this, I'd like to hear about it! -- Morgan Hughes C programmer and highly ca

Re: [PHP] Streaming audio

2002-11-27 Thread Morgan Hughes
, however it appears winamp ignores this data unless the response from the server is "ICY/1.0 200 OK" rather than the "HTTP 200 OK"... As far as I can tell after checking the SAPI source and asking here, it's not possible to override that. -- Morgan Hughes

Re: [PHP] Re: testing for empty array

2002-11-26 Thread Morgan Hughes
pparently is an alias to count(), and it works fine, so count() should do the trick. if ( !sizeof($keywords) ) print "keywords is empty"; -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http:/

Re: [PHP] imagecopyresized

2002-11-25 Thread Morgan Hughes
pecific patches, so GD 2 support probably won't be widespread with ISPs until it's sorted out and stable... So you'll have to wait, or look into something like ImageMagick. -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ:

Re: [PHP] imagecopyresized

2002-11-25 Thread Morgan Hughes
f it's to do with the gd library installed. Try it with ImageCreateTruecolor(), since ImageCreate() produces 8-bit indexed-color images... If that function doesn't exist, you're using a pre-2.x GD, and those can't do 24-bit images at all... Good luck! -- Morgan Hug

RE: [PHP] getting mysql dump using php

2002-11-23 Thread Morgan Hughes
ntry like: # 0 3 * * * sh ~/db_backup # # Version : 1.00 # Author : Morgan Hughes ([EMAIL PROTECTED]) # License : Copyright (C) 2002, Morgan Hughes. Use freely. # Account/password/email info db_list="your_database" db_user="your_username" db_pass="your_password" email

Re: [PHP] writing to a file

2002-11-22 Thread Morgan Hughes
while writing, use fflush()... -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] phpUpLoad

2002-11-22 Thread Morgan Hughes
it wrap a back-end script that actually does the work. I've used this effectively, and so long as the back-end script is properly written I believe it's a very secure method. -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356

Re: [PHP] GD : Black background with imagecreatetruecolor

2002-11-21 Thread Morgan Hughes
ly become that color. When you use imagecreatetruecolor(), it sets all the pixels to black, and you have to explicitly draw them in to get them white. -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (htt

Re: [PHP] Seconds to minutes

2002-11-19 Thread Morgan Hughes
secs %= 3600; $mins = $secs / 60; $mins %= 60; $out = sprintf ("%d hour%s, %d minute%s, %d second%s", $hours, ($hours == 1 ? '' : 's'), $mins, ($mins == 1 ? '' : 's'), $secs, ($secs == 1 ? ''

RE: [PHP] Unusual HTTP header control

2002-11-16 Thread Morgan Hughes
e heavy lifting for me... ^_^ -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Unusual HTTP header control

2002-11-16 Thread Morgan Hughes
header sent by PHP/Apache and instead send "ICY 200 OK", to fool the player into thinking it's listening to a ShoutCast server... Does anyone know how to do this? The docs on header() don't mention it, nor do the user notes... Any ideas? Thanks! -- Morgan Hughes