Re: [PHP] Hey, If anyone can help me with this at all, I would really appreciate it...

2002-12-15 Thread Jason Wong
On Sunday 15 December 2002 06:31, Ryan Smaglik wrote:

First, please use a _descriptive_ subject. Something which gives people an 
idea of what your post is about.

> I got a generic ³text to png on the fly² script which works fine but I want
> to change it so that the image only the size of the text. (so the text has
> no border, or padding around it) For and example of what I want to do check
> out: http://www.spoono.com/font/?string=This is what i want to do&.png
> I have the script:
> 
>   Header("Content-type: image/png");
>
>   if(!isset($s)){$s=8;}
>
>   $size =
> imagettfbbox($s,0,"/home/xelerix/public_html/font/fonts/04B_03__.TTF",$text
>) ;
>
>   $dx = abs($size[2]-$size[0]);
>
>   $dy = abs($size[5]-$size[3]);
>
>   $xpad=9;
>
>   $ypad=9;

By their very name, I would guess these two values are used as padding to give 
a border around the text. Try removing them.

>   $im = imagecreate($dx+$xpad,$dy+$ypad);
>
>   $bg = ImageColorAllocate($im, 102,102,102);
>
>   $white = ImageColorAllocate($im, 255,255,255);
>
>   ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2), $white,
> "/home/xelerix/public_html/font/fonts/04B_03__.TTF", $text);
>
>   imagepng($im);
>
>   ImageDestroy($im);
>
> ?>


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"This isn't brain surgery; it's just television."
- David Letterman
*/


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




php-general Digest 15 Dec 2002 08:02:34 -0000 Issue 1764

2002-12-15 Thread php-general-digest-help

php-general Digest 15 Dec 2002 08:02:34 - Issue 1764

Topics (messages 128293 through 128322):

Re: Formatting dates (from MySQL)
128293 by: freaky
128294 by: Marco Tabini
128295 by: John W. Holmes

Undefined Variable
128296 by: Anthony Ritter
128297 by: Marco Tabini
128298 by: Anthony Ritter
128299 by: Marco Tabini
128300 by: Anthony Ritter

Hey, If anyone can help me with this at all, I would really appreciate it...
128301 by: Ryan Smaglik
128322 by: Jason Wong

Parse Errors
128302 by: Andy Turegano
128303 by: DL Neil

Querying two tables
128304 by: Cesar Aracena

Session: I RTFM
128305 by: John Taylor-Johnston
128306 by: Marco Tabini
128309 by: TomH
128312 by: John Taylor-Johnston
128313 by: John Taylor-Johnston
128315 by: Justin French
128319 by: michael kimsal
128321 by: conbud

question
128307 by: r.vellinga
128314 by: Justin French
128318 by: Andy Turegano

PHP/ldap - atomic attribute modification
128308 by: Carl J Meyer

Re: A little regex help
128310 by: Justin French

Re: migrating from register_globals on to off
128311 by: Justin French

Installing PEAR on windows
128316 by: Davy Obdam

Strange problem with PHP,SSI
128317 by: sport4ever
128320 by: conbud

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 ---
Hey there,

