RE: [PHP] Checking whether a MySQL table exists

2001-01-10 Thread mailing_list

> 
> Does nobody read the mysql manual anymore these days? :)
> 
> 

well, I read the manual!
but if haven't found anything like "show tables like"!
Where did you find it - or

> No manual searching needed - 

did you only try, and not read???

witty

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




[PHP] image through php

2001-01-11 Thread mailing_list

Hi!

I want to use a code like:


I know, this is possible with perl, but with php?
... and it should be performant as well :-) !!

thanks
any hints appreciated
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




[PHP] fetch html-page without file()

2001-01-12 Thread mailing_list

Hi!

Something strange:
A script, that uses file("http://xyz.com") does work on one sever!
Then I copied it to another server (physically more far away from the
server from which I fetch the html-page with file()) - same PHP ...
Now file() returns always an empty string (about in 1 try out of 1000 it
is successful - I tested it!!)

Is there another method, to fetch a html-page?

PHP runs in safe mode - so '$source=`lynx -source http://xyz.com/`' won't
work!


thanks
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




Re: [PHP] mail() question

2001-01-15 Thread mailing_list

I asked the same question some weeks ago!

The problem is, my root installed the mail-function so that "nobody" is
the owner of the send-process!

I wanted the same thing as you want - At last I did a workaround (not bad
for sending that small amount of mails I do):

I configured .procmailrc, so the mails I want to send are sent to my local
account (specific subject), and then sendmail is called (the mail is sent
with MY USER)! If I use headers like Error-To:, they now work as expected!!

I hope you understand my filthy english!
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




[PHP] refresh Browser

2001-01-17 Thread mailing_list

Hi!

a general php-question!
do I have to care about the web-browser reloading a php-page automatically
and not taking a cached one!
For example submit.php (the conent changes every second!):


CLICK


what do I have to do, to guarentee that the client has got the actual
page?
 - or does the browser know - ordering a .php page means "really fetch it,
and don't take the cached one!
but what about proxy-server out there???

thanks for any hint
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




[PHP] get html-page

2001-03-01 Thread mailing_list

Hi!

I have a php-script, that gets a HTML-Page, parses it and print some
information on this page!
'file("http:// ...")' doesn't work on my server, so I use
'fsockopen($host,$port)' which works fine!

Now I migratet my scripts to another free-ISP, and there both methods fail!
- What can I try else?
- What is the reason, why they don't work?

thanks
michi

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




[PHP] Hide Include-Files from the Web

2001-03-03 Thread mailing_list

Hi!

I want my include-files not be seen from outside AND not be executed!!!
I don't have access to a directory outside DOCUMENT_ROOT and I don't have
.htaccess!!!

I think about something like:
1.
name: .inc.php
2.
add code: 
if ($PHP_SELF==MY_NAME) exit;
as first line in the inluded script.
so, if the script is being included from another script, the code will be
executed - but if the file will be called directly, no code is executed!
BUT - how do I get the include-file's name?

or is it safe enough, to use something like
if (substr($SCRIPT_URL,-8)==".inc.php") exit;

thanks
michi

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




Re: [PHP] Help w/ sprintf

2001-03-03 Thread mailing_list

> What are the directives for the sprintf function to format an integer with
> 
> commas (e.g.: 1,250,560)?
 
you don't mean commas but thousands' grouping???

if you want thousands'  grouping it depends on your locale setting!

--cut--
For some numeric conversion a  radic  character  (`decimal
point')  or  thousands'  grouping  character  is used. The
actual character used depends on the  LC_NUMERIC  part  of
the  locale. The POSIX locale uses `.' as radix character,
and does not have a grouping character.  Thus,
   printf("%'.2f", 1234567.89);
results  in  `1234567.89'  in   the   POSIX   locale,   in
`1234567,89' in the nl_NL locale, and in `1.234.567,89' in
the da_DK locale.
--cut--

michael

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Hide Include-Files from the Web

2001-03-03 Thread mailing_list

Hi!

as I wrote in my mail:
1.
I won't name them ".inc" but ".inc.php" (so *I* know, it's an include file)
2.
I don't even want them to be executable!!!

and therefore my question was, if this (on top of every include-file) would
be safe enough:
>> if (substr($SCRIPT_URL,-8)==".inc.php") exit;
$PHP_SELF better than $SCRIPT_URL in line above???

thanks
michi

