php-general Digest 15 Nov 2001 14:41:10 -0000 Issue 996

Topics (messages 74660 through 74711):

Controlling length of table data
        74660 by: Gaylen Fraley
        74661 by: Martin Towell
        74666 by: Johan Holst Nielsen

PHP 4.0.6 $PHP_SELF empty?
        74662 by: John Steele
        74663 by: David Robley
        74665 by: John Steele

Re: gd-lib and libjpeg issues
        74664 by: David Robley

Re: Session help
        74667 by: Johan Holst Nielsen

Re: mail() function
        74668 by: Johan Holst Nielsen

PHP + apache .htaccess
        74669 by: EnriGA
        74670 by: Johan Holst Nielsen
        74671 by: EnriGA
        74672 by: Johan Holst Nielsen
        74674 by: EnriGA

Session
        74673 by: jtjohnston
        74688 by: Rudolf Visagie

I suck at regular expressions!
        74675 by: Richard S. Crawford
        74677 by: Johan Holst Nielsen
        74681 by: Richard S. Crawford
        74684 by: Johan Holst Nielsen
        74697 by: _lallous

how can I get the post content in php
        74676 by: Yorgo Sun
        74678 by: Johan Holst Nielsen
        74679 by: Yorgo Sun
        74680 by: Johan Holst Nielsen
        74682 by: Yorgo Sun
        74685 by: Johan Holst Nielsen
        74686 by: Yorgo Sun
        74689 by: Johan Holst Nielsen
        74690 by: Yorgo Sun
        74694 by: Andrey Hristov
        74695 by: Tamas Arpad
        74696 by: Yorgo Sun
        74708 by: JSheble

I have tried ...
        74683 by: jtjohnston

And ...
        74687 by: jtjohnston

Re: [PHP-I18N] Re: [PHP-WIN] how to get php_gettext.dll work on windows2000 / iis5 
server?
        74691 by: Hace
        74699 by: Hace

multiple include
        74692 by: Briet Vincent
        74693 by: Papp Gyozo

pls help: add new extension to PHP (rpm) on RedHat
        74698 by: S.T. Wong

Serious problem with Cookies..
        74700 by: PHPGalaxy.com
        74701 by: _lallous
        74702 by: PHPGalaxy.com
        74704 by: Magnus
        74705 by: PHPGalaxy.com
        74706 by: _lallous

Re: NO CARGA PAGINA PHP
        74703 by: Ricardo Núñez

fsockopen - whats the syntax of POST?
        74707 by: Stefan

Jump to internal link after $PHP_SELF post
        74709 by: Rob van Jaarsveld
        74710 by: Boget, Chris
        74711 by: Rob van Jaarsveld

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 ---
This is really a combination html/php question, I believe.  The problem is
that I have a table that displays a field of text that can be several
hundred bytes long.  If, however, someone holds down a key and produces 500
letter 'x' the table data then distorts the table!  Since the length of the
data needs to be several hundred bytes, is there someway to either control
the table data width so that the length of a non breaking string of
characters will not distort the table, or is there a php string function to
break the sentence into words and then I'd have to build some logic to test
the length?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite



--- End Message ---
--- Begin Message ---
if you're going to go the "break string in words" way, then try
$words = explode(" ", $string);

-----Original Message-----
From: Gaylen Fraley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 2:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Controlling length of table data


This is really a combination html/php question, I believe.  The problem is
that I have a table that displays a field of text that can be several
hundred bytes long.  If, however, someone holds down a key and produces 500
letter 'x' the table data then distorts the table!  Since the length of the
data needs to be several hundred bytes, is there someway to either control
the table data width so that the length of a non breaking string of
characters will not distort the table, or is there a php string function to
break the sentence into words and then I'd have to build some logic to test
the length?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> This is really a combination html/php question, I believe.  The problem is
> that I have a table that displays a field of text that can be several
> hundred bytes long.  If, however, someone holds down a key and produces
> 500
> letter 'x' the table data then distorts the table!  Since the length of
> the data needs to be several hundred bytes, is there someway to either
> control the table data width so that the length of a non breaking string
> of characters will not distort the table, or is there a php string
> function to break the sentence into words and then I'd have to build some
> logic to test the length?

Use wordwrap() ?

Regards,

Johan
--- End Message ---
--- Begin Message ---
Hello,

  I just updated to v4.0.6 on win9x.  Suddenly all my form-action scripts using 
$PHP_SELF quit working, as it's empty.  Anyone know how to fix this?

Thanks,
  John
--
/* SteeleSoft Consulting     John Steele - Systems Analyst/Programmer
 *  We also walk dogs...  Dynamic Web Design  PHP/MySQL/Linux/Hosting
 *  www.steelesoftconsulting.com     [EMAIL PROTECTED]
 */
--- End Message ---
--- Begin Message ---
On Thu, 15 Nov 2001 06:53, John Steele wrote:
> Hello,
>
>   I just updated to v4.0.6 on win9x.  Suddenly all my form-action
> scripts using $PHP_SELF quit working, as it's empty.  Anyone know how
> to fix this?
>
> Thanks,
>   John

