[PHP] creating ZIP files

2001-09-20 Thread Raphael Pirker

Hi Guys,

Is there any way I can create a zip file from files? (filenames and their
paths will be specified in an array) Any help would be very much
appreciated!

TIA,

Raphael




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] creating ZIP files

2001-09-20 Thread Raphael Pirker

this link refers to a function READING zip files, not actually creating
one...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Crashing IIS?

2001-08-30 Thread Raphael Pirker

I've developed an intranet running on win2k adv server/IIS and it sets lots
of cookies... it hasn't crashed until now. But then again, microsoft's
random crash feature which they implement into all of their programs might
have just gotten hold of you ;)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Refreshing php.ini without restart...

2001-08-30 Thread Raphael Pirker

Hi,

i just moved my PHP project from my local PC to the online webserver and I
will need to do a few adjustments to the server. since the server is used by
all the employees in the company, there is no chance I can reboot it without
prior notice... my question: is there any way I can refresh the changes I
make in php.ini without doing a reboot?

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Print out the form When click Submit?

2001-08-30 Thread Raphael Pirker

if there were, webmasters could take control over your printer using their
website. what a horrible thought! you can start a request for print
however, simply by adding :

script language=JavaScript
!--

document.print();

// --
/script

this will open a print window...

Hope that helps,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Dedicated Hosting

2001-08-26 Thread Raphael Pirker

www.communitech.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP / MySQL Hosting Charges

2001-08-24 Thread Raphael Pirker

You can see hosts offer the package for around $10/month, so if it's inside
a package they shouldn't charge more than US$2-US$4/month. If it's an extra
feature, however, they may well charge around $5/month for the add-on and
possibly also a setup fee, because it's not in their actual product list.
anything above that could possibly be considered as expensive. For example I
get

350MB
mySQL/PHP/Python/CGI
Logs etc
100x POP, unlimited forwards
1x Domain
+ lots more

for around $20/month

HTH,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] numrows

2001-08-23 Thread Raphael Pirker

Hi Chris,
FYI:

Chris Fry [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Should be ORDER BY ID, DESC

actually it shouldn't be this way, since DESC is an option of the ORDER BY
command meaning DESC...

ORDER BY [column] [ASC | DESC] (ASC is default)

so the original code was correct



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: numrows

2001-08-23 Thread Raphael Pirker

hehe, I just figured that you can use both... with and without the '_'.
sorry for messing this up. the one with the _ is actually featured in the
documentation, while my code keeps getting shorter over time because of
lazyness :)

Raphael Pirker [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  $number = MYSQL_NUM_ROWS($result);
 $number = MYSQL_NUMROWS($result);









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] numrows

2001-08-23 Thread Raphael Pirker

better late than never :)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: It's just a logo..

2001-08-23 Thread Raphael Pirker

 Do you know What's a logo worth: PRICELESS.
so how come you're putting a price on it then?

 Do you have a logo ?
you bet

 Do you have what it takes to design one ?  To do it in Flash ?
yup

 Do you heve what it takes to put it on your website ? on your stationery 
Business card ? On literally hundreds of products ?
hmmm, first of all it's have and YES, I do have what it takes! (all it
takes to put it on your site is NOTEPAD anyways :)

 Do you have what it takes to make it 3D, ANIMATED  doesn't take AGES to
download?
err, logos are supposed to be simple. Take a look at the best logos out
there: Puma, Coca Cola, Nokia, Yahoo! - notice any 3D and animation??

 Do you want me to take care of that for you ?
sure... :)

having said that, please don't post your ads in here. If you have a
question, ask it. If you have an answer, post it. All the rest goes into the
signature.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: time

2001-08-22 Thread Raphael Pirker

convert both to a timestamp... check
http://www.php.net/manual/en/function.mktime.php for more info



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Where do I get the DLL php_mssql70.dll?? Please help...

2001-08-22 Thread Raphael Pirker

it should be inside C:\PHP\extensions

if the file is not in there, then you should download the package again.
also remember to specify the extension in your php.ini!!

cheers

raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: php-counter

2001-08-22 Thread Raphael Pirker

http://php.resourceindex.com/Complete_Scripts/Access_Counters/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Sorting IP Address Data

2001-08-22 Thread Raphael Pirker

 127.0.0.1
 127.0.0.10
 127.0.0.100
 127.0.0.101
 127.0.0.102

well, this looks pretty sorted to me :) you wanted them sorted by numeric
value, right??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Advanced Form Processing HELP

2001-08-22 Thread Raphael Pirker


Lang Sharpe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Can't be done AFAIK. Because your webserver never receives the information
 when the page is reloaded, you can't send it back to him when he reloads.

only partly correct. it can't be done using PHP (and since we're in PHP
discussion list I'll presume with Can't be done you were referring to
PHP), because it's a SERVER-SIDE language and by hitting refresh you're not
actually sending any formdata to the server. you could, however, get some
client-side scripting language to store cookies everytime data is changed in
the form-fields. JavaScript would be a good start.

check at www.javascriptsource.com - they probably have a similar script that
you can then slightly adapt.

cheers,

raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: unix permission converter

2001-08-21 Thread Raphael Pirker

Hi Richard,

The system is not for any boxes use - it's for the user-access system I'm
developing for my companie's Website. I copied the system they use at unix a
little. We have READ and WRITE permissions and 4 different user-categories.
1,2,4,8 - the reason I'm splitting this up is actually quite simple, if I
have a string like this

1-2-8