I was just looking at the date/time functions
(http://www.php.net/manual/en/function.time.php) and I can't seem to find a
function that can format a date that is supplied in the format of a DATETIME
column.

So, I was wondering, is there a function that can format it properly or
should I let the database handle the formatting (I'm really new to SQL, I
didn't come across anything to mod in the select statement yet). I could
ofcourse split it on space for a time and a date var and then split the date
on -'s for years, months and days but efficient is something else I think
:-) In the archives I saw some examples doing exactly that, but nothing with
a single function (unless home defined ofcourse).

Kind regards and TIA




--- End Message ---
--- Begin Message ---
You should be able to use strtotime() to transform the datetime string
into a UNIX timestamp, which you can then format back using date().
However, this is a very circuitous way--either use SQL to format it or,
if your DBMS supports it, have it returned already as a UNIX timestamp.
The actual SQL commands depend on which DBMS you actually use.


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

--- Begin Message ---
Hey there,

I was just looking at the date/time functions
(http://www.php.net/manual/en/function.time.php) and I can't seem to find a
function that can format a date that is supplied in the format of a DATETIME
column.

So, I was wondering, is there a function that can format it properly or
should I let the database handle the formatting (I'm really new to SQL, I
didn't come across anything to mod in the select statement yet). I could
ofcourse split it on space for a time and a date var and then split the date
on -'s for years, months and days but efficient is something else I think
:-) In the archives I saw some examples doing exactly that, but nothing with
a single function (unless home defined ofcourse).

Kind regards and TIA




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


--- End Message ---
--- End Message ---
--- Begin Message ---
> I was just looking at the date/time functions
> (http://www.php.net/manual/en/function.time.php) and I can't seem to
find
> a
> function that can format a date that is supplied in the format of a
> DATETIME
> column.
> 
> So, I was wondering, is there a function that can format it properly
or
> should I let the database handle the formatting (I'm really new to
SQL, I
> didn't come across anything to mod in the select statement yet). I
could
> ofcourse split it on space for a time and a date var and then split
the
> date
> on -'s for years, months and days but efficient is something else I
think
> :-) In the archives I saw some examples doing exactly that, but
nothing
> with
> a single function (unless home defined ofcourse).

You can use the DATE_FORMAT() function in your SELECT query to format
the date however you want it. Or, you can use UNIX_TIMESTAMP() to pull
it out in the unix format and then use the PHP function date() to format
it. 

http://www.mysql.com/documentation/mysql/bychapter/manual_R

[PHP] Re: Querying two tables

2002-12-15 Thread Lars Olsson
Hi!

To fetch information from several tables you usually use a join 
operation. Here's a starting point in the MySQL manual.

http://www.mysql.com/doc/en/JOIN.html

/Lars ([EMAIL PROTECTED])



Cesar Aracena wrote:
Hi all,

I have several tables from which I have to fetch certain products &
categories based on customer selection. The tables are as follows:

Table 1 - Categories
catid (autonum)
catname

Table 2 - Sub categories
subcatid (autonum)
subcatname

Table 3 - Products
prodid (autonum)
prodname

Table 4 - Relationships
Catid
Subcatid
Prodid

Now, the question is how to fetch all the sub-categories let's say that
are related to category 0001. I know it's as simple as relating two
tables in one query, but I don't remember how. Any help appreciated.


Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina






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




Re: [PHP] Session: I RTFM

2002-12-15 Thread Marco Tabini
Single quotes are normal strings. Double quotes are strings in which
substitutions can take place. For example:



Double quotes also expand escape strings (e.g."\n") whereas single
quotes don't.

Cheers,


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

--- Begin Message ---
Marco (or anyone)

What is the difference between:
$familyname = getvar("familyname");
and
$familyname = getvar('familyname');

What do single quotes do, as a general rule, that double cannot (he asks remembering 
something, but not sure what)?




Marco Tabini wrote:

> I haven't followed the rest of the thread, but how about using a
> function?
>
> function getvar ($varname)
> {
> if (isset ($_POST[$varname])
> {
> $_SESSION[$varname] = $_POST[$varname];
> return $_POST[$varname];
> }
> elseif (isset ($_SESSION[$varname]))
> return $_SESSION[$varname];
> }
>
> session_start();
>
> // You don't need session_register anymore
>
> $familyname = getvar('familyname');
>
> and so on--just one line per variable.
>
> Hope this helps.
>
> Cheers,
>
> Marco
> --
> 
> php|architect - The Magazine for PHP Professionals
> The monthly magazine dedicated to the world of PHP programming
>
> Check us out on the web at http://www.phparch.com!
>
>   
>---
>
> Subject: [PHP] Session: I RTFM
> Date: Sat, 14 Dec 2002 18:41:40 -0500
> From: John Taylor-Johnston <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Organization: FLSH, U-de-S
> To: [EMAIL PROTECTED]
>
> >Jason wrote:
> >RTFM again.
>
> Jason, again, I RTFM, but did not get it working.
> Otherwise I wouldn't have dared ask a question.
>
> >Sessions depends on a number of factors
> >including your version of PHP and the setting of register_globals.
>
> The FM manual says:
>
> "$_SESSION (or $HTTP_SESSION_VARS with PHP 4.0.6 or less) is recommended"
>
> So I am using "PHP Version 4.1.2" (and "4.2.3" on my localhost to test offline)
>
> Ok. I quit using $HTTP_POST_VARS["familyname"].
>
> With a little rethinking, I have this working, I hope.
>
> Now ... is there a cleaner way to assign my variable "familyname"?
>
> Pseudo code:
>
> if _post["familyname"] exists set session variable
>  (no sense in setting it until I post it)
> if _session["familyname"] exists, $familyname = $_SESSION["familyname"];
>
> I'll have about 30 variables. Going to be alot of lines. There must be an easier, 
>cleaner way?
>
>  #session_name("TestALS");
> session_start();
>
> if (isset($_POST["familyname"]))
> {
> session_register("familyname");
> $familyname = $_POST["familyname"];
> echo "Yay: \$familyname= $familyname";
> }
>
> if (isset($_SESSION["familyname"]))
> {
> $familyname = $_SESSION["familyname"];
> echo "yay session works, \$familyname= $familyname";
> }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



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



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


Re: [PHP] Session: I RTFM

2002-12-15 Thread michael kimsal
Marco Tabini wrote:

Single quotes are normal strings. Double quotes are strings in which
substitutions can take place. For example:



Double quotes also expand escape strings (e.g."\n") whereas single
quotes don't.


However, in a case like this:

--
What is the difference between:
$familyname = getvar("familyname");
and
$familyname = getvar('familyname');
--

There's no effective difference.

:)

Good magazine Marco - keep it up!

Michael Kimsal
http://www.phpappserver.com
734-480-9961


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




[PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Leif K-Brooks
Is there a way to find out exactly what HTTP request was made for a 
page?  Something like:
GET http://myserver.com/whatever.php HTTP/1.1
Host: myserver.com

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



[PHP] AIM and PHP

2002-12-15 Thread John Meyer
does anybody know of a class or a PEAR module to check the status of an AIM
user and see if they are online or offline.


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




Re: [PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Hatem Ben
$url = "http://myserver.com";;

$sockhandle = @fsockopen($url, 80, &$errno, &$errstr);
if(!$sockhandle) {
$mes = "server $url not available!";
$result = "$mes";
return $result;
} else {
$request = "GET / HTTP/1.1\r\n";
$request .= "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows
98)\r\n";
$request .= "Host: $url\r\n";
$request .= "Connection: Close\r\n\r\n";
fputs($sockhandle, $request);
$res = "";
$line = fgets($sockhandle, 1024); //Request Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Close Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Server Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Date
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Transfer-Encoding
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Content-Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Cache-control
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Set-Cookie
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //End Header "space"
$res .= "$line\n";
$res = addslashes($res);
return $res;

- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 15, 2002 4:54 PM
Subject: [PHP] Getting full HTTP request the page was requested with?


> Is there a way to find out exactly what HTTP request was made for a
> page?  Something like:
> GET http://myserver.com/whatever.php HTTP/1.1
> Host: myserver.com
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] New PHP Editor/IDE Project

2002-12-15 Thread Hidayet Dogan
Hello,

I'm going to write a new PHP editor/ide, it named 'PHP Express'.
I opened new website for this project. http://www.phpexpress.com
and i created a small voting about 'user interface'. If you want
to support me and/or if you have an idea for this project you can
connect this web site and vote or you can send me your ideas.

Thanks for interest and have a good programming with PHP.

PHP Express Project Web Site: http://www.phpexpress.com
Hidayet Dogan: http://www.hido.net

 Hidayet Dogan
  [EMAIL PROTECTED]

Pleksus Bilisim Teknolojileri D.T.O. A.S.
--
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006


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




[PHP] Getting a field value

2002-12-15 Thread drparker
I'm adding information with the INSERT command to 2 tables.  In the
first table, called "courses", I have a field called "course_id" that is
an auto-increment - assigned by the table.  In the second table, called
"par", I have a field also called "course_id".   I need to assign to
this field the value that is assigned for "course_id" in the "courses"
table.  The problem is, I don't know what it is going to assign, and I
can't get the variable with a query such as "SELECT * FROM counties
WHERE course_id = ##" because I don't know what number is going to be
assigned as the course_id.  Basically, I need to store the that
course_id value of the course I just added in a a variable, and I don't
know how to retrieve that variable.

Any help would be greatly appreciated...


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




[PHP] JPG from Blob to HTML

2002-12-15 Thread Miro Kralovic
Hi,

I have few images in PostgreSQL Blob field that I want to retrieve and put
on HTML page. Is there a way how can I do it directly from blob, or I have
to copy it into tmp file first and then use  tags in html?

TIA,
miro.



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




Re: [PHP] JPG from Blob to HTML

2002-12-15 Thread Jason Wong
On Monday 16 December 2002 01:33, Miro Kralovic wrote:

* Bad thread start
\__

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

> I have few images in PostgreSQL Blob field that I want to retrieve and put
> on HTML page. Is there a way how can I do it directly from blob, or I have
> to copy it into tmp file first and then use  tags in html?

You can output it directly. Just send the appropriate headers beforehand. 
Search archives for details.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson
*/


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




Re: [PHP] Getting a field value

2002-12-15 Thread Jason Wong
On Monday 16 December 2002 01:22, drparker wrote:

This is the type of question that is best asked on the php-db list. 

> I'm adding information with the INSERT command to 2 tables.  In the
> first table, called "courses", I have a field called "course_id" that is
> an auto-increment - assigned by the table.  In the second table, called
> "par", I have a field also called "course_id".   I need to assign to
> this field the value that is assigned for "course_id" in the "courses"
> table.  The problem is, I don't know what it is going to assign, and I
> can't get the variable with a query such as "SELECT * FROM counties
> WHERE course_id = ##" because I don't know what number is going to be
> assigned as the course_id.  Basically, I need to store the that
> course_id value of the course I just added in a a variable, and I don't
> know how to retrieve that variable.

If you're using MySQL you can use mysql_insert_id(). If you're using some 
other DBMS then have a look at the manual to see whether there is a similar 
function.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Pardo's First Postulate:
Anything good in life is either illegal, immoral, or fattening.

Arnold's Addendum:
Everything else causes cancer in rats.
*/


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




RE: [PHP] JPG from Blob to HTML

2002-12-15 Thread Miro Kralovic
ops, sorry for that..

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 15, 2002 12:39
To: [EMAIL PROTECTED]
Subject: Re: [PHP] JPG from Blob to HTML


On Monday 16 December 2002 01:33, Miro Kralovic wrote:

* Bad thread start
\__

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

> I have few images in PostgreSQL Blob field that I want to retrieve and put
> on HTML page. Is there a way how can I do it directly from blob, or I have
> to copy it into tmp file first and then use  tags in html?

You can output it directly. Just send the appropriate headers beforehand.
Search archives for details.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson
*/


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


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




Re: [PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Leif K-Brooks
Thanks, but I'm trying to see what the client sent to get my page, not 
what a host returns when I send it a request...

Hatem Ben wrote:

$url = "http://myserver.com";;

$sockhandle = @fsockopen($url, 80, &$errno, &$errstr);
if(!$sockhandle) {
$mes = "server $url not available!";
$result = "$mes";
return $result;
} else {
$request = "GET / HTTP/1.1\r\n";
$request .= "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows
98)\r\n";
$request .= "Host: $url\r\n";
$request .= "Connection: Close\r\n\r\n";
fputs($sockhandle, $request);
$res = "";
$line = fgets($sockhandle, 1024); //Request Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Close Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Server Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Date
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Transfer-Encoding
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Content-Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Cache-control
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Set-Cookie
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //End Header "space"
$res .= "$line\n";
$res = addslashes($res);
return $res;

- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 15, 2002 4:54 PM
Subject: [PHP] Getting full HTTP request the page was requested with?


 

Is there a way to find out exactly what HTTP request was made for a
page?  Something like:
GET http://myserver.com/whatever.php HTTP/1.1
Host: myserver.com

--
The above message is encrypted with double rot13 encoding.  Any
   

unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
 


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



 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.





[PHP] PHP/MySQL Query

2002-12-15 Thread Steven M
How do i make a form that will allow me to add 2 to the value of a MySQL
field?  I am trying to change it from 75 to 77.  Is this possible?

Thanks



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




Re: [PHP] PHP/MySQL Query

2002-12-15 Thread Leif K-Brooks
mysql_query("update table set field=field+1 where whatever='whatever'");

Steven M wrote:


How do i make a form that will allow me to add 2 to the value of a MySQL
field?  I am trying to change it from 75 to 77.  Is this possible?

Thanks



 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




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




[PHP] Problems with "ftp_put()", .in.-file already exists

2002-12-15 Thread Tobias Schlitt
Hi all!

I've written some small FTP-Class, which i would like to 
release into PEAR.
The class covers a method, to recursively up- and download whole
directories. But everytime i try running the method over the 
whole PEAR-API-Doc, i generated with phpdoc, i get the 
following error, even, if the upload-directory is empty:
-- snip --
ftp_put():
/public_html/privat/pear/XML/XML_Transformer_Namespace_PHP.html:
Temporary hidden file
/public_html/privat/pear/XML/.in.XML_Transformer_Namespace_PHP.html.
already exists in /usr/lib/php/pear/Net/FTP.php on line
498
-- snip --

You can find the class here (for error-reviewing):
http://www.schlitt-design.de/ftp.zip.

Thans a lot for every help!
Regards,
Toby
-- 


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




[PHP] Socket_connect() timeout

2002-12-15 Thread Max Clark
Warning: socket_connect() unable to connect [60]: Operation timed out in
/usr/home/maxc/public_html/admin/functions.inc on line 66

Is there any way to time out this function? I only want to wait 5 seconds.

Thanks in advance,
Max

"Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Friday 13 December 2002 21:30, Max Clark wrote:
> I found the socket_create function that is listed as experimental and
> requires a re-compile of php. Is there a built in way to perform this kind
> of test?


Based upon the second example on
http://www.php.net/manual/en/ref.sockets.php :

echo "TCP/IP Connection\n";

/* Get the service for TCP-Port 25. */
$service_port = getservbyport (25, 'tcp');

/* Get the IP address for the target host. */
$address = gethostbyname ('www.example.com');

/* Create a TCP/IP socket. */
$socket = socket_create (AF_INET, SOCK_STREAM, 0);
if ($socket < 0) {
echo "socket_create() failed: reason: " . socket_strerror ($socket) .
"\n";
} else {
echo "OK.\n";
}

echo "Attempting to connect to '$address' on port '$service_port'...";
$result = socket_connect ($socket, $address, $service_port);
if ($result < 0) {
echo "socket_connect() failed.\nReason: ($result) " .
socket_strerror($result) . "\n";
} else {
echo "OK.\n";
}


johannes

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






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




[PHP] PGP/PHP

2002-12-15 Thread Jonathan
I have necessary PGP client software on my machine and have tested the
functionality of PGP from my site, however, I want to know how to use PHP to
send a PGP email.

This is the scenario, 

I have a shopping cart which directs to SSL, then while in SSL, the customer
will input their information, including credit card info. 

I want to show a receipt, (no cc #'s of course) and send the order to an
administrator of the site using PGP after all the information has been
gathered and send it from SSL. The site's admin will be able decrypt the
information using the client software.

Thanks in advance.
===
Jonathan Villa
Application Developer
IS Design & Development
www.isdesigndev.com  
414.429.0327
===


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


[PHP] PGP/PHP

2002-12-15 Thread Jonathan
I have necessary PGP client software on my machine and have tested the
functionality of PGP from my site, however, I want to know how to use
PHP to send a PGP email.

This is the scenario, 

I have a shopping cart which directs to SSL, then while in SSL, the
customer will input their information, including credit card info. 

I want to show a receipt, (no cc #'s of course) and send the order to an
administrator of the site using PGP after all the information has been
gathered and send it from SSL. The site's admin will be able decrypt the
information using the client software.


Thanks in advance.



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




[PHP] Re: arrays

2002-12-15 Thread drparker
this should work:

for ($i=0; $i<5; $i++) {
  $mypics[$i] = $picture;
}


Edward Peloke wrote:

> Ok, very basic question, how do I am going through a loop 5 times, each
> time, I want to store a value into an array, do I simply set the value of
>
> $picture=array($mypics);
>
> and each time it loops it will take the current value of $picture and then I
> can get out each value by $mypics[0], $mypics[1], etc?
>
> Thanks,
> Eddie


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




Re: [PHP] PHP/MySQL Query

2002-12-15 Thread Steven M
Leif

Many thanks for that, your help is much appreciated.  *smiles*

Steven M



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




[PHP] Passing text info using $PHP_SELF

2002-12-15 Thread Lightfirst
I am using PHP and MySql and wanted to know if it possible to pass the value
inserted in a text box back to the page using PHP_SELF. Bellow is the
snipped of code. The part that is not working is &q=input. Any ideas?

Thanks.



while($query_data = mysql_fetch_array($result)) {

$id = $query_data ["q_id"];

$q = $query_data ["question"];

$a = $query_data ["answer"];

echo "\n";

echo "$id\n";

echo "$q\n";

echo "\n";

echo "








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




Re: [PHP] Passing text info using $PHP_SELF

2002-12-15 Thread Jason Sheets
Rather than using forms to pass information to a script you should
consider using sessions instead.

In any case if you are going to use forms instead of appending the
information to the form action use the input type=hidden field.



This keeps your form action clean and it also allows you to cleanly use
POST instead of GET.

Jason

On Sun, 2002-12-15 at 12:23, Lightfirst wrote:
> I am using PHP and MySql and wanted to know if it possible to pass the value
> inserted in a text box back to the page using PHP_SELF. Bellow is the
> snipped of code. The part that is not working is &q=input. Any ideas?
> 
> Thanks.
> 
> 
> 
> while($query_data = mysql_fetch_array($result)) {
> 
> $id = $query_data ["q_id"];
> 
> $q = $query_data ["question"];
> 
> $a = $query_data ["answer"];
> 
> echo "\n";
> 
> echo "$id\n";
> 
> echo "$q\n";
> 
> echo " name=\"textfield\" value=$a>\n";
> 
> echo "
> 
>  action=\"$PHP_SELF?action=change&id=$id&q=input\">
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Executing a Perl/CGI program from PHP

2002-12-15 Thread Troy May
Hello,

I have a logging program I wrote in Perl that writes basic info to a MySQL
database.  I can't get it working from within PHP.  I've tried:

print "";
echo ("");
include("vislog.cgi");

Nothing works. What am I missing?

Thanks,
Troy


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




php-general Digest 15 Dec 2002 22:09:08 -0000 Issue 1765

2002-12-15 Thread php-general-digest-help

php-general Digest 15 Dec 2002 22:09:08 - Issue 1765

Topics (messages 128323 through 128346):

Re: Querying two tables
128323 by: Lars Olsson

Re: Session: I RTFM
128324 by: Marco Tabini
128325 by: michael kimsal

Getting full HTTP request the page was requested with?
128326 by: Leif K-Brooks
128328 by: Hatem Ben
128335 by: Leif K-Brooks

AIM and PHP
128327 by: John Meyer

New PHP Editor/IDE Project
128329 by: Hidayet Dogan

Getting a field value
128330 by: drparker
128333 by: Jason Wong

JPG from Blob to HTML
128331 by: Miro Kralovic
128332 by: Jason Wong
128334 by: Miro Kralovic

PHP/MySQL Query
128336 by: Steven M
128337 by: Leif K-Brooks
128343 by: Steven M

Problems with "ftp_put()", .in.-file already exists
128338 by: Tobias Schlitt

Socket_connect() timeout
128339 by: Max Clark

PGP/PHP
128340 by: Jonathan
128341 by: Jonathan

Re: arrays
128342 by: drparker

Passing text info using $PHP_SELF
128344 by: Lightfirst
128345 by: Jason Sheets

Executing a Perl/CGI program from PHP
128346 by: Troy May

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 ---
Hi!

To fetch information from several tables you usually use a join 
operation. Here's a starting point in the MySQL manual.

http://www.mysql.com/doc/en/JOIN.html

/Lars ([EMAIL PROTECTED])



Cesar Aracena wrote:
Hi all,

I have several tables from which I have to fetch certain products &
categories based on customer selection. The tables are as follows:

Table 1 - Categories
catid (autonum)
catname

Table 2 - Sub categories
subcatid (autonum)
subcatname

Table 3 - Products
prodid (autonum)
prodname

Table 4 - Relationships
Catid
Subcatid
Prodid

Now, the question is how to fetch all the sub-categories let's say that
are related to category 0001. I know it's as simple as relating two
tables in one query, but I don't remember how. Any help appreciated.


Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina






--- End Message ---
--- Begin Message ---
Single quotes are normal strings. Double quotes are strings in which
substitutions can take place. For example:



Double quotes also expand escape strings (e.g."\n") whereas single
quotes don't.

Cheers,


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

--- Begin Message ---
Marco (or anyone)

What is the difference between:
$familyname = getvar("familyname");
and
$familyname = getvar('familyname');

What do single quotes do, as a general rule, that double cannot (he asks remembering 
something, but not sure what)?




Marco Tabini wrote:

> I haven't followed the rest of the thread, but how about using a
> function?
>
> function getvar ($varname)
> {
> if (isset ($_POST[$varname])
> {
> $_SESSION[$varname] = $_POST[$varname];
> return $_POST[$varname];
> }
> elseif (isset ($_SESSION[$varname]))
> return $_SESSION[$varname];
> }
>
> session_start();
>
> // You don't need session_register anymore
>
> $familyname = getvar('familyname');
>
> and so on--just one line per variable.
>
> Hope this helps.
>
> Cheers,
>
> Marco
> --
> 
> php|architect - The Magazine for PHP Professionals
> The monthly magazine dedicated to the world of PHP programming
>
> Check us out on the web at http://www.phparch.com!
>
>   
>---
>
> Subject: [PHP] Session: I RTFM
> Date: Sat, 14 Dec 2002 18:41:40 -0500
> From: John Taylor-Johnston <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Orga

Re: [PHP] how to send an MSWORD email?

2002-12-15 Thread Chris Shiflett
--- See Kok Boon <[EMAIL PROTECTED]> wrote:
> I want to send emails that have graphics, for example
> the pub logo. I know that there are 2 ways to do so
> (maybe there are more, pls enlighten me):
> 
> 1. use html email with
>http://www.mydomain.com/logo.gif";>
> 
> 2. use MSWORD to insert the logo into the email.
>MSWORD will then send the logo.gif as an
>attachment and will ALSO use  tags.

I doubt anyone on this list is going to know what your
second method is, though I would guess that MS Word does
nothing special and does the same thing you mention in your
first method, except that it attaches the image to the
email rather than reference it via URL.

You can probably search the archives for more information
on sending HTML email as well as sending attachments, which
is all you are trying to do. I detest such email myself, so
I cannot offer any help.

Chris

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




[PHP] select * From ????

2002-12-15 Thread Bruce Levick
Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.

I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the request loops.

Print "$row[titletext]";
Print "$row[img]";

The code inplace seems all ok, but for some reason I am only being
returned the value of "titletext" and not also the value of "img". Am I
to be setting a new value for returning the info within "img"?? (eg
$row2).

I am sorry if this is hard to understand and also a silly Q, I am two
days into learning this stuff. All I want to do is to return these two
values from within the table. "titletext" and "img". They are both text
fields.

Cheers


  


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




Re: [PHP] how to send an MSWORD email?

2002-12-15 Thread Andy Turegano
The easiest way to include a picture in the email would be through the
html. The second way sounds much more complex. Right now, I really don't
know of any other ways. Perhaps copy and paste?


On Sun, 15 Dec 2002, Chris Shiflett wrote:

> --- See Kok Boon <[EMAIL PROTECTED]> wrote:
> > I want to send emails that have graphics, for example
> > the pub logo. I know that there are 2 ways to do so
> > (maybe there are more, pls enlighten me):
> >
> > 1. use html email with
> >http://www.mydomain.com/logo.gif";>
> >
> > 2. use MSWORD to insert the logo into the email.
> >MSWORD will then send the logo.gif as an
> >attachment and will ALSO use  tags.
>
> I doubt anyone on this list is going to know what your
> second method is, though I would guess that MS Word does
> nothing special and does the same thing you mention in your
> first method, except that it attaches the image to the
> email rather than reference it via URL.
>
> You can probably search the archives for more information
> on sending HTML email as well as sending attachments, which
> is all you are trying to do. I detest such email myself, so
> I cannot offer any help.
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
can you post some more of your code? I think, if it's not too big, the
entire while loops

Martin


-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From 


Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.

I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the request loops.

Print "$row[titletext]";
Print "$row[img]";

The code inplace seems all ok, but for some reason I am only being
returned the value of "titletext" and not also the value of "img". Am I
to be setting a new value for returning the info within "img"?? (eg
$row2).

I am sorry if this is hard to understand and also a silly Q, I am two
days into learning this stuff. All I want to do is to return these two
values from within the table. "titletext" and "img". They are both text
fields.

Cheers


  


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

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




Re: [PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Chris Shiflett
--- Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Thanks, but I'm trying to see what the client sent to
> get my page, not  what a host returns when I send it
> a request...

:-)

I think he misunderstood your question or something.

There are a few different ways to do what you want to do.
First, if you dig through the output of phpinfo(), you can
usually determine what the exact request was, though it is
not going to be obvious unless you know what you are
looking for. In the case of a POST request, you will need
to have always_populate_raw_post_data turned on in your
php.ini to see the POST data.

Another method is to use a utility such as tcpdump on your
Web server. This works very well except when you need to
capture a specific HTTP request on a busy site.

The method I choose is to use software specifically created
for this purpose. Most software to do this functions as an
HTTP proxy, so that you configure your browser to use it
for a proxy, and it reveals the HTTP requests and responses
that pass through. I wrote a basic one of these that embeds
the HTTP transaction into the page itself, so that you do
not need to reference a log and can just scroll to the
bottom of each page to see both the request and response.
It is written in PHP (as a CLI application), and you are
welcome to take a look and see if it would be useful to you
- http://protoscope.org/.

Chris

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




[PHP] Re: Querying two tables

2002-12-15 Thread Javier
[EMAIL PROTECTED] (Cesar Aracena) wrote in news:005801c2a3c6$8ac4f190
$4200a8c0@NOTEBOOK:

And the subcategories are related to categories with the Relationships 
table?

If that's the case:
SELECT * FROM Relationships WHERE CatId = '1'

And if you want the names.
SELECT * FROM Subcategories as sc, Relationships as r
WHERE r.CatId = 'minumber' and r.SubCatId = sc.subcatid


> Hi all,
> 
> I have several tables from which I have to fetch certain products &
> categories based on customer selection. The tables are as follows:
> 
> Table 1 - Categories
> catid (autonum)
> catname
> 
> Table 2 - Sub categories
> subcatid (autonum)
> subcatname
> 
> Table 3 - Products
> prodid (autonum)
> prodname
> 
> Table 4 - Relationships
> Catid
> Subcatid
> Prodid
> 
> Now, the question is how to fetch all the sub-categories let's say that
> are related to category 0001. I know it's as simple as relating two
> tables in one query, but I don't remember how. Any help appreciated.
> 


-- 
*** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig)

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




[PHP] Re: select * From ????

2002-12-15 Thread Seraphim

> Print "$row[titletext]";
> Print "$row[img]";

check if the img field in the returned row even has a value or try:
$row[0] and $row[1] instead of $row['titletext'] and $row['img']

-Peter



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




RE: [PHP] Executing a Perl/CGI program from PHP

2002-12-15 Thread John W. Holmes
> I have a logging program I wrote in Perl that writes basic info to a
MySQL
> database.  I can't get it working from within PHP.  I've tried:
> 
> print "";
> echo ("");
> include("vislog.cgi");

Maybe virtual() ?

www.php.net/virtual

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/




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




RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
Looks good to me, but as Peter said, see if you really are getting something
in ['img']
try print_r($row) or var_dump($row) to make sure

-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 AM
To: Martin Towell
Subject: RE: [PHP] select * From 


Here is the display code that I started with.

Error performing query: " .
 mysql_error() . "");
exit();
  }


  // Display the text of each joke in a paragraph
  while ( $row = mysql_fetch_array($result) ) {
print"$row[titletext]";
print"$row[img]";
  }


?>

Not sure why it only displays just the titletext.

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 8:47 AM
To: Bruce Levick; [EMAIL PROTECTED]
Subject: RE: [PHP] select * From 


can you post some more of your code? I think, if it's not too big, the
entire while loops

Martin


-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] select * From 


Hi,
Am just a newbie at this and was going great until I have hit this smell
snag.

I am connecting to mysql and all works well there. I query a table
"Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
print the values of two columns ("titletext" & "img")within each row as
the request loops.

Print "$row[titletext]";
Print "$row[img]";

The code inplace seems all ok, but for some reason I am only being
returned the value of "titletext" and not also the value of "img". Am I
to be setting a new value for returning the info within "img"?? (eg
$row2).

I am sorry if this is hard to understand and also a silly Q, I am two
days into learning this stuff. All I want to do is to return these two
values from within the table. "titletext" and "img". They are both text
fields.

Cheers


  


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

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




[PHP] Print bgcolors in table

2002-12-15 Thread Lars Espelid
Hello,

I have been looking for a newsgroup where I can post questions about
css/html. I did not find any. Any suggestions?

If you want a break from php, my problem is as follows:

Have got a table in html with different background colors on the rows. When
I print the page to my printer, the colors won't show. I have tried to
specify output media, but it won't work. Tried f.ex. this:

in print.css:
@media print {
TR.graaOver { BACKGROUND-COLOR: #E5E5E5; }
  }

in report.html:
.






  
..


thanks,

Lars




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




[PHP] Re: select * From ????

2002-12-15 Thread Javier
[EMAIL PROTECTED] (Bruce Levick) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

If you want to access the data in an array try $row['field']
> I am connecting to mysql and all works well there. I query a table
> "Illustrations" ($query = "SELECT * FROM Illustrations";), and want to
> print the values of two columns ("titletext" & "img")within each row
> as the request loops.
> 
> Print "$row[titletext]";
> Print "$row[img]";

> I am sorry if this is hard to understand and also a silly Q, I am two
> days into learning this stuff. All I want to do is to return these two
> values from within the table. "titletext" and "img". They are both
> text fields.
> 



-- 
*** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig)

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




[PHP] Print text and image in the same page.

2002-12-15 Thread Naif M. Al-Otaibi
Hi all,

I try to print some information (text and image) that I retrieve from an oracle DB, 
but I got the image printed as binary junk. When I put the line that print the image 
in a  html image tag, I got a red square with "X" inside. What can I do to solve this 
problem?

This is my code:
--
";
echo "Retrieve Results";
echo "";

$conn = OCILogon("*","*","*");
$query = "select country,continent,population,area,language,capital,map from countries 
where country=";
$query .= "'$country'";
$stmt = OCIParse($conn,$query);
OCIExecute($stmt);
OCIFetchInto($stmt, &$blob);

echo "Retrieve Result:";
echo "";
echo " Country: $blob[0]";
echo "";
echo " Continent: $blob[1]";
echo "";
echo " Population: $blob[2]";
echo "";
echo " Area: $blob[3]";
echo "";
echo " Language: $blob[4]";
echo "";
echo " Capital: $blob[5]";
echo "";
echo "load()\">";
echo "";

OCIFreeStatement($stmt);
OCILogoff($conn);

echo "";
echo "";
?>
---



Re: [PHP] Print text and image in the same page.

2002-12-15 Thread Chris Shiflett
--- "Naif M. Al-Otaibi" <[EMAIL PROTECTED]> wrote:
> I try to print some information (text and image) that I
> retrieve from an oracle DB, but I got the image printed
> as binary junk. When I put the line that print the image
> in a  html image tag, I got a red square with "X" inside.
> What can I do to solve this problem?

This is really just an HTML question. The  tag has an
attribute called src that should be given a URL as a value.
The URL should be an image. For example:

http://www.php.net/gifs/php_snow.gif";>

On the other hand, if you want to dump the raw image to the
browser and expect it to render it properly, you must tell
it that you are sending an image. For example:

header("Content-Type: image/gif");

Chris

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




Re: [PHP] how to send an MSWORD email?

2002-12-15 Thread Jonathan Sharp
search google for RFC HTML email, or look at phpmailer.sourceforge.net. 

It's roughly along the lines of: 


Subject: My html email
Content-type: multipart/mime
Content-boundry(): BOUNDRY-ABC

---BOUNDRY-ABC---
Content-type: text/html
...more headers...

Hello! This is an html email with an image -> cid:abc123";>


---BOUNDRY-ABC---
Content-type: image/jpeg
Content-id: abc123
Content-encoding: base64

BKJSDFIWEIJELFJSELIFJEL


On Sun, 15 Dec 2002 14:35:48 -0800 (PST) Chris Shiflett wrote:
> --- See Kok Boon <[EMAIL PROTECTED]> wrote:
> > I want to send emails that have graphics, for example
> > the pub logo. I know that there are 2 ways to do so
> > (maybe there are more, pls enlighten me):
> > 
> > 1. use html email with
> >http://www.mydomain.com/logo.gif";>
> > 
> > 2. use MSWORD to insert the logo into the email.
> >MSWORD will then send the logo.gif as an
> >attachment and will ALSO use  tags.
> 
> I doubt anyone on this list is going to know what your
> second method is, though I would guess that MS Word does
> nothing special and does the same thing you mention in your
> first method, except that it attaches the image to the
> email rather than reference it via URL.
> 
> You can probably search the archives for more information
> on sending HTML email as well as sending attachments, which
> is all you are trying to do. I detest such email myself, so
> I cannot offer any help.
> 
> Chris
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 



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




Re: [PHP] Executing a Perl/CGI program from PHP

2002-12-15 Thread Jonathan Sharp
You're trying to mix two different things. SSI (Server Side Includes) and PHP. 

The page you're calling gets parsed ONLY by PHP. So echoing #exec won't work.

Look at the virtual() function ~~> http://php.net/virtual

-js


On Sun, 15 Dec 2002 14:10:17 -0800 Troy May wrote:
> Hello,
> 
> I have a logging program I wrote in Perl that writes basic info to a MySQL
> database.  I can't get it working from within PHP.  I've tried:
> 
> print "";
> echo ("");
> include("vislog.cgi");
> 
> Nothing works. What am I missing?
> 
> Thanks,
> Troy
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 



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




Re: [PHP] Simple text editor for Windows?

2002-12-15 Thread David T-G
John --

...and then John W. Holmes said...
% 
% I know the text editor question has been beat to death, but I'm looking

Heh.


% for a simple editor with syntax highlighting that can be installed in
% Windows by a general user. It would have to be something that didn't
% access the registry, as normal users can't do that. Does anyone know of
% a program like this? Thanks.

gvim and vim, hands-down.


% 
% ---John Holmes...
% 
% PS: Yes, I already know what program you use and it's the best and I use
% it every day to... does it answer the question above?? ;)

Of course it does :-)


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg89684/pgp0.pgp
Description: PGP signature


Re: [PHP] Simple text editor for Windows?

2002-12-15 Thread Chris Shiflett
I would recommend UltraEdit:

http://www.ultraedit.com/

Chris

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




Re: [PHP] approaching a relational database

2002-12-15 Thread David T-G
Doug --

...and then Doug Parker said...
% 
% I'm about to embark on a project where I have to enter many, many fields 
% into a MySQL database, and I don't know how to approach the database 
...
% 
% Any suggestions would be greatly appreciated...

Have you asked on the mysql list?  I'd think that that's a better place
to start...


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg89686/pgp0.pgp
Description: PGP signature


RE: [PHP] how to send an MSWORD email?

2002-12-15 Thread See kok Boon
Hi jonathan,

Just to let you know, there is no image in
"an html email with an image -> cid:abc123";> "

in you last email replying to this same subject. Maybe you should check
again?

But thanks for you reply anyway. I got my answer at pear.php.net. also,
thanks to 

Cheers.

-Original Message-
From: Jonathan Sharp [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 10:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how to send an MSWORD email?

search google for RFC HTML email, or look at phpmailer.sourceforge.net. 

It's roughly along the lines of: 


Subject: My html email
Content-type: multipart/mime
Content-boundry(): BOUNDRY-ABC

---BOUNDRY-ABC---
Content-type: text/html
...more headers...

Hello! This is an html email with an image -> cid:abc123";>


---BOUNDRY-ABC---
Content-type: image/jpeg
Content-id: abc123
Content-encoding: base64

BKJSDFIWEIJELFJSELIFJEL


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




[PHP] could an audio streaming reflector be written in php?

2002-12-15 Thread Kendal
I would like to stream audio data from a low bandwidth computer to a high 
bandwidth server, and then have listeners connect and listen via the high 
bandwidth server.

In java I would have a small process run on the server that would receive 
the audio stream and echo a copy of it down to each listener.

Since PHP is so widely supported on servers, I find myself wondering if the 
same thing has been done, or could be done, through PHP?

Thanks,
Kendal
http://www.freedomaudio.com


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



[PHP] Can php auto execute it's script in schedule without opening a webpage?

2002-12-15 Thread Jack
Dear all
I just wonder did anyone know if php can act as a scheduler rather than
execute script manually?
i want to set a schedule for php to run certain script at specify time, to
what i understood in php is : the script can only be process when a homepage
had been execute. but i want the script to be excute even no one open a
homepage contain php script in it!

is there anyway i can do that?

thx
Jack



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




Re: [PHP] Can php auto execute it's script in schedule without opening a webpage?

2002-12-15 Thread Chris Shiflett
--- Jack <[EMAIL PROTECTED]> wrote:
> i want to set a schedule for php to run certain
> script at specify time, to what i understood in
> php is : the script can only be process when a
> homepage had been execute. but i want the script
> to be excute even no one open a homepage contain
> php script in it!
> 
> is there anyway i can do that?

Sure, though it varies depending on your platform.

Assuming you are on Unix, it is likely that you already
have a CLI (command line interface) PHP installed
somewhere. You can use this to create a PHP script that can
be executed like any other shell script. Just put something
like this at the top:

#! /usr/bin/php -q

Be sure it points to the location of your PHP parser
(/usr/bin/php in this example).

To automate scripts, look into cron:

man cron
man crontab

Good luck.

Chris

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




[PHP] notice prevents setting cookie in 4.3.0RC2?

2002-12-15 Thread Alex Pukinskis
I've been having trouble with a script that works fine in 4.1 and
4.2.3, but doesn't work in 4.3.0RC2.  It seems that if your script
generates a php notice (which is logged, not displayed to the screen)
something gets output anyway; this prevents setting cookies.  Here's
the simplest example I could come up with:



Since $undefinedVariable is undefined, we get the following in the
server log:

PHP Notice:  Undefined variable:  undefinedVariable in
/home/www/dev/pLogin.php on line 2

which is fine; unfortunately, it's followed by:

PHP Warning:  Cannot modify header information - headers already sent
in /home/www/dev/pLogin.php on line 3

This shouldn't happen because display_errors is set to Off (which to me
means that nothing should be output to the user when there is a notice.

Can someone who's running 4.3.0RC3 try this script? (You probably have
to make sure error_reporting  is set to  E_ALL).  If this has been
fixed in RC3, it should say "Cookie set".  If it says "Could not set
cookie", it seems to me like this bug should be reported.

By the way, is there any easy way to see what's changed in pre-release
versions of PHP, short of digging through the CVS logs?

-Alex



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




Re: [PHP] Passing text info using $PHP_SELF

2002-12-15 Thread Ernest E Vogelsinger
At 20:23 15.12.2002, Lightfirst said:
[snip]
>I am using PHP and MySql and wanted to know if it possible to pass the value
>inserted in a text box back to the page using PHP_SELF. Bellow is the
>snipped of code. The part that is not working is &q=input. Any ideas?
>
>action=\"$PHP_SELF?action=change&id=$id&q=input\">
[snip] 

Most certainly register_globals is off in your php.ini file. Try using
$_SERVER['PHP_SELF'] instead of $PHP_SELF.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




[PHP] to php or to perl, that is the question

2002-12-15 Thread David T-G
Hi, all --

I am starting a project that will have a web front end and mysql back end
and handle staff input (eg not general web surfers, though an Internet face
may come about one day)and updating for client records and scheduling.  I
am comfortable with both perl and php (and expect to be much more so with
at least one of them by the project's maturity :-)

In general, is there a checklist of when to use perl and when to use php
in a web site design?  Perhaps a comparison of the two languages, like I
think I've seen long ago for C, Pascal, assembler, perl, and python?

I read both lists (as I'm able, anyway; Hi perl guys!) and so you can
reply to either or both of the lists or just to me as you see fit.  I'll
be happy to post a summary of any answers or directions I get.


TIA & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg89697/pgp0.pgp
Description: PGP signature


Re: [PHP] to php or to perl, that is the question

2002-12-15 Thread Rasmus Lerdorf
Folks, even if perhaps not intended as a troll, the effect will be the
same.  Please refrain from cross-posting dozens of messages.

David, pick whichever language you are more comfortable with.  There is
pretty much nothing in one that can't be done in the other.  It's like
asking the Beef and Pork industries what to have for dinner tonight.

-Rasmus

On Sun, 15 Dec 2002, David T-G wrote:

> Hi, all --
>
> I am starting a project that will have a web front end and mysql back end
> and handle staff input (eg not general web surfers, though an Internet face
> may come about one day)and updating for client records and scheduling.  I
> am comfortable with both perl and php (and expect to be much more so with
> at least one of them by the project's maturity :-)
>
> In general, is there a checklist of when to use perl and when to use php
> in a web site design?  Perhaps a comparison of the two languages, like I
> think I've seen long ago for C, Pascal, assembler, perl, and python?
>
> I read both lists (as I'm able, anyway; Hi perl guys!) and so you can
> reply to either or both of the lists or just to me as you see fit.  I'll
> be happy to post a summary of any answers or directions I get.
>
>
> TIA & HAND
>
> :-D
> --
> David T-G  * There is too much animal courage in
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
> http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
>
>


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