Presumably in the process your php.ini was updated? Check umm, I think it 
is register_globals

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   "I flatly deny this," said Tom under pressure.
--- End Message ---
--- Begin Message ---
Hi David,

  No, I updated my php.ini manually (just to change the zend optimizer and add the DBG 
debugger.  These two lines from php.ini haven't changed for sure:

variables_order = "EGPCS";
register_globals = On;

  According to phpinfo, $PHP_SELF is set, but simply empty!
John

>> Hello,
>>
>>   I just updated to v4.0.6 on win9x.  Suddenly all my form-action
>> scripts using $PHP_SELF quit working, as it's empty.  Anyone know how
>> to fix this?
>>
>> Thanks,
>>   John
>
>Presumably in the process your php.ini was updated? Check umm, I think it 
>is register_globals
>
>-- 
>David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
>CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
>
>   "I flatly deny this," said Tom under pressure.

--
/* SteeleSoft Consulting     John Steele - Systems Analyst/Programmer
 *  We also walk dogs...  Dynamic Web Design  PHP/MySQL/Linux/Hosting
 *  www.steelesoftconsulting.com     [EMAIL PROTECTED]
 */
--- End Message ---
--- Begin Message ---
On Thu, 15 Nov 2001 05:29, Bill Brennick wrote:
> Hi all...   Having an issue with PHP recognizing the libgd and libjpeg
> libraries... I specifically downloaded the newest version(s) of those,
> and compiled the PHP 4.0.6 with:
>
> ./configure --with-mysql=/usr/local/mysql
> --with-apache=../apache_1.3.22 --with-xml --with-zlib
> --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
>
>
> However,  I still keep getting the following message everytime I use
> an app that uses GD (For example, jpgraph)
>
> "Your PHP (and GD-lib) installation does not appear to support any
> known graphic formats.You need to first make sure GD is compiled as a
> module to PHP. If you also want to use JPEG images you must get the
> JPEG library. Please see the PHP docs for details."
>
> Have looked into everything:   php.ini's, apache config's, etc...
>
> At a loss...
>
> Thanks...
> - Bill

Rasmus posted this suggesation a while back - it worked for me.

> Has anyone got PHP successfully compiled and using GD 2.0.1?
>
> If so what was your configure line please and any other changes you had 
to
> make in order to get PHP to compile. Thanks.


Build gd-2.0.1 with these two lines in your GD2 Makefile:

CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm

Don't install the lib anywhere, just leave them in the gd-2.0.1 directory.

Then build PHP using:

--with-gd=/home/<your_dir>/gd-2.0.1
--with-freetype-dir=/usr
--enable-gd-native-ttf   (note there was a typo in 4.0.6 on this one)
                          use: --enable-gd-native-tt  if you are using 
4.0.6
--enable-gd-imgstrttf
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-xpm-dir=/usr/X11R6

This assumes that you have freetype2 installed along with the libjpeg and
libpng libs under /usr

-Rasmus

Keep an eye on the output of configure as sometimes you'll see messages 
in there about the image libs - but the absence of same even if specified 
doesn't seem to crash the compilation.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   And now for something completely the same...
--- End Message ---
--- Begin Message ---
> Start at index.html. It goes to postcard.php. When I click on submit in
> postcard.php, if I change any of the values in the form, the session
> values received in send_mail.php do not change. Anyone have an idea what
> I have done wrong now?
> 

Try to make a session_unregister(), and make session_register() again with 
the new values.

Think it will help you :o)

Regards,

Johan

--- End Message ---
--- Begin Message ---
> $mailheaders = "From: \"Do Not Reply\"\r\nReply-To: Do Not Reply@Do Not
> Reply\n";
>  
> If I use the above headers it says from "Do Not [EMAIL PROTECTED]"
>  
> Does anyone know how to make it just say "Do Not Reply"?

You cant... but try making it like this:

$mailheaders = "FROM: Do Not Reply <DoNotReply@localhost>\nREPLY-TO: 
<DoNotReply@localhost>";

regards,

Johan
--- End Message ---
--- Begin Message ---
Dear all
    I dunno this post is in right group or not.If no, please ignore.
    I am a user that use Linux, apache with PHP + mySQL. I have already
