php-windows Digest 3 Apr 2003 12:37:37 -0000 Issue 1665
Topics (messages 19242 through 19267):
Re: Simple Answer, but I can't see it....
19242 by: Uttam
Re: I really don't understand this?
19243 by: Jill.Ramonsky.Aculab.com
19244 by: ODCS
19246 by: Svensson, B.A.T. (HKG)
19247 by: Svensson, B.A.T. (HKG)
19248 by: Svensson, B.A.T. (HKG)
19249 by: ODCS
how to use umask() ???
19245 by: Aidal
19252 by: Jill.Ramonsky.Aculab.com
19254 by: Aidal
19255 by: Svensson, B.A.T. (HKG)
Re:Subject: Output to Excel File
19250 by: Neil Smith
Re: Output to Excel File
19251 by: Sven Schnitzke
19257 by: Erwan Pianezza
19267 by: Radovan Radic
Help with gd
19253 by: Achilles Maroulis
19258 by: Jill.Ramonsky.Aculab.com
19259 by: Svensson, B.A.T. (HKG)
19260 by: Svensson, B.A.T. (HKG)
19261 by: Bruce Barnes
19263 by: Bruce Barnes
19264 by: Svensson, B.A.T. (HKG)
19265 by: Achilles Maroulis
PHP Conference at Amsterdam RAI?
19256 by: Svensson, B.A.T. (HKG)
help+gd library
19262 by: aRianus
XML error, but its not an XML document
19266 by: Trystano.aol.com
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
* just skip the action attribute in <form> tag.
* <?PHP is not same as <?php
* put the form in else part of the if, if not already there
hth,
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 22:44
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Simple Answer, but I can't see it....
This is the some of the code that is contained within the PHP page...
<?php
if (isset( $_POST[ "username"] )) {
code here....
}
?>
more HTML & PHP etc...
<?PHP $self = $_SERVER[ 'PHP_SELF' ]; ?>
<form method="post" action="SessionLogin.php"></form>
<input type="text" name="username" maxlength="20"/>
<input type="password" name="password" maxlength="20"/>
<input type="submit" value="Submit"/>
</form>
?>
More HTML etc...
When the submit button is pressed the nothing happens.
Tryst
--- End Message ---
--- Begin Message ---
I _THINK_ this is to do with scope.
If you say
elseif ($duplicate = ...)
{
}
and this is the first use of the variable $dublicate, then $duplicate goes
out of scope at the end of the right brace.
I could be wrong about that, but it's worth a try. See what happens if you
declare the variable $duplicate _before_ the first if(...). For example:
$duplicate = "";
if (...)
...
Jill
-----Original Message-----
From: ODCS [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 6:26 AM
To: PHP Windows
Subject: [PHP-WIN] I really don't understand this?
I have spent the last 8 hours (seriously) trying to figure out this stupid
piece of code, and it's just beyond me why it doesn't work. I hope someone
here can help, or even follow the code.
I have a form where the user inputs information - the code below is the
error checking for one of the fields. The first IF statement just checks
that the filed is not empty.
The first ELSEIF checks a function to see if the user is already in the
mysql database and returns the letter T, D or S. ** This part works fine.
If the first ELSIF is not = to T then the second ELSEIF is checked to see if
the letter returned is D. I have checked over and over and over and over and
the letter D is being returned (I have checked the third ELSEIF and it is
the same). It appears like they are just being ignored.
Either I am just not getting the concept, or there is something seriously
weird going on.
Any help in solving this mystery is truely appreciated.
if (empty($form["name"])) { $error["name"] = "*"; $message["name"] =
"Required field!";
}
elseif($duplicate = duplicate_name($form["name"]) == "T") {
$error["name"] = "*"; $message["name"] = "Screen name already used!";
}
elseif ($duplicate == "D") {
$error["name"] = "*"; $message["name"] = "Database error - Please try
again in a few moments!";
}
elseif ($duplicate == "S") {
$error["name"] = "*"; $message["name"] = "Server error - Please try
again in a few moments!";
}
function duplicate_name($name) {
if (!($connect = @mysql_connect($serverhost,$serveruser,$serverpass))) {
**** These are all defined above - not included here.
$server_error = "S";
}
if ([EMAIL PROTECTED]($databasename)) {
$server_error = "D";
}
if($server_error) { $duplicate = $server_error;
}
else
{
$query = "SELECT name FROM $tablename WHERE name = '$name'";
if(!$query) { $duplicate = "D"; }
else {
$result = mysql_query($query);
$line = mysql_fetch_array($result);
if($line['name'] == $name) { $duplicate = "T"; }
mysql_free_result($result);
mysql_close($connect);
}
}
echo $duplicate; ***** This shows that the variable $duplicate contains
T, D, or S.
return($duplicate);
}
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Been down that road. I've used unset($duplicate), $duplicate="" - so I don't
know. I have been going around in circles since 5 this afternoon EST with
this - no matter what I do I get the same results. I'm just at a complete
loss. I've even tried setting it to a letter $duplicate="T", but get the
same results. I'm not a pro, but it has to be the way the variable is being
returned - extra hidden characters, slashes, dots, whatever. When I do echo
$duplicate - it displays 1, but when I do if($duplicate == 1) nothing
happens - I even tried "1". I am so frustrated and tired right now, I just
don't get this.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 2:16 AM
Subject: RE: [PHP-WIN] I really don't understand this?
> I _THINK_ this is to do with scope.
>
> If you say
>
> elseif ($duplicate = ...)
> {
> }
>
> and this is the first use of the variable $dublicate, then $duplicate goes
> out of scope at the end of the right brace.
>
> I could be wrong about that, but it's worth a try. See what happens if you
> declare the variable $duplicate _before_ the first if(...). For example:
>
> $duplicate = "";
> if (...)
> ...
>
> Jill
>
>
> -----Original Message-----
> From: ODCS [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 6:26 AM
> To: PHP Windows
> Subject: [PHP-WIN] I really don't understand this?
>
>
> I have spent the last 8 hours (seriously) trying to figure out this stupid
> piece of code, and it's just beyond me why it doesn't work. I hope someone
> here can help, or even follow the code.
>
> I have a form where the user inputs information - the code below is the
> error checking for one of the fields. The first IF statement just checks
> that the filed is not empty.
>
> The first ELSEIF checks a function to see if the user is already in the
> mysql database and returns the letter T, D or S. ** This part works fine.
>
> If the first ELSIF is not = to T then the second ELSEIF is checked to see
if
> the letter returned is D. I have checked over and over and over and over
and
> the letter D is being returned (I have checked the third ELSEIF and it is
> the same). It appears like they are just being ignored.
>
> Either I am just not getting the concept, or there is something seriously
> weird going on.
>
> Any help in solving this mystery is truely appreciated.
>
> if (empty($form["name"])) { $error["name"] = "*"; $message["name"] =
> "Required field!";
> }
> elseif($duplicate = duplicate_name($form["name"]) == "T") {
> $error["name"] = "*"; $message["name"] = "Screen name already used!";
> }
> elseif ($duplicate == "D") {
> $error["name"] = "*"; $message["name"] = "Database error - Please try
> again in a few moments!";
> }
> elseif ($duplicate == "S") {
> $error["name"] = "*"; $message["name"] = "Server error - Please try
> again in a few moments!";
> }
>
>
> function duplicate_name($name) {
>
> if (!($connect = @mysql_connect($serverhost,$serveruser,$serverpass))) {
> **** These are all defined above - not included here.
> $server_error = "S";
> }
>
> if ([EMAIL PROTECTED]($databasename)) {
> $server_error = "D";
> }
>
> if($server_error) { $duplicate = $server_error;
> }
> else
> {
> $query = "SELECT name FROM $tablename WHERE name = '$name'";
>
> if(!$query) { $duplicate = "D"; }
>
> else {
> $result = mysql_query($query);
> $line = mysql_fetch_array($result);
>
> if($line['name'] == $name) { $duplicate = "T"; }
>
> mysql_free_result($result);
> mysql_close($connect);
>
> }
> }
>
> echo $duplicate; ***** This shows that the variable $duplicate contains
> T, D, or S.
>
> return($duplicate);
> }
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
if (empty($form["name"])) {
$error["name"] = "*";
$message["name"] = "Required field!";
} else if ($duplicate = duplicate_name($form["name"]) == "T") {
// This seams to be an assignment of either true or false to duplicate(???)
// e.g. $duplicate = (duplicate_name($form["name"]) == "T")
// Hence $duplicate seams to be assign either true or false (1/0) and when you
// do this will never trigger the rest of the mutual exclusions, since you
// only check for weather $duplicate is "T" or "S".
$error["name"] = "*";
$message["name"] = "Screen name already used!";
} else if ($duplicate == "D") {
$error["name"] = "*";
$message["name"] = "Database error - Please try again in a few moments!";
}
elseif ($duplicate == "S") {
$error["name"] = "*";
$message["name"] = "Server error - Please try
again in a few moments!";
}
//Anders - as always totally ignorant about PHP syntax
--- End Message ---
--- Begin Message ---
> // only check for weather $duplicate is "T" or "S".
Errata: "D" or "S"
--- End Message ---
--- Begin Message ---
Try this:
else if ( ($duplicate = duplicate_name($form["name"])) == "T") {
--- End Message ---
--- Begin Message ---
So how should I do this? I am still trying to learn php and this kind of
stuff really confuses me.
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "ODCS" <[EMAIL PROTECTED]>
Cc: "PHP Windows" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 3:20 AM
Subject: RE: [PHP-WIN] I really don't understand this?
> if (empty($form["name"])) {
>
> $error["name"] = "*";
> $message["name"] = "Required field!";
> } else if ($duplicate = duplicate_name($form["name"]) == "T") {
>
> // This seams to be an assignment of either true or false to
duplicate(???)
> // e.g. $duplicate = (duplicate_name($form["name"]) == "T")
>
> // Hence $duplicate seams to be assign either true or false (1/0) and when
you
> // do this will never trigger the rest of the mutual exclusions, since you
> // only check for weather $duplicate is "T" or "S".
>
>
> $error["name"] = "*";
> $message["name"] = "Screen name already used!";
>
> } else if ($duplicate == "D") {
> $error["name"] = "*";
> $message["name"] = "Database error - Please try again in a few
moments!";
> }
> elseif ($duplicate == "S") {
> $error["name"] = "*";
> $message["name"] = "Server error - Please try
> again in a few moments!";
> }
>
>
> //Anders - as always totally ignorant about PHP syntax
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi NG.
I'm having problems with my web application changing file permissions when
creating, editing or deleting text files.
My web host thinks it's because I need to use umask() but I'm not quite sure
just how to use this function.
I've read the describtion on www.php.net but that didn't enlighten me much.
(As in, don't give me a link to www.php.net because it wont help me)
Can anyone explain to me how to use this function?
My php application creates, reads, wrrites, copies and deletes text files
and I want the file permissions to stay intact.
The application needs all permissions to the files: read, write and execute
(as i recall them stated when accessing through FTP).
Any help would be much apreciated thanks...
/Aidal
--- End Message ---
--- Begin Message ---
The PHP manual (unfortunately) assumes some Unix knowledge here.
The paramter to umask is a bitfield, passed as an integer. Within this
bitfield:
bit 0 set implies that anyone in the world can execute the file
bit 1 set implies that anyone in the world can write to the file
bit 2 set implies that anyone in the world can read the file
bit 3 set implies that anyone in the file's group (a Unix concept) can
execute the file
bit 4 set implies that anyone in the file's group (a Unix concept) can write
to the file
bit 5 set implies that anyone in the file's group (a Unix concept) can read
the file
bit 6 set implies that the owner of the file can execute the file
bit 7 set implies that the owner of the file can write to the file
bit 8 set implies that the owner of the file can read the file
When accessing a file, the lower 9 bits of the permissions of the file (as
stored on the server) are logically ANDed with the complement of the current
"umask" - which you can set with the umask() function - and the resulting
bitfield is inspected to see whether or not to grant permission for the
specified action.
Jill
-----Original Message-----
From: Aidal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 9:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] how to use umask() ???
Hi NG.
I'm having problems with my web application changing file permissions when
creating, editing or deleting text files.
My web host thinks it's because I need to use umask() but I'm not quite sure
just how to use this function.
I've read the describtion on www.php.net but that didn't enlighten me much.
(As in, don't give me a link to www.php.net because it wont help me)
Can anyone explain to me how to use this function?
My php application creates, reads, wrrites, copies and deletes text files
and I want the file permissions to stay intact.
The application needs all permissions to the files: read, write and execute
(as i recall them stated when accessing through FTP).
Any help would be much apreciated thanks...
/Aidal
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thanks for the explanation though I did know some of this already. What I'm
not sure of is how and where to use this.
Below is a little example of a member function that creates a new text file.
How/where should I use umask() ?
Also does it have any effect if the file isn't properly closet by fclose() ?
Little function example (member function of class file_handler):
--------------------------------------
function create_file($file_name) {
if (!$this->fp = @fopen($file_name, wb)) {
$this->error_msg .= $this->error_create ." ". $file_name .".";
return false;
} else {
$this->file = $file_name;
return $this->fp;
}
}
---------------------------------------
"Jill Ramonsky" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The PHP manual (unfortunately) assumes some Unix knowledge here.
> The paramter to umask is a bitfield, passed as an integer. Within this
> bitfield:
>
> bit 0 set implies that anyone in the world can execute the file
> bit 1 set implies that anyone in the world can write to the file
> bit 2 set implies that anyone in the world can read the file
> bit 3 set implies that anyone in the file's group (a Unix concept) can
> execute the file
> bit 4 set implies that anyone in the file's group (a Unix concept) can
write
> to the file
> bit 5 set implies that anyone in the file's group (a Unix concept) can
read
> the file
> bit 6 set implies that the owner of the file can execute the file
> bit 7 set implies that the owner of the file can write to the file
> bit 8 set implies that the owner of the file can read the file
>
> When accessing a file, the lower 9 bits of the permissions of the file (as
> stored on the server) are logically ANDed with the complement of the
current
> "umask" - which you can set with the umask() function - and the resulting
> bitfield is inspected to see whether or not to grant permission for the
> specified action.
>
> Jill
>
>
>
> -----Original Message-----
> From: Aidal [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 9:11 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] how to use umask() ???
>
>
> Hi NG.
>
> I'm having problems with my web application changing file permissions when
> creating, editing or deleting text files.
> My web host thinks it's because I need to use umask() but I'm not quite
sure
> just how to use this function.
>
> I've read the describtion on www.php.net but that didn't enlighten me
much.
> (As in, don't give me a link to www.php.net because it wont help me)
>
> Can anyone explain to me how to use this function?
>
> My php application creates, reads, wrrites, copies and deletes text files
> and I want the file permissions to stay intact.
> The application needs all permissions to the files: read, write and
execute
> (as i recall them stated when accessing through FTP).
>
> Any help would be much apreciated thanks...
>
> /Aidal
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Is it possible to uses chmod() on newly created files instead?
In such case you don't have to care about the umask() (which I don't
think you should have to fiddle around with in the first place even...)
> -----Original Message-----
> From: Aidal [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 10:11 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] how to use umask() ???
>
>
> Hi NG.
>
> I'm having problems with my web application changing file permissions when
> creating, editing or deleting text files.
> My web host thinks it's because I need to use umask() but I'm not quite sure
> just how to use this function.
>
> I've read the describtion on www.php.net but that didn't enlighten me much.
> (As in, don't give me a link to www.php.net because it wont help me)
>
> Can anyone explain to me how to use this function?
>
> My php application creates, reads, wrrites, copies and deletes text files
> and I want the file permissions to stay intact.
> The application needs all permissions to the files: read, write and execute
> (as i recall them stated when accessing through FTP).
>
> Any help would be much apreciated thanks...
>
> /Aidal
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Yes, yes and yes !
Somebody posted this question a couple of weeks ago and out of curiosity I
tried it - works fine for basic tables importing as HTML, I guess if I get
my hands on the XLS -> XML output format I'll try that too. Heres some
example code for you to try :
<?php
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=test.xls");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Output HTML table in Excel format from PHP</title>
</head>
<body>
<table border="1">
<tr>
<th>Header 1</th>
<th>Column 2</th>
<th>3rd column</th>
</tr>
<tr>
<td>item 1</td>
<td>property 1</td>
<td>method 1</td>
</tr>
<tr>
<td>item 2</td>
<td>property 2</td>
<td>method 2</td>
</tr>
<tr>
<td>27.5015</td>
<td>42.5151</td>
<td>7053</td>
</tr>
</table>
</body>
</html>
All you need to work out is how to send MySQL output as a table (;-o) and
remember to send the headers as above.
HTH
Neil Smith.
At 05:26 02/04/2003 +0000, you wrote:
>
From: "Chris and Trish Kaelin" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Tue, 01 Apr 2003 16:58:20 -0500
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[EMAIL PROTECTED]>
Subject: Output to Excel File
At my job, we are using ColdFusion with an Oracle database, and one the
things we do is output data in a HTML table using contentType =
"application/msexcel", which creates a MS Excel spreadsheet.
The two web sites I am running from home are PHP with an mySQL
database. Is there a similar method in PHP ot create a MS Excel spreadsheet?
Chris Kaelin
--- End Message ---
--- Begin Message ---
Hi,
I recently experimented a bit with Excel using COM
(Excel 8 aka Excel97 and PHP 4.3 / 4.4-dev on WIN98SE).
It is quite hairy, especially because the PHP COM
implementation does not yet implement all the needed
VARIANT subtypes (most notably multi dimensional
safe arrays), so a lot of objects are not yet reachable.
If writing true XLS files is essential though, one can say
it is possible.
If you are interested, drop me a note and I will mail you a
script reading and writing XLS files.
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Chris and Trish Kaelin [SMTP:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 1. April 2003 23:58
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] Output to Excel File
>
> At my job, we are using ColdFusion with an Oracle database, and one the
> things we do is output data in a HTML table using contentType =
> "application/msexcel", which creates a MS Excel spreadsheet.
>
> The two web sites I am running from home are PHP with an mySQL database. Is
> there a similar method in PHP ot create a MS Excel spreadsheet?
>
> Chris Kaelin
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
http://www.web-aware.com/biff/
PHP to Excel, aka BiffWriter is a generic class to create Excel compatible
streams or files from PHP. It enables web developers with the feature to
deploy information "off-line" using the most common spread sheet format.
----- Original Message -----
From: "Sven Schnitzke" <[EMAIL PROTECTED]>
To: "'[PHP-WIN]'" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 1:36 PM
Subject: AW: [PHP-WIN] Output to Excel File
Hi,
I recently experimented a bit with Excel using COM
(Excel 8 aka Excel97 and PHP 4.3 / 4.4-dev on WIN98SE).
It is quite hairy, especially because the PHP COM
implementation does not yet implement all the needed
VARIANT subtypes (most notably multi dimensional
safe arrays), so a lot of objects are not yet reachable.
If writing true XLS files is essential though, one can say
it is possible.
If you are interested, drop me a note and I will mail you a
script reading and writing XLS files.
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Chris and Trish Kaelin [SMTP:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 1. April 2003 23:58
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] Output to Excel File
>
> At my job, we are using ColdFusion with an Oracle database, and one the
> things we do is output data in a HTML table using contentType =
> "application/msexcel", which creates a MS Excel spreadsheet.
>
> The two web sites I am running from home are PHP with an mySQL database.
Is
> there a similar method in PHP ot create a MS Excel spreadsheet?
>
> Chris Kaelin
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I am off-topic here, but are there any ways to load word document file into
php, and do something with it (convert to html, put into db etc.)
Thx,
Radovan
"Erwan Pianezza" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> http://www.web-aware.com/biff/
>
> PHP to Excel, aka BiffWriter is a generic class to create Excel compatible
> streams or files from PHP. It enables web developers with the feature to
> deploy information "off-line" using the most common spread sheet format.
--- End Message ---
--- Begin Message ---
Hi. I recently started programming with gd2 and so far everything is ok.
What I want to know, if anyone can help, is if there is way to print a watermark on a
picture in order to make it copyrighted. I know I can print a string with some special
fonts but this wouldn't be so nice to look at... The watermark will be text (not some
special logo).
I also want to ask if there is a way to make a 16bit thumbnail of a picture with gd (I
know that gd2 supports 16bit but I have seen that gd 1.6 makes only 256 color pictures)
Thanx in advance
Achilles
--- End Message ---
--- Begin Message ---
I can't answer your question, and this may even be off-topic, but copyright
law is never so simple as it may at first seem.
I don't know the law in any country but my own (Britain), but here in
Britain, adding a watermark does NOT make a picture copyright. In Britain,
what makes a picture, or a novel, or a piece of music, or any other
creation, copyright, is the simple fact that you've published it. In other
words, simply putting something on the web _automatically gives you
copyright_.
Unfortunately, the problem then becomes proving it. If two people both claim
to be the creator of the same document, the "winner" - the copyright owner -
is the one who published it first. How do you prove this? You can't. So the
courts get full of people saying "I wrote this", "No, I wrote this", etc..
To safeguard against this, recommended practice is to seal several copies of
your work in a envelopes in which all the edges have been signed and dated
and selotaped over, and then send them by registered post to a number of
trusted parties, including yourself, at creation time (i.e. _before_ you
first publish it). The recipients should be instructed _not to open their
envelope_. In the event of a court dispute, the postmark on the still-sealed
envelopes is considered proof that the work was known to you on or before
that date.
The message "Copyright <name> <date>" is just a warning. It carries no legal
weight. Nor does a watermark. If I create (and publish) a picture, and you
steal it and watermark it, the copyright remains mine.
The law will doubtless be different in other countries. Check on the
internet for the law in yours.
In any case - I seriously doubt that a watermark is unremovable by a
talented hacker.
There's another interesting legal point to consider. If your work is created
by a PROGRAM, do you still own the copyright? (Says I, scarily venturing
into the realms of AI rights here). This is actually a very complicated
issue and one which is likely to remain unresolved for the forseeable
future.
Jill
-----Original Message-----
From: Achilles Maroulis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 1:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Help with gd
is if there is way to print a watermark on a picture in order to make it
copyrighted.
--- End Message ---
--- Begin Message ---
> In any case - I seriously doubt that a watermark is unremovable by a
> talented hacker.
One don't need to be a hacker for that... Fast Fourier Transform is enough. :)
--- End Message ---
--- Begin Message ---
> The law will doubtless be different in other countries. Check on the
> internet for the law in yours.
In Scandinavia you claim copyright by demanding "holmgång" with your opponent.
Basically this means that one goes berserk and fights with sharp swords (or axes).
The one that decapitates the other first wins; in effect he will be the copyright
holder from that instant of time - that is until (s)he loses his head in holmgång
against a better swordsman.
Quite simple rules isn't it. ;)
--- End Message ---
--- Begin Message ---
Here in the US, the issue of Copyrights on pictures used on web sites is
being scrutinized very carefully. In a situation involving the use of a
picture that was placed on a web site by a client of a web site that is
hosted by a company that was just recently purchase by our company, the
owner of the web site was ordered by the owners of the copyright to "cease
and desist" in the use of the picture because he did not have either a
copyright notice or a notice of the source of the picture, ie: "Picture
Courtesy of XYZ Company",
The company took the owner served the owner of the web site with a summons
ordering him to remove the picture and he still refused, so they filed a
suite in the State of California, the state in which both the owner of the
Web Site and the Company that owns the picture are located.
The case wound its way thru the courts and on March 31st, 2003, the final
verdict was handed down by the courts. Here is a summary of the verdict
from the California Bar Association's newsletter as it was published on that
same date:
"DEFAULT JUDGMENT in favor of plaintiff against defendant XXXXX XXXXXX and
XXXXX XXXXXX XXXXXXXXXXXX in the amount of [USD] $69,486.50., ***Civil Case
Terminated.. Signed by Judge Ronald Whyte on 3/31/03. (cv, )" (For privacy
purposes, the client's name has been obliterated from this announcement.)
The previous owner of the web hosting company was also fined USD $3,000 for
his failure to remove the image from the client's web site upon notification
by the owner of the image. The court held that it is the "web hosting
company's responsibility to immediately and completely remove all improperly
used and copyrighted images upon notification of the hosting company by the
copyright owner."
Remember, this judgment was entered for the improper use of a SINGLE IMAGE!
So the moral of the story here is: ALWAYS place a Copyright Notice ON the
picture somewhere AND give credit to the source of the item when using it on
a web site - EVEN WHEN YOU HAVE PERMISSION TO USE IT.
Companies that own copyrights and the US courts are beginning to take
Copyright Infringement VERY SERVIOSLY.
Bruce Barnes. CEO
ChicagoNetTech / Rinella Internet Services
Chicago IL
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 07:16
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Help with gd
I can't answer your question, and this may even be off-topic, but copyright
law is never so simple as it may at first seem.
I don't know the law in any country but my own (Britain), but here in
Britain, adding a watermark does NOT make a picture copyright. In Britain,
what makes a picture, or a novel, or a piece of music, or any other
creation, copyright, is the simple fact that you've published it. In other
words, simply putting something on the web _automatically gives you
copyright_.
Unfortunately, the problem then becomes proving it. If two people both claim
to be the creator of the same document, the "winner" - the copyright owner -
is the one who published it first. How do you prove this? You can't. So the
courts get full of people saying "I wrote this", "No, I wrote this", etc..
To safeguard against this, recommended practice is to seal several copies of
your work in a envelopes in which all the edges have been signed and dated
and selotaped over, and then send them by registered post to a number of
trusted parties, including yourself, at creation time (i.e. _before_ you
first publish it). The recipients should be instructed _not to open their
envelope_. In the event of a court dispute, the postmark on the still-sealed
envelopes is considered proof that the work was known to you on or before
that date.
The message "Copyright <name> <date>" is just a warning. It carries no legal
weight. Nor does a watermark. If I create (and publish) a picture, and you
steal it and watermark it, the copyright remains mine.
The law will doubtless be different in other countries. Check on the
internet for the law in yours.
In any case - I seriously doubt that a watermark is unremovable by a
talented hacker.
There's another interesting legal point to consider. If your work is created
by a PROGRAM, do you still own the copyright? (Says I, scarily venturing
into the realms of AI rights here). This is actually a very complicated
issue and one which is likely to remain unresolved for the forseeable
future.
Jill
-----Original Message-----
From: Achilles Maroulis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 1:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Help with gd
is if there is way to print a watermark on a picture in order to make it
copyrighted.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Incidentally, when someone produces a picture or photograph, story, software
code, magazine or newspaper article, or any other work that falls into the
category of intellectual property in the US, it is AUTOMATICALLY COPYRIGHTED
in the name of the person who created the work.
There is no need to register a copyright for the item to protect it.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 07:16
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Help with gd
I can't answer your question, and this may even be off-topic, but copyright
law is never so simple as it may at first seem.
I don't know the law in any country but my own (Britain), but here in
Britain, adding a watermark does NOT make a picture copyright. In Britain,
what makes a picture, or a novel, or a piece of music, or any other
creation, copyright, is the simple fact that you've published it. In other
words, simply putting something on the web _automatically gives you
copyright_.
--- End Message ---
--- Begin Message ---
I still think the "Holmgang" approach is the most effective one. :)
> -----Original Message-----
> From: Bruce Barnes
> Subject: RE: [PHP-WIN] Help with gd
>
>
> Here in the US, the issue of Copyrights on pictures used on web sites is
--- End Message ---
--- Begin Message ---
Hi again... Thanx everyone who read the topic and answered....
...but noone answered my question...
is there a way I can insert a watermark on a jpg with gd???
Maybe it's because there isn't a solution for my problem.
Thanx again for trying to help...
--- End Message ---
--- Begin Message ---
Just visit the PHP home page and saw that there was an upcoming event
at Amsterdam RAI the 8-9 May. Looking in my Agenda I see this at
Thursday and Friday, and even better I have no obligations that day.
But the conference page is very sparse (to broad and general) on who
will be the speakers, and trying to figure out if any cost is involved
seams not to be possible.
Does anybody has any clues here?
//Anders - resident in Amsterdam (Oude-Zuid)
--- End Message ---
--- Begin Message ---
i am using windows 2000+ISS 5.0+PHP4.3.0
i wanna use gd library. but i did not find the library which is running.
how can i install gd library.
would you help me
--- End Message ---
--- Begin Message ---
When ever I try to load my PHP document in IE I get the following error
message...
XML page cannot be displayed. Cannot view XML input using style sheet.
Invalid at the top level of the document. Error processing resource
'http://localhost/Sessions/login.php'. Line 1, Position 1
...and then it displays the query string I have built up. I think the problem
lies where I have tried to build the variable via a long query string.
Whenever I leave out these lines of code, everything works fine. The code is
below...
$query_2_tables = "select patients.patientid, patients.firstname,
patients.surname from auth, patients ";
$query_2_tables .= "where username='".$username."' and
password='".$password."'";
$query_2_tables .= "and auth.patientid = patients.patientid";
echo $query_2_tables;
...if anyone can identify what the problem is it would be a great help.
Cheers.
Tryst
--- End Message ---