> Include files do not have to end with '.inc', which is purely a convention
> of dubious value. If you use '.php' as the extension for included files,
> they will have to be parsed by PHP and can't be read as plain text from
> outside.
> 
> > Hi!
> > 
> > I want my include-files not be seen from outside AND not be executed!!!
> > I don't have access to a directory outside DOCUMENT_ROOT and I don't
> have
> > .htaccess!!!
> > 
> > I think about something like:
> > 1.
> > name: .inc.php
> > 2.
> > add code: 
> > if ($PHP_SELF==MY_NAME) exit;
> > as first line in the inluded script.
> > so, if the script is being included from another script, the code will
> be
> > executed - but if the file will be called directly, no code is executed!
> > BUT - how do I get the include-file's name?
> > 
> > or is it safe enough, to use something like
> > if (substr($SCRIPT_URL,-8)==".inc.php") exit;

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Inane ereg_replace question

2001-03-03 Thread mailing_list

this will work:
ereg_replace(" *: *",":",$b);
I don't know why you use an OR!
If you only wanted to know WHY this doesn't work:
the searchstrings overlap (abc is poisitioned BEFORE cde - so the parser
only will see abc in abcdefghiabcdefghi but not cde in XdefghiXdefghi!!

$a="abcdefghi";
$a.=$a;
echo ereg_replace("abc|def","X",$a)."\n";
echo ereg_replace("def|abc","X",$a)."\n";
echo ereg_replace("abc|cde","X",$a)."\n";
echo ereg_replace("cde|abc","X",$a)."\n";

OUTPUT:
XXghiXXghi
XXghiXXghi
XdefghiXdefghi
XdefghiXdefghi

michi
> php 3.xx
> 
> $a="to be or not  :to to be";
> 
> $b=ereg_replace(" *:",":",$b);
>   $b=ereg_replace(": *",":",$b);
> 
> works and
> 
> $b=ereg_replace(" *:|: *",":",$b); 
> 
> does not work. I've had this problem before and ended
> up using two or more statments rather than one.

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Hide Include-Files from the Web

2001-03-04 Thread mailing_list

> > Hi!
> >
> > I want my include-files not be seen from outside AND not be executed!!!
> > I don't have access to a directory outside DOCUMENT_ROOT and I don't
> have
> > .htaccess!!!
> >
> > I think about something like:
> > 1.
> > name: .inc.php
> > 2.
> > add code:
> > if ($PHP_SELF==MY_NAME) exit;
> > as first line in the inluded script.
> > so, if the script is being included from another script, the code will
> be
> > executed - but if the file will be called directly, no code is executed!
> > BUT - how do I get the include-file's name?
> >
> > or is it safe enough, to use something like
> > if (substr($SCRIPT_URL,-8)==".inc.php") exit;
> 
> I'm not sure what is your $SCIRPT_URL is.
> It could be not safe if user request like,
> 
> test.inc.php?abc=123
> test.inc.php?SCRIPT_URL=123
> 
> Since it is comparing last 8 chars and it is not using
> $HTTP_SERVER_VARS['SCRIPT_NAME']
> (SCRIPT_URL is a typo of SCRIPT_NAME or SCRIPT_FILENAME??)
> 
> If I were you, I will put
> 
> if (substr($HTTP_SERVER_VARS['SCRIPT_NAME'], -8) == '.inc.php' )) {
>log_error('Bad request from '.HTTP_SERVER_VARS['REMOTE_ADDR']);
> header('400: Bad Request');
> //  header('403: Forbidden'); // You might use this header instead or
> redirect to your own warning page.
>   exit;
> }
> 
> 
> If you can use $HTTP_SERVER_VARS, using it is safer.

Many thanks!
I found the following Variables, that hold the scriptname, but no
Get-Variables (as QUERY_STRING would do!)
- and calling script.inc.php?SCRIPT_NAME=xxx.php doesn't change the
Variable!!!
HTTP_SERVER_VARS["SCRIPT_FILENAME"]
HTTP_SERVER_VARS["SCRIPT_URI"]
HTTP_SERVER_VARS["SCRIPT_URL"]
HTTP_SERVER_VARS["SCRIPT_NAME"]
HTTP_SERVER_VARS["PATH_TRANSLATED"]
HTTP_SERVER_VARS["PHP_SELF"]

So - which one should I use???

Thanks
michi

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Hide Include-Files from the Web

2001-03-05 Thread mailing_list

Hi!

As I wrote before, I don't have .htaccess nor access to the apache-conf!!!

michi
 