written
a member login security system with PHP to block any unathorized user to see
my homepage.
But unfortnately, I found that if ppl know the full path of the material
(let 's say pic, movie....)
they can download externally without member login from my PHP system.

    After I research security issue from the web, I had found apache
.htaccess which can solve
my problem. What my problem is that, can .htaccess perform like a database
system which
can store users loginID and password, and also set those users have a
expired time each ??

thx


--- End Message ---
--- Begin Message ---
>     After I research security issue from the web, I had found apache
> .htaccess which can solve
> my problem. What my problem is that, can .htaccess perform like a database
> system which
> can store users loginID and password, and also set those users have a
> expired time each ??

If you want to use .htaccess can you make some links like this, to the 
customers who is logged in:
http://username:[EMAIL PROTECTED]/secretfolder/

Regards,
Johan
--- End Message ---
--- Begin Message ---
then, can .htaccess store the user expried date ?
like Peter is not allowed to login after 2Feb 2001, Sam is expired after
11Nov 2002......

and also, is it possible to maintain the .htaccess automatically ?
like I write a shell script and run it schedully to delete those expired
entry ?


"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >     After I research security issue from the web, I had found apache
> > .htaccess which can solve
> > my problem. What my problem is that, can .htaccess perform like a
database
> > system which
> > can store users loginID and password, and also set those users have a
> > expired time each ??
>
> If you want to use .htaccess can you make some links like this, to the
> customers who is logged in:
> http://username:[EMAIL PROTECTED]/secretfolder/
>
> Regards,
> Johan


--- End Message ---
--- Begin Message ---
> then, can .htaccess store the user expried date ?
> like Peter is not allowed to login after 2Feb 2001, Sam is expired after
> 11Nov 2002......

Yes and no. You just have to make a change in the .htaccess file.

> and also, is it possible to maintain the .htaccess automatically ?
> like I write a shell script and run it schedully to delete those expired
> entry ?

Yes it a possibility. Think you can make it with a simply fopen() fwrite(), 
with the cron daemon.

The other possibility is to make a folder outside webscope.
Then you can make a loginscript in mysql like:

<?php
$connection = mysql_connect("host", "user", "pwd");
mysql_select_db("db");
$query = "SELECT id FROM users WHERE user = '$user' AND pwd = '$pwd'":
$result = mysql_query($query);
if(mysql_num_rows($result) > 0) {
    header("Content-type: you choose");
    header("Content-length: filesize('/home/filename')");
    header("Content-Disposotion: inline; filename=filename.tar.gz");
    readfile("/home/filename");
}
else {
   echo "you are not allowed to download this file!":
}
?>
Regards,
Johan
--- End Message ---
--- Begin Message ---
Thanks very much ! I think I've got the way !

^_^

"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > then, can .htaccess store the user expried date ?
> > like Peter is not allowed to login after 2Feb 2001, Sam is expired after
> > 11Nov 2002......
>
> Yes and no. You just have to make a change in the .htaccess file.
>
> > and also, is it possible to maintain the .htaccess automatically ?
> > like I write a shell script and run it schedully to delete those expired
> > entry ?
>
> Yes it a possibility. Think you can make it with a simply fopen()
fwrite(),
> with the cron daemon.
>
> The other possibility is to make a folder outside webscope.
> Then you can make a loginscript in mysql like:
>
> <?php
> $connection = mysql_connect("host", "user", "pwd");
> mysql_select_db("db");
> $query = "SELECT id FROM users WHERE user = '$user' AND pwd = '$pwd'":
> $result = mysql_query($query);
> if(mysql_num_rows($result) > 0) {
>     header("Content-type: you choose");
>     header("Content-length: filesize('/home/filename')");
>     header("Content-Disposotion: inline; filename=filename.tar.gz");
>     readfile("/home/filename");
> }
> else {
>    echo "you are not allowed to download this file!":
> }
> ?>
> Regards,
> Johan


--- End Message ---
--- Begin Message ---
Hi,

I have read: http://www.php.net/manual/en/function.session-register.php

Could I ask you a question about how to set a session $vars in a <FORM>?
It seems to be quite a mystery/controversy!!

This is my problem:
http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.php

Type something.
Press submit.
Change your text and re-submit.

$name doesn't re-save itself. This is my code:
http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.phps

Would you have any suggestions?
It can't be that complicated can it?

J.T-Johnston


--- End Message ---
--- Begin Message ---
The problem lies with the fact that you have a variable 'name' that gets
posted in the form as well as a session variable 'name' that is passed to
the script when it is executed again. As far as I remember the session
variable supercedes the posted variable, so the session variable would
overwrite the value of the posted variable every time. You need to register
the session variable with another name and then toggle between the two
variables in you script.

Also, a session variable need only be registered once:
if (!session_is_registered("name")) {
        session_register("name");
}

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
Tel. +27(0)11 266 6946
Fax. +27(0)11 266 5080
Cell: +27(0)82 895 1598
E-mail: [EMAIL PROTECTED]


-----Original Message-----
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: 15 November 2001 09:08
To: [EMAIL PROTECTED]
Subject: [PHP] Session


Hi,

I have read: http://www.php.net/manual/en/function.session-register.php

Could I ask you a question about how to set a session $vars in a <FORM>?
It seems to be quite a mystery/controversy!!

This is my problem:
http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.php

Type something.
Press submit.
Change your text and re-submit.

$name doesn't re-save itself. This is my code:
http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.php
s

Would you have any suggestions?
It can't be that complicated can it?

J.T-Johnston



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I am trying to get the title of an html file... you know, the string 
between the < title > and < /title > tags...

Here is the function I've got so far:

function fileTitle($fileName) {
         $myFile = fopen($fileName, "r");
         $myText="";
         while (!feof($myFile)) {
                 $myText .= fgets($myFile,255);
         }
         fclose($myFile);
         if (eregi("<TITLE>(.+)</TITLE>",$myText,$theTitle)) return 
$theTitle[0];
         else return "(No Title)";
}

The trouble is, it always returns "(No Title)", regardless of whether the 
file has a title defined in the header or not.

I suspect I'm doing something fundamentally wrong.  Can anyone set me straight?



Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
"It is only with the heart that we see rightly; what is essential is 
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"

--- End Message ---
--- Begin Message ---
Richard S. Crawford wrote:

> I am trying to get the title of an html file... you know, the string
> between the < title > and < /title > tags...
> 
> Here is the function I've got so far:
> 
> function fileTitle($fileName) {
>          $myFile = fopen($fileName, "r");
>          $myText="";
>          while (!feof($myFile)) {
>                  $myText .= fgets($myFile,255);
>          }
>          fclose($myFile);
>          if (eregi("<TITLE>(.+)</TITLE>",$myText,$theTitle)) return
> $theTitle[0];
>          else return "(No Title)";
> }

Try:
function getTitle($filename) {
   $fp = fopen($filename, "r");
    $filecontent = fread($fp, filesize($filename));
    if(eregi("<title>(.+)</title>", $content, $title_arr)) {
        return 
addslashes(htmlspecialchars(trim(strip_tags($title_arr[1]))));
    }
    else {
        return "(No Title)";
    }
}


Regards,
Johan
--- End Message ---
--- Begin Message ---
Not quite.  I have the same problem.

At 11:36 PM 11/14/2001, Johan Holst Nielsen wrote:
>Richard S. Crawford wrote:
>
> > I am trying to get the title of an html file... you know, the string
> > between the < title > and < /title > tags...
> >
> > Here is the function I've got so far:
> >
> > function fileTitle($fileName) {
> >          $myFile = fopen($fileName, "r");
> >          $myText="";
> >          while (!feof($myFile)) {
> >                  $myText .= fgets($myFile,255);
> >          }
> >          fclose($myFile);
> >          if (eregi("<TITLE>(.+)</TITLE>",$myText,$theTitle)) return
> > $theTitle[0];
> >          else return "(No Title)";
> > }
>
>Try:
>function getTitle($filename) {
>    $fp = fopen($filename, "r");
>     $filecontent = fread($fp, filesize($filename));
>     if(eregi("<title>(.+)</title>", $content, $title_arr)) {
>         return
>addslashes(htmlspecialchars(trim(strip_tags($title_arr[1]))));
>     }
>     else {
>         return "(No Title)";
>     }
>}
>
>
>Regards,
>Johan
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
"It is only with the heart that we see rightly; what is essential is 
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"

--- End Message ---
--- Begin Message ---
Richard S. Crawford wrote:

> Not quite.  I have the same problem.

I tried at test on my localhost. Following works for me:

$string = "<html><head><title>Sometime i dont wanna 
know</title></head><body></body></html>";
if(eregi("<title>(.+)</title>", $string, $arr)) {
   echo "Title: ".$arr[1];
}
else {
   echo "unknown title";
}

This works for me?

Regards,

Johan
--- End Message ---
--- Begin Message ---
try that!
<?
$mem='
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body>

</body>
</html>
';


if (preg_match('/<title>(.+?)<\/title>/is', $mem, $matches))
{
  echo "title is:$matches[1]";
}
?>

"Richard S. Crawford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am trying to get the title of an html file... you know, the string
between the < title > and < /title > tags...

Here is the function I've got so far:

function fileTitle($fileName) {
         $myFile = fopen($fileName, "r");
         $myText="";
         while (!feof($myFile)) {
                 $myText .= fgets($myFile,255);
         }
         fclose($myFile);
         if (eregi("<TITLE>(.+)</TITLE>",$myText,$theTitle)) return
$theTitle[0];
         else return "(No Title)";
}

The trouble is, it always returns "(No Title)", regardless of whether the
file has a title defined in the header or not.

I suspect I'm doing something fundamentally wrong.  Can anyone set me
straight?



Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
"It is only with the heart that we see rightly; what is essential is
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"



--- End Message ---
--- Begin Message ---
I mean post content string not a lot of variables

etc:

aaa.html post a=1&b=2 to bbb.php

I want use php to read the string a=1&b=2 not $a and $b

thanks

--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com


--- End Message ---
--- Begin Message ---
> I mean post content string not a lot of variables
> 
> etc:
> 
> aaa.html post a=1&b=2 to bbb.php
> 
> I want use php to read the string a=1&b=2 not $a and $b

I not sure I understand you, but are you looking for
$HTTP_SERVER_VARS['QUERY_STRING'] ??

Regards,

Johan
--- End Message ---
--- Begin Message ---
$HTTP_SERVER_VARS['QUERY_STRING']  --> it just can read the content by GET
method.

I want POST content

thanx

--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com
"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I mean post content string not a lot of variables
> >
> > etc:
> >
> > aaa.html post a=1&b=2 to bbb.php
> >
> > I want use php to read the string a=1&b=2 not $a and $b
>
> I not sure I understand you, but are you looking for
> $HTTP_SERVER_VARS['QUERY_STRING'] ??
>
> Regards,
>
> Johan


--- End Message ---
--- Begin Message ---
> $HTTP_SERVER_VARS['QUERY_STRING']  --> it just can read the content by GET
> method.
> 
> I want POST content

Ah okay. Try this:

$post_query = "";
$keys_arr = array_keys($HTTP_POST_VARS);
$keys_size = sizeof($key_arr);
for($i=0; $i<$keys_size; $i++) {
    if($i == 0) {
        $post_query .= $keys_arr[$i]."=".$HTTP_POST_VARS[$keys_arr[$i]];
    }
    else {
        $post_query .= "&".$keys_arr[$i]."=".$HTTP_POST_VARS[$keys_arr[$i]];
    }
}

Regards,
Johan
--- End Message ---
--- Begin Message ---
Hello Johan
   the program just can let me get the post string like my example
I want post the xml file content to a php file, then I want get the post
string that it's xml content.

hehe, thanks for your help

--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com
"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > $HTTP_SERVER_VARS['QUERY_STRING']  --> it just can read the content by
GET
> > method.
> >
> > I want POST content
>
> Ah okay. Try this:
>
> $post_query = "";
> $keys_arr = array_keys($HTTP_POST_VARS);
> $keys_size = sizeof($key_arr);
> for($i=0; $i<$keys_size; $i++) {
>     if($i == 0) {
>         $post_query .= $keys_arr[$i]."=".$HTTP_POST_VARS[$keys_arr[$i]];
>     }
>     else {
>         $post_query .=
"&".$keys_arr[$i]."=".$HTTP_POST_VARS[$keys_arr[$i]];
>     }
> }
>
> Regards,
> Johan


--- End Message ---
--- Begin Message ---
>    the program just can let me get the post string like my example
> I want post the xml file content to a php file, then I want get the post
> string that it's xml content.
> 
> hehe, thanks for your help

Did you solve your problem?
I dont think i understand you, but i tries to give a little summary what I 
think you mean.

1. A page make a post request with XML data to a PHP file.
2. The PHP file get the post request, and get the XML data.
3. An then what?

Regards,
Johan
--- End Message ---
--- Begin Message ---
I think you understand my problem.

I will use a client program to POST the XML data to a php file on the server
base HTTP
in php file will get the post request,

the question is, how can i get the xml data in post request

--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com
"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >    the program just can let me get the post string like my example
> > I want post the xml file content to a php file, then I want get the post
> > string that it's xml content.
> >
> > hehe, thanks for your help
>
> Did you solve your problem?
> I dont think i understand you, but i tries to give a little summary what I
> think you mean.
>
> 1. A page make a post request with XML data to a PHP file.
> 2. The PHP file get the post request, and get the XML data.
> 3. An then what?
>
> Regards,
> Johan


--- End Message ---
--- Begin Message ---
> I think you understand my problem.
> 
> I will use a client program to POST the XML data to a php file on the
> server base HTTP
> in php file will get the post request,
> 
> the question is, how can i get the xml data in post request

Hmm, I dont think I understand? Where do you want to do with the XML? Cant 
you just make a echo() in a xml document? please explain?
<?xml version='1.0'?>
...
...
....
<?php
echo $xmldatavar;
?>
...
...
...

Regards,
Johan
--- End Message ---
--- Begin Message ---
XML file is text file. If I open the file with php like call $fp, that is a
long string with some special char.
post method can send a long string to the server.
how php can receive that long string is my problem.

if can do that, php can parser the xml file send form remote computer.
I want php parser the SOAP message
--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com
"Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I think you understand my problem.
> >
> > I will use a client program to POST the XML data to a php file on the
> > server base HTTP
> > in php file will get the post request,
> >
> > the question is, how can i get the xml data in post request
>
> Hmm, I dont think I understand? Where do you want to do with the XML? Cant
> you just make a echo() in a xml document? please explain?
> <?xml version='1.0'?>
> ...
> ...
> ....
> <?php
> echo $xmldatavar;
> ?>
> ...
> ...
> ...
>
> Regards,
> Johan


--- End Message ---
--- Begin Message ---
$HTTP_RAW_POST_DATA

(problems with 4.0.6 because in it some changes had been made). If the 
content type is known by PHP then this var is empty, otherwise you have the 
data in it. Works perfect with 4.0.0. I think that since 4.0.7 there is a ini 
option about that

Regards,


On Thursday 15 November 2001 02:36 am, you wrote:
> I mean post content string not a lot of variables
>
> etc:
>
> aaa.html post a=1&b=2 to bbb.php
>
> I want use php to read the string a=1&b=2 not $a and $b
>
> thanks

-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com
--- End Message ---
--- Begin Message ---
I think I saw on this list that there's a $HTTP_RAW_POST_DATA (or 
similar) varibale. Sorry the net is slow like hell at work, I can't 
search for more info. But I think if you search for "raw" on the 
general mailing list's archive you will find it.

        Arpi