I can easier check if the user has the permission by checking whether 1
for example is inside the string. If I made the string look like this 128
it could easily be mistaken as a number...

I was trying to figure out a shorter way of achieving the same thing, since
splitting up those numbers gave me (and my maths teacher) quite a headache
at first :)) do you have any ideas?

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mode in mkdir()

2001-08-20 Thread Raphael Pirker

What does the ending 0700 mean in this line? (please don't refer me to the
manual, I read through it...) are these the user-permissions as you specify
them in chmod?

mkdir (/path/to/my/dir, 0700);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mode in mkdir()

2001-08-20 Thread Raphael Pirker

thanks dave!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] multiple select question

2001-08-20 Thread Raphael Pirker

Hi,

I have a dynamic multiple select where data is added to using the JavaScript
found here:

http://javascript.internet.com/forms/menu-swapper.html

I have a question: How do I read all the values into an array or something
else? My select has the NAME read.

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] unix permission converter

2001-08-19 Thread Raphael Pirker

Hi,

I have written a Permission Converter which converts unix permissions (the
ones we know from CHMOD) into a - delimited string of numbers. I also made
it that it supports one more level (unix only has 3 different types of
permissions, (r,w,x) while mine can handle a fourth one. Since I'm just a
newbie to PHP, I was wondering whether there is a shorter way of achieving
the same thing. Here is my code:

// $num is the number (range: 1-15)
$done = ;
$result = ;

while ($done != 1) {

if ($num  8) {
  $num = $num - 8;
  $result = 8-;
} elseif ($num == 8) {
  $result = 8;
  $done = 1;
} elseif ($num  4) {
  $num = $num - 4;
  $result .= 4-;
} elseif ($num == 4) {
  $result .= 4;
  $done = 1;
} elseif ($num  2) {
  $result .= 2-1;
  $done = 1;
} elseif ($num == 2) {
  $result .= 2-;
  $done = 1;
} else {
  $result .= 1;
  $done = 1;
}

}

if ((strrpos($result, -) == strlen($result)-1)  strlen($result)  1) {
$result = strrev($result);
$result = substr($result, 1);
$result = strrev($result);
}

echo $result;

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: searching arrays

2001-08-15 Thread Raphael Pirker

Hi Richard,

Thanks a lot for your prompt reply!! I get a parse-error, however, on line
77 (marked below):

function search_the_array($array) {
  global $search_tmp;
  $result = array_search($search_tmp, $array, TRUE);
   reset($array);
Line77:while (!($result === FALSE)  (list($k, $v) = each($array)) {
   // Or maybe you wanted ereg($search_tmp, $v) here...
   $result = ereg($v, $search_tmp) ? $k : FALSE;
   }
return ' '.$result; // extra space needed before the key
}

Any idea as to how this could be solved?

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: `pwd` - what does this mean?

2001-08-15 Thread Raphael Pirker

my guess would be Parent Working Directory, but i'm not sure...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Search code finds ANYTHING

2001-08-15 Thread Raphael Pirker

Hi,

function search_the_array($array) {
  global $search_tmp;
  $result = array_search($search_tmp, $array, TRUE);
   reset($array);
   while (!($result === FALSE)  (list($k, $v) = each($array)))
{
   // Or maybe you wanted ereg($search_tmp, $v) here...
   $result = ereg($v, $search_tmp) ? $k : FALSE;
   }
return ' '.$result; // extra space needed before the key
}

This code immediately returns a result, no matter what I type in there and
what the array consists of. I even tried searching Singapore for I will
get a result no matter what I search for and BANG... PHP fires back a
result. I didn't write the code myself so I have no idea what's going on
there... but I'd be glad if someone could help me. This code is supposed to
search an array until it finds $search_tmp inside it...

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Search code finds ANYTHING

2001-08-15 Thread Raphael Pirker

Hi Hugh,

 First, array_search returns an array of keys where the values are
 exact matches... while you want to match a substring (I think);
Yes, but exact matches are better :))

 Then, it searches through the array again using regular expressions,
 and each time it finds something, it over-writes all previous values...
 and if there were any matches to begin with, it WILL find them again.
Problem is not the overwriting part.. problem is it doesn't really search,
it finds something instantly, whether it's inside the string or not

 And why is the search-string passed as a global while the
 array is passed by value?!  This makes no sense to me.
I'm searching a number of arrays (3 to be exact) for only one search
string... $array is different all the time while $search_tmp is the same

But thanks a lot for the scripts, I will be trying them out immediately!

Regards,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Simulate Cron/PHP in Win2k?

2001-08-15 Thread Raphael Pirker

Hi,

You can create a .bat file which says the commands you want to run and then
schedule the .bat...

HTH,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] searching arrays

2001-08-14 Thread Raphael Pirker

Hi,

Is there a possibility to search arrays in PHP? For example I'd like to find
out the index-number of

$countries[singapore];

but only if that country exists in the array.

TIA,

Raphael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: searching arrays

2001-08-14 Thread Raphael Pirker

hehe, oops! :) thanks by the way,it worked! :))



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: searching arrays

2001-08-14 Thread Raphael Pirker

is there also a way to search for, let's say '*china*' because in my array
it would say Republic of China and when searching for china I get no
result from the array...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] to include php file into html file

2001-08-14 Thread Raphael Pirker

Yes, but you've got to trick your HTTP-software into believing that a .html
(or .htm respecitvely) is actually a PHP file. I can't quite remember the
tag to do so, but you should find it at www.apache.org somewhere. It's
called file mapping.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]