> How bout an Apache redirect for .inc files to go to denied.htm or
> something?  PHP scripts could get to them, but they wouldn't be accessible
> via http.
> 
> 
> 
> At 08:01 PM 3/3/01 +0100, [EMAIL PROTECTED] wrote:
> >Hi!
> >
> >as I wrote in my mail:
> >1.
> >I won't name them ".inc" but ".inc.php" (so *I* know, it's an include
> file)
> >2.
> >I don't even want them to be executable!!!
> >
> >and therefore my question was, if this (on top of every include-file)
> would
> >be safe enough:
> >>> if (substr($SCRIPT_URL,-8)==".inc.php") exit;
> >$PHP_SELF better than $SCRIPT_URL in line above???
> >
> >thanks
> >michi
> >
> >> Include files do not have to end with '.inc', which is purely a
> convention
> >> of dubious value. If you use '.php' as the extension for included
> files,
> >> they will have to be parsed by PHP and can't be read as plain text from
> >> outside.
> >> 
> >> > Hi!
> >> > 
> >> > I want my include-files not be seen from outside AND not be
> executed!!!
> >> > I don't have access to a directory outside DOCUMENT_ROOT and I don't
> >> have
> >> > .htaccess!!!
> >> > 
> >> > I think about something like:
> >> > 1.
> >> > name: .inc.php
> >> > 2.
> >> > add code: 
> >> > if ($PHP_SELF==MY_NAME) exit;
> >> > as first line in the inluded script.
> >> > so, if the script is being included from another script, the code
> will
> >> be
> >> > executed - but if the file will be called directly, no code is
> executed!
> >> > BUT - how do I get the include-file's name?
> >> > 
> >> > or is it safe enough, to use something like
> >> > if (substr($SCRIPT_URL,-8)==".inc.php") exit;

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Grab and print user IP address

2001-03-12 Thread mailing_list

> Hi!
> 
> I need just a little script so I can get and print in browser the
> currently
> users IP address and if possible, browser type, etc.









HTH
michi

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Grab and print user IP address

2001-03-12 Thread mailing_list

> Thanks, michi
> 
> Just a question, what means the tag ?
> 
Commonly used for programing code!
All between the tags is written AS IS!!
try the below with and without :



My program
  BEGIN
If event 
  do something
  else dont do something
fi
  END
;



michi

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] substitute for assigning with array()?

2001-05-02 Thread mailing_list

> I had some code that was working nicely.  In it, I was assigning values to
> a
> multidimensional array like:
> 
> $array_name[0] = array(
> key1 => 'val',
> key2 => 'val',
> key3 => 'val');
> 
> I added a function that directly assigns vars to the same array like:
> 
> $array_name[0][key4] = 'val';
> 
> If this function is called prior to the multiple assignment code, it
> erases
> the directly assigned key/value pair [key4] = 'val'.

try :

$array_name[0][key4] = 'val4';
$array_name[0]=array_merge(
  array(
key1 => 'val1',
key2 => 'val2',
key3 => 'val3'
  ),
  $array_name[0]);

this will work ...
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] Searching for array keys

2001-05-03 Thread mailing_list

> What's the best way of finding out if a specific array key is in an array?
> I have an associative array which *may* look like 
> (car =>saab, house => mansion, countyW=> A) but can equally well look like
> 
> (boat => daycruiser, house => flat, county => B).
> 
> I want to find out if the key "car" is in the array and do something if it
 try something like

if (in_array("keyb",array_keys(array("key"=>"a","keyb"=>"b") { 
... 
}

michael

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




[PHP] split/join error

2001-12-19 Thread mailing_list

Hi,

I have saved an email as text-file, and want to get header and body out of
the file!
(header and body are seperated by the first empty line!)
so I do:
list($header,$body)=split("\n\n",join('',file($FILE)),2);

then I need the body's lines as array:
$body=split("\n",$body);
but this line gives me a timeout for large files!!!
(I also tried $x=split("\n",$body);$body=$x;)

But I don't understand why!!!
because file($FILE) doesn't return an error, although there are more
array-elements created as with the split of $body!

any ideas???

thanks

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] URL w/o script name

2001-04-09 Thread mailing_list

> Hello.
> 
> I have no idea in Linux systems yet nor in Web Servers configurations and
> stuff, and now I wonder:
> 
> www.php.net/asdfadasdasd
> 
> who takes control if i didn't specify a script name in the url?

the web-server
if you access www.php.net/asdfadasdasd (and the directory DOES exist) the
web-server returns:
301 Moved Permanently
http://www.php.net/asdfadasdasd/

then the Web-Server gets the request "http://www.php.net/asdfadasdasd/" from
the Browser
Now the server looks in its configuration (for example Apache:
DirectoryIndex index.php)

> does it work on windows PWS ?

I don't even want to try it ;-)

> 
> and sometimes i see:
> 
> www.site.com/?asdasdf=adasd
> 
> can someone please explain me this process.

the server looks in its configuration (for example Apache: DirectoryIndex
index.php) and returns this page - with the GET-Varaibales as well (your
Browser doesn't have to know, what this page's name is!)

But I'm sure you can configure your webserver (or put it in your script) to
make a 301/2/3 and redirect to the full URL!

witty

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] session variables

2001-04-10 Thread mailing_list

> I am using a session to store a variable so when someone enters something
> into a field the persons username(which is stored in the session) is also
> entered into anoter field.
>   The problem is that it only works the first time, so how can I make the
> session last for a required length of time, so that if the person leaves
> the
> site and returns without the login then the variable is still stored and
> entered into the field.

that's not a session-issue!
use COOKIES

witty

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] online detection