> XML file is text file. If I open the file with php like call $fp,
> that is a long string with some special char.
> post method can send a long string to the server.
> how php can receive that long string is my problem.
>
> if can do that, php can parser the xml file send form remote
> computer. I want php parser the SOAP message
> --
> Yorgo Sun
> Project Manager
> Technology Dept. Tom.com
> Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ
> ID:yorgo http://www.ruisoft.com
> "Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > > I think you understand my problem.
> > >
> > > I will use a client program to POST the XML data to a php file
> > > on the server base HTTP
> > > in php file will get the post request,
> > >
> > > the question is, how can i get the xml data in post request
> >
> > Hmm, I dont think I understand? Where do you want to do with the
> > XML? Cant you just make a echo() in a xml document? please
> > explain? <?xml version='1.0'?>
> > ...
> > ...
> > ....
> > <?php
> > echo $xmldatavar;
> > ?>
> > ...
> > ...
> > ...
> >
> > Regards,
> > Johan
--- End Message ---
--- Begin Message ---
thinks

I finded it by review the soure code. try it's empty. then think have and
other way.
so got your explain. I just try the older version or waitting the php4.1.0

--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ ID:yorgo
http://www.ruisoft.com
"Andrey Hristov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> $HTTP_RAW_POST_DATA
>
> (problems with 4.0.6 because in it some changes had been made). If the
> content type is known by PHP then this var is empty, otherwise you have
the
> data in it. Works perfect with 4.0.0. I think that since 4.0.7 there is a
ini
> option about that
>
> Regards,
>
>
> On Thursday 15 November 2001 02:36 am, you wrote:
> > I mean post content string not a lot of variables
> >
> > etc:
> >
> > aaa.html post a=1&b=2 to bbb.php
> >
> > I want use php to read the string a=1&b=2 not $a and $b
> >
> > thanks
>
> --
> Andrey Hristov
> Web Developer
> Icygen Corporation
> BUILDING SOLUTIONS
> http://www.icygen.com


--- End Message ---
--- Begin Message ---

When POST data is sent to a page, it's as if somebody typed the text into a
textarea and hit a submit button.  Even though this is being done
programmatically, the POST method will behave the same.  SOmebody in their
(your)code will have to write something similiar to:

$postData = "xVar=" . rawurlencode( "<?xml version=\"1.0\"><sometag
value=\"some value\"></xml>" );
PostToHost( "http://www.domain.com"; "/phpfile.php", $postData );


then your script would access that XML data through the
HTTP_POST_VARS['xVar'] or $xVar as normal

/* not my function, found on some PHP site */
function PostToHost( $host, $path, $data_to_send ) {
 $cRetVal = "";
 $fp = fsockopen( $host, 80 );

 fputs( $fp, "POST $path HTTP/1.1\n" );
 fputs( $fp, "Host: $host\n" );
 fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" );
 fputs( $fp, "Content-length: " . strlen($data_to_send) . "\n" );
 fputs( $fp, "Connection: close\n\n" );
 fputs( $fp, $data_to_send );

 while( !feof( $fp )) {
   $cRetVal .= fgets( $fp, 128 );
 }

 fclose( $fp );
 return $cRetVal;
}

> > XML file is text file. If I open the file with php like call $fp,
> > that is a long string with some special char.
> > post method can send a long string to the server.
> > how php can receive that long string is my problem.
> >
> > if can do that, php can parser the xml file send form remote
> > computer. I want php parser the SOAP message
> > --
> > Yorgo Sun
> > Project Manager
> > Technology Dept. Tom.com
> > Email:[EMAIL PROTECTED]  Mobile:13701243390 Phone:65283399-121 TomQ
> > ID:yorgo http://www.ruisoft.com
> > "Johan Holst Nielsen" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > > > I think you understand my problem.
> > > >
> > > > I will use a client program to POST the XML data to a php file
> > > > on the server base HTTP
> > > > in php file will get the post request,
> > > >
> > > > the question is, how can i get the xml data in post request
> > >
> > > Hmm, I dont think I understand? Where do you want to do with the
> > > XML? Cant you just make a echo() in a xml document? please
> > > explain? <?xml version='1.0'?>
> > > ...
> > > ...
> > > ....
> > > <?php
> > > echo $xmldatavar;
> > > ?>
> > > ...
> > > ...
> > > ...
> > >
> > > Regards,
> > > Johan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

--- End Message ---
--- Begin Message ---
For the record, I have tried:

<?php
//$temp = $name;
session_name("TESTpostcard");
session_start();

$temp = $name;
session_register("name");
$name = $temp;

> I have read: http://www.php.net/manual/en/function.session-register.php
> This is my problem:
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.php
>
> Type something.
> Press submit.
> Change your text and re-submit.
>
> $name doesn't re-save itself. This is my code:
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.phps
>
> Suggestions?
> It can't be that complicated can it?

--- End Message ---
--- Begin Message ---
And ... if this helps:

http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/phpinfo.php



Jtjohnston wrote:

> For the record, I have tried:
>
> <?php
> //$temp = $name;
> session_name("TESTpostcard");
> session_start();
>
> $temp = $name;
> session_register("name");
> $name = $temp;
>
> > I have read: http://www.php.net/manual/en/function.session-register.php
> > This is my problem:
> > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.php
> >
> > Type something.
> > Press submit.
> > Change your text and re-submit.
> >
> > $name doesn't re-save itself. This is my code:
> > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/test_session.phps
> >
> > Suggestions?
> > It can't be that complicated can it?