2001-04-10 Thread mailing_list

> Does anyone know how to detect when a user connects to the Internet
> similar
> to ICQ?

I think you mean messages on  pages like "321 user online"!
As HTTP is a stateless protocol, you can't really know this!!!
It's only an estimation - and you can use sessions to realize this (ask how
many sessions are active - and end a session after a short time like 5
minutes!)

witty

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] session variables

2001-04-10 Thread mailing_list

>   I tried using a cookie I still had the same problem that it worked first
> time but even if you stayed on the page and put a sencond entry in it
> would
> not work,

then you:
set the cookie incorrectly
overwrite/delete the cookie by mistake
your browser does not support cookies
...

read
http://php.net/manual/en/features.cookies.php
and
http://php.net/manual/en/function.setcookie.php

try the example there!

witty

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: [PHP] inserting a variable into a variable

2001-06-20 Thread mailing_list

> I have come to a situation where  i am having a variable inside another
> variable.
> for example.
> 
> $rm_$cat_adt

This works for me:

\n";
  echo '"abc_def_ghi" = '.$abc_def_ghi."\n";
?>

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a




Re: [PHP] exec, backtics and co.

2001-06-20 Thread mailing_list

> I have a problem with a php script which contains an exec (identical
> problem
> with backtics and similar operators)
> some programs are simply not executed
> for example, having a simple 'hello world' program in c++ will work fine,
> but having a program that writes 'hello world' to a file won't work.

I think, that the permissions on the directory, where you want to put the
file, are not ok.
The directory must be writable for all users (because it is not YOU who
writes the file but the webserver!!!).

witty

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




[PHP] SMTP/mail question

2001-06-20 Thread mailing_list

Hi,

I sent a message last day with subject "perl2php - question" - but I think I
will describe the problem, I solved with perl, instead of asking for a
perl2php-code:

if I send a mail with the php-mail()-function, and the mail bounces (wrong
address - server down ...), the sysadmin of my ISP will get this bouncing
mail!
I tried all possible headers (Return-Path, Error-To, Sender, ...) to
redirect the bouncing mail to my address but nothing worked - all bouncing-mails go
to root!

In Perl I found a way to write a mail as usual, *but* I send the mail by
specifying the real-sender and the real-receiver!!!

real-sender: [EMAIL PROTECTED]
real-receiver: [EMAIL PROTECTED]

Mail to be sent:
--
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: TestMail

Body-Text
--

If the mail is delivered, the receiver ([EMAIL PROTECTED]) will only
see what is written in the mail above (he won't see the real-sender and the
real-receiver in any header)!
If the mail isn't delivered correctly [EMAIL PROTECTED] will get a message!

And I want to implement this with php!!!
Is this possible???

(for an example you can look at
http://perl.about.com/compute/perl/library/weekly/aa022000d.htm )


thanks
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: [PHP] protect source code

2001-06-21 Thread mailing_list

> An alternative is to put some of your critical code into a PHP extension
> that you distribute as a shared library with your application.  Compiled C
> code in the form of a .so is rather difficult to reverse engineer.

how to do this?
can you give an example?

thanks
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




RE: [PHP] SMTP/mail question

2001-06-21 Thread mailing_list

> > I tried all possible headers (Return-Path, Error-To, Sender, ...) to
> > redirect the bouncing mail to my address but nothing worked - 
> > all bouncing-mails go to root!
> 
> this works for me:
> 
> mail("[EMAIL PROTECTED]", "Subject", "Email body",
>  "Return-path: [EMAIL PROTECTED]\n");
> 
> Maybe you mistyped the header or something...

no, this header (as well as Sender:) is being overwritten by the ISP's
sendmail!!!
and the recipient would see this header in the mail!!!
I don't want the recipient to see his address in To: nor the Return-Path:
!!!
First I thought this is not possible, but it works great with perl!

any idea???

thanks
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




RE: [PHP] SMTP/mail question

2001-06-22 Thread mailing_list

Hi!

I did it!
once again what I wanted to do:
I wanted to send a mail, but use "MAIL FROM:" and "RCPT TO:" from the
SMTP-Protocol and check, if the domain is accepted (nslookup MX)!
I had a perl script, that does this trick.  Unfortunately the php-mail()
can't do a "RCPT TO:" and "MAIL FROM:" explicitly (would be great in a future
release!!!) !