--- End Message ---
--- Begin Message ---
On Wed, 14 Nov 2001 08:01:54 -0700, [EMAIL PROTECTED] (Zak Greant) wrote:


>Drop by http://www.php-er.com and take a look at the chapter on 
>gettext.
>
>I have written a complete overview of using gettext with PHP. It is 
>also Unix-centric, but it is easier to understand than the gettext 
>docs. : )

Your page at:
http://www.php-er.com/chapters/Gettext_Functions.html
is very clear!

I have also completed the 'msgfmt' utility, so I have succesfully
created a "binary language file" (the .mo file from the .po file)
But.. unfortunately I still could not manage to get it work :-(

This is what I have done.

On the W2000-webserver, I've put the nl.mo file in the following
folder (directory):

[webroot]\melle\includes\translations\nl\LC_MESSAGES

so, in that directory resides the 'nl.mo' file.

I've altered your .php example to read:

=========
<HTML>
<BODY>
<?
// Bind a domain to directory
// Gettext uses domains to know what directories to
// search for translations to messages passed to gettext
bindtextdomain ('greetings', './includes/translations'); // Set the
current domain that gettext will use
textdomain ('greetings'); # Make an array
# Use the ISO two-letter codes as keys
# Use the language names as values
$iso_codes = array (
    'en'=>'English',
    'fr'=>'French',
    'it'=>'Italian',
    'pt'=>'Portuguese',
    'es'=>'Spanish',
    'nl'=>'Nederlands'
); foreach ($iso_codes as $iso_code => $language) {
    # Set the LANGUAGE environment variable to the desired language
    putenv ('LANGUAGE='.$iso_code); # Print out the language name and
greeting
# Filter the greeting through gettext
printf ("<b>%12s:</b> %s\n", $language, _("str_hello"));
}
?></BODY></HTML>
=======

I've put the above .php file in the [webroot]\melle folder.

The (wrong) output is:

     English: str_hello
      French: str_hello
     Italian: str_hello
  Portuguese: str_hello
     Spanish: str_hello
  Nederlands: str_hello

And, in the nl.po file, I have entered:

======
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2001-11-14 17:11+0100\n"
"Last-Translator: Melle Koning <[EMAIL PROTECTED]>\n"
"Language-Team:  <>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "str_hello"
msgstr "hallo"
======

So, what I expected was:

===
     English: str_hello
      French: str_hello
     Italian: str_hello
  Portuguese: str_hello
     Spanish: str_hello
  Nederlands: hallo
===

So this does not work!

Now, what I think could still be going wrong is that 'gettext' is
unable to find the nl.mo file, in other words gettext is unable to
find the right folder(directory)...

My question:
How should I alter:
bindtextdomain ('greetings', './includes/translations'); 

I have already done this:

echo bindtextdomain ('greetings', '.\includes\translations'); 

This returns:
C:/Inetpub/PowerPlate/melle/includes/translations

Which seems to be ok, with the difference that I guess windows wants
to have:
C:\Inetpub\PowerPlate\melle\includes\translations
(backslashes instead of forward slashes)?

Any other hints to get gettext to find the .mo files???

Thanks,








-- 
  http://hace.dyndns.org/ 
  Everything I say is my own opinion and not necessarily that of my employer.

--- End Message ---
--- Begin Message ---
On Wed, 14 Nov 2001 08:01:54 -0700, [EMAIL PROTECTED] (Zak Greant) wrote:

>I have written a complete overview of using gettext with PHP. It is 
>also Unix-centric, but it is easier to understand than the gettext 
>docs. : )

Whooaa!

I finally! got it working!

===
C:/Inetpub/PowerPlate/melle/includes/translations
     English: str_hello
      French: allo
     Italian: str_hello
  Portuguese: str_hello
     Spanish: str_hello
  Nederlands: hallo
===

What I had to change (back) was:

bindtextdomain ("greetings", ".\includes\translations"); 

Above does not work. When I changed this to:

bindtextdomain ("greetings", ".\\includes\\translations"); 


ALSO, I had to change the filename to be 'greetings.mo': This was NOT
clear from all the gnu-pages I read. I had named those files: nl.mo
(for dutch) and fr.mo (for french etcetera). I simply tried to change
the *.mo filename to be the same as the 'domain' and it worked...

gettext suddenly worked on windows! :-)

I provide my code and folder-structure here for other windows-users:

<?
// Bind a domain to directory
// Gettext uses domains to know what directories to
// search for translations to messages passed to gettext
bindtextdomain ("greetings", ".\\includes\\translations"); // Set the
current domain that gettext will use
textdomain ('greetings'); # Make an array
# Use the ISO two-letter codes as keys
# Use the language names as values
$iso_codes = array (
    'en'=>'English',
    'fr'=>'French',
    'it'=>'Italian',
    'pt'=>'Portuguese',
    'es'=>'Spanish',
    'nl'=>'Nederlands'
); foreach ($iso_codes as $iso_code => $language) {
    # Set the LANGUAGE environment variable to the desired language
    putenv ('LANGUAGE='.$iso_code); # Print out the language name and
greeting
# Filter the greeting through gettext
printf ("<b>%12s:</b> %s\n", $language, gettext("str_hello")) & "\n";

}
?>

In the windows-webfolder I have the following directory-structure:

==
\includes\translations
 \includes\translations\en
 \includes\translations\en\LC_MESSAGES
 \includes\translations\en\LC_MESSAGES\greetings.po
 \includes\translations\fr
 \includes\translations\fr\LC_MESSAGES
 \includes\translations\fr\LC_MESSAGES\greetings.mo
 \includes\translations\fr\LC_MESSAGES\greetings.po
 \includes\translations\it
 \includes\translations\it\LC_MESSAGES
 \includes\translations\it\LC_MESSAGES\greetings.po
 \includes\translations\nl
 \includes\translations\nl\LC_MESSAGES
 \includes\translations\nl\LC_MESSAGES\greetings.mo
 \includes\translations\nl\LC_MESSAGES\greetings.po
 \includes\translations\pt
 \includes\translations\pt\LC_MESSAGES
 \includes\translations\pt\LC_MESSAGES\greetings.po
 \includes\translations\sp
 \includes\translations\sp\LC_MESSAGES
 \includes\translations\sp\LC_MESSAGES\greetings.po
===

To get this working you will need a greetings.po file like this:

(this one is in the 'nl' subdir for dutch language:
===
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2001-11-14 17:11+0100\n"
"Last-Translator: Melle Koning <[EMAIL PROTECTED]>\n"
"Language-Team:  <>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "str_hello"
msgstr "hallo"
===

and you have to 'compile' this .po file to a .mo file with the
following command-line (go to 'command prompt'):

==
msgfmt -o greetings.mo greetings.po
==

To get msgfmt working on your windows machine, you will need to have
libiconv.dll, libintl.dll and msgfmt.exe in your path. What I did was
put these three files in a new c:\utils folder and than run the
command:
path=%path%;c:\utils

I hope this helps some windows-users like me to get gettext() to work
on their systems.......

Cheers,
Melle
[EMAIL PROTECTED]


-- 
  http://hace.dyndns.org/ 
  Everything I say is my own opinion and not necessarily that of my employer.

--- End Message ---
--- Begin Message ---
Hi all, 
 
            I would like to do something like that : 
 
#ifndef _SYS_TYPES_H
#include <sys/types.h>
#endif
 
Is it possible in php ?
 
 
Thx poz
--- End Message ---
--- Begin Message ---
if (!defined('_SYS_TYPES.H')) {
    include('sys/types.h');
}
----- Original Message ----- 
From: "Briet Vincent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 10:31 AM
Subject: [PHP] multiple include


> Hi all, 
>  
>             I would like to do something like that : 
>  
> #ifndef _SYS_TYPES_H
> #include <sys/types.h>
> #endif
>  
> Is it possible in php ?
>  
>  
> Thx poz
> 
--- End Message ---
--- Begin Message ---
Hello,

I'm using PHP 4.0.4pl1-9 on RedHat 7.1. The software was installed using rpm.
I'd like to add the mhash extension without re-installing the entire PHP package
from source.  So i try following steps:

- install mhash from source
- obtain PHP source directory, then 
  cd ext/mhash 
  phpize
  ./configure --with-mhash
  make
  make install (found /usr/lib/php4/mhash.so ready)
- uncomment the line with mhash.so in /etc/php.ini 

However, when i tried the sample in PHP manual, it failed to call mhash() with 
following error messages:

PHP Warning:  Invalid library (maybe not a PHP library) 'mhash.so'  in Unknown on line 0

Did i use the wrong procedure ?

I'm new to PHP and sorry for the newbie faq.

Thanks in advance.
ST Wong



-- 
S.T. Wong                               | Email: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I started an affiliate program to sell my scripts, and it uses cookies
for tracking..  I didnt know it at the time, but as soon as the web
browser's closed, the cookie info is gone. grrrr! I need it to stay
there *permanently*! =) Here's the code I have no for both setting and
retrieving..

retrieving: $refid = $HTTP_COOKIE_VARS["refid"];
setting: setcookie ("refid", $id);

Am I just missing something I didnt see on php.net? =)


--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/


--- End Message ---
--- Begin Message ---
you must set the cookie's expiry time!

of-the manual:
setcookie ("TestCookie", "Test Value");
setcookie ("TestCookie", $value,time()+3600);  /* expire in 1 hour */
setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca",
1);

"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I started an affiliate program to sell my scripts, and it uses cookies
> for tracking..  I didnt know it at the time, but as soon as the web
> browser's closed, the cookie info is gone. grrrr! I need it to stay
> there *permanently*! =) Here's the code I have no for both setting and
> retrieving..
>
> retrieving: $refid = $HTTP_COOKIE_VARS["refid"];
> setting: setcookie ("refid", $id);
>
> Am I just missing something I didnt see on php.net? =)
>
>
> --
> From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
> and Software on your Site. http://www.phpgalaxy.com/aff/
>
> Also, get a fast free POP3 email account, you @php.la at
> http://www.phpgalaxy.com/search/
>
>


--- End Message ---
--- Begin Message ---
yeah I saw that bit on there, but I was led to believe tha by leaving it out,
it would make the cookie permanent...I see thats not true =)  so what would I
do to make this permanent? or would I just set it for the highest time-limit
possible? =)


_lallous wrote:

> you must set the cookie's expiry time!
>
> of-the manual:
> setcookie ("TestCookie", "Test Value");
> setcookie ("TestCookie", $value,time()+3600);  /* expire in 1 hour */
> setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca",
> 1);
>
> "Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I started an affiliate program to sell my scripts, and it uses cookies
> > for tracking..  I didnt know it at the time, but as soon as the web
> > browser's closed, the cookie info is gone. grrrr! I need it to stay
> > there *permanently*! =) Here's the code I have no for both setting and
> > retrieving..
> >
> > retrieving: $refid = $HTTP_COOKIE_VARS["refid"];
> > setting: setcookie ("refid", $id);
> >
> > Am I just missing something I didnt see on php.net? =)
> >
> >
> > --
> > From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
> > and Software on your Site. http://www.phpgalaxy.com/aff/
> >
> > Also, get a fast free POP3 email account, you @php.la at
> > http://www.phpgalaxy.com/search/
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/


--- End Message ---
--- Begin Message ---
Den 01-11-15 13.20, skrev "PHPGalaxy.com" <[EMAIL PROTECTED]>:

> yeah I saw that bit on there, but I was led to believe tha by leaving it out,
> it would make the cookie permanent...I see thats not true =)  so what would I
> do to make this permanent? or would I just set it for the highest time-limit
> possible? =)

If you set it like this:
<?
$hour = 3600;       // One hour
$day = $hour * 24;  // One day
$year = $day * 365; // One year
$year = $year * 2;  // 2 years
setcookie ("TestCookie", $value,time()+$year);  // Expire in 1 year
?>