for them who don't know:
--
telnet mymailserver 25
HELO localhost
MAIL FROM: [EMAIL PROTECTED]
RCPT TO: [EMAIL PROTECTED]
DATA
To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject: TESTMAIL

This is the Body ...
.
--
the result:
.) if address is correct: mail will be delivered to [EMAIL PROTECTED],
though in the To: header is written something else.
.) if there is no user realrecipient at you.com, the mail will be resent to
[EMAIL PROTECTED] (Delivery-Error), though in the From: header is written
something else.
.) if the domain you.com doesn't exist or doesn't have a valid MX-entry,
then the RCPT TO: isn't accepted and the mail won't be sent!!!

what I did (my sendmail.pl handles 1.RCPT TO, MAIL FROM;2.Mail
Headers;3.Mail Body - all stored in $message):
$fh=popen("scripts/sendmail.pl","w");
fwrite($fh,$message);
if (pclose($fh)==0){
  echo "Mail was sent successful!";
}else{
  echo "Couldn't deliver mail (none or wrong MX-entry)!";
}

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Der zweitgrößte Lotto-Jackpot aller Zeiten: 36 Mio. DM suchen einen
Gewinner!
Jetzt online tippen und nebenbei noch eine Reise nach Las Vegas gewinnen!
http://www.get1.de/gmx-gewinnspiel2


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




RE: [PHP] Remove value from array

2001-06-25 Thread mailing_list

> > Hello,
> > how can I complete remove an item out of an array ?
> > I tried unset() as well as setting the value to null.
> >
> > Both result in the value being null but not the item being deleted.
> 
> As far as I know, this is not possible. You can, however, create a new
> array
> and copy all values except the deleted one from the old array, for example
> with two array_slice() calls.

http://php.net/manual/en/language.types.array.php
there is written:
"To change a certain value, just assign a new value to it. If you want to
remove a key/value pair, you need to unset() it."

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: [PHP] Help with simple regular expression

2001-06-25 Thread mailing_list

> > That's because POSIX is greedy.  Or Perl is greedy.  Whatever.
> 
> Perl is greedy. It *should* have worked with eregi...
> 
> > > 

Yes, Perl is greedy (there has to be some kind of default behaviour)!

BUT it is SO easy to make it decent:
//
that's it!!!


michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: [PHP] Passing an array to a C program from a php script??

2001-06-26 Thread mailing_list

> Hi all,
> 
> I have a big array (nearly 1000 lines) that I would like to pass to a C
> program. I don't want to create a temporary file to pass my array (If
> possible ?!?), and I don't think the command line will fit my needs.
> 
> Is there a way to execute a program with a php string as the standard
> input. Something like shell redirection 'c_program < input.file' but with
> input.file being a php variable and not a real file ?? Any other solution
> ??
> 
> Hope I am clear enough !

what you can do is serialize the array and then parse it with you c-program
(it is not very difficult, to get the syntax ;-) ):
popen($fh,"|my_c_program");
pwrite($fh,$serialized_array);
pclose($ph);

(hope that was what you were asking)
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: [PHP] Expand/parse variables in file

2001-06-26 Thread mailing_list

> $a = "whatever";
> $b = "abc $a def";
> echo $b;

but:
$a = 'whatever;
$b = 'abc $a def';
echo $b;
doesn't do what you like (and this is more likely your problem!)

this is the clue:
$a = 'whatever;
$b = 'abc $a def';
echo eval($b);

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: [PHP] Enter to BR

2001-06-26 Thread mailing_list

> How can I get an Enter typed in a HTML textfield to be inerpreted as a BR
> or
> a P tag?
> Someone sugested I use the split() function, but I wouldn't know how...

nl2br

http://at.php.net/manual/de/function.nl2br.php

michi

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Math Inside Strings

2001-08-29 Thread mailing_list

> echo " value='$currentPosition+1'>";
> 
> can anyone tell me how to get this to stop printing:
> 
> 
> 

echo "";

hth
michael

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net



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