There is not a good way to set a permanent cookie, the user can always
delete them if he wants to.

Thanks.
/Magnus Hammar

--- End Message ---
--- Begin Message ---
well yeah, thats always true..but this's at least as good as it gets =)  ya suppose
there's any limit on how many years I can set it for? hell, I'll just set it for 10
years and that'll be good enough =)


Magnus wrote:

> Den 01-11-15 13.20, skrev "PHPGalaxy.com" <[EMAIL PROTECTED]>:
>
> > yeah I saw that bit on there, but I was led to believe tha by leaving it out,
> > it would make the cookie permanent...I see thats not true =)  so what would I
> > do to make this permanent? or would I just set it for the highest time-limit
> > possible? =)
>
> If you set it like this:
> <?
> $hour = 3600;       // One hour
> $day = $hour * 24;  // One day
> $year = $day * 365; // One year
> $year = $year * 2;  // 2 years
> setcookie ("TestCookie", $value,time()+$year);  // Expire in 1 year
> ?>
>
> There is not a good way to set a permanent cookie, the user can always
> delete them if he wants to.
>
> Thanks.
> /Magnus Hammar
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/


--- End Message ---
--- Begin Message ---
Yes, I guess you can't make it foreever but you can give it a higher expiry
date.

"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> well yeah, thats always true..but this's at least as good as it gets =)
ya suppose
> there's any limit on how many years I can set it for? hell, I'll just set
it for 10
> years and that'll be good enough =)
>
>
> Magnus wrote:
>
> > Den 01-11-15 13.20, skrev "PHPGalaxy.com" <[EMAIL PROTECTED]>:
> >
> > > yeah I saw that bit on there, but I was led to believe tha by leaving
it out,
> > > it would make the cookie permanent...I see thats not true =)  so what
would I
> > > do to make this permanent? or would I just set it for the highest
time-limit
> > > possible? =)
> >
> > If you set it like this:
> > <?
> > $hour = 3600;       // One hour
> > $day = $hour * 24;  // One day
> > $year = $day * 365; // One year
> > $year = $year * 2;  // 2 years
> > setcookie ("TestCookie", $value,time()+$year);  // Expire in 1 year
> > ?>
> >
> > There is not a good way to set a permanent cookie, the user can always
> > delete them if he wants to.
> >
> > Thanks.
> > /Magnus Hammar
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
> and Software on your Site. http://www.phpgalaxy.com/aff/
>
> Also, get a fast free POP3 email account, you @php.la at
> http://www.phpgalaxy.com/search/
>
>


--- End Message ---
--- Begin Message ---
Supongo que es PHP 4:

Chequea el httpd.conf por:

<IfModule mod_php4.c>
       AddType application/x-httpd-php .php3
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php .php4
</IfModule>

Espero que este sea el problema.

Mensaje citado por: Daniel Geldres Castro <[EMAIL PROTECTED]>:

> Tengo un pequeño problema con mi servidor SuSe 7.0
> Tengo instalado el apache y corriendo los demonios, tengo instlado los
> rpm
> del mod_php, postgres y mysql pero cuando desde mi navegador deseo
> visualizar alguna pagina con la extension php esta se descarga sola, no
> me
> visualiza nada.
> 
> Que error debo de haber cometido si aparentemnte todo estaba bien.
> 
> ===============================
> Saludos,
> Daniel Geldres Castro
> mail: [EMAIL PROTECTED]
> Telf Trab.: 511-447-7600
> Telf Casa.: 511-251-3584
> ICQ 72211218
> MSN [EMAIL PROTECTED]
> Yahoo ID danielgeldres
> ===============================
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 



Saludos,

           Ing. Ricardo Núñez
           Webmaster de la DST
           Universidad Simón Bolívar
           E-Mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
First: can I do a POST-request with fsockopen?
If yes, then: whats the syntax for POST-requests?

I was happy if someone could point me to a good documentation or so

Thanks in advance
Stefan Rusterholz, [EMAIL PROTECTED]
----------------------------------
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
----------------------------------
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
----------------------------------
--- End Message ---
--- Begin Message ---
Hi there....

The following problem occurs in my scripts:

A large page is generated with data from a MySQL database. The various
paragraphs inside this page have variable, internal links, also extracted
from the database.
Example: <a name=\"$value\"></a>
Let's assume that $value represents FOO.

Now i want to take the value of this variable to post to $PHP_SELF.
Example: <form action=\"$PHP_SELF#$value\" method=\"post\">\n";.
The HTML-source should show something like <form
action="/domain/page.php#FOO" method="post">

This does not work... Output on the source is like <form
action="/domain/page.php#" method="post">, so $value appears to be empty.

Please help, sombody??

Thanks!

Rob.


--- End Message ---
--- Begin Message ---
> A large page is generated with data from a MySQL database. The various
> paragraphs inside this page have variable, internal links, 
> also extracted from the database.
> Example: <a name=\"$value\"></a>
> Let's assume that $value represents FOO.

Ok

> Now i want to take the value of this variable to post to $PHP_SELF.
> Example: <form action=\"$PHP_SELF#$value\" method=\"post\">\n";.
> The HTML-source should show something like <form
> action="/domain/page.php#FOO" method="post">

Seems straightforward enough...

> This does not work... Output on the source is like <form
> action="/domain/page.php#" method="post">, so $value appears 
> to be empty.

When is $value assigned a value?  Before or after the script prints out
the "<form action=" line?

Chris
--- End Message ---
--- Begin Message ---
Thanks for the quick reaction.

> When is $value assigned a value?  Before or after the script prints out
> the "<form action=" line?

This $value is somewhere within the form page ($PHP_SELF). If i put
$PHP_SELF?#FOO in the script, it all works well. But $value is variable, so
the content depends on the action taken somewhere in the script. The general
idea is that an internal link gives $value it's own value (like <a
name="para1">, so $value would be "para1"). After posting to SELF a jump to
para1 must be made.

Is this enough?

Thanx, Rob.


--- End Message ---

Reply via email to