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
echo input type='hidden' name='currentPosition'
value='$currentPosition+1';
can anyone tell me how to get this to stop printing:
input type='hidden' name='currentPosition' value='0+1'
echo input type='hidden' name='currentPosition'
value='.$currentPosition+1.';
hth
michael
--
GMX -
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
$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.
That's because POSIX is greedy. Or Perl is greedy. Whatever.
Perl is greedy. It *should* have worked with eregi...
body.*
Yes, Perl is greedy (there has to be some kind of default behaviour)!
BUT it is SO easy to make it decent:
/body.*?/
that's it!!!
michi
--
GMX - Die
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
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
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
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
I have come to a situation where i am having a variable inside another
variable.
for example.
$rm_$cat_adt
This works for me:
?
$cat=def;
${abc_.$cat._ghi}=TEST;
echo 'abc_.$cat._ghi = '.${abc_.$cat._ghi}.br\n;
echo 'abc_def_ghi = '.$abc_def_ghi.br\n;
?
michi
--
GMX - Die
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
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
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
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,
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
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
Thanks, michi
Just a question, what means the tag PRE?
Commonly used for programing code!
All between the tags is written AS IS!!
try the below with and without pre:
htmlbody
pre
My program
BEGIN
If event
do something
else dont do something
fi
END
;
/pre
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]
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: file.inc.php
2.
add code:
if ($PHP_SELF==MY_NAME) exit;
as first
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
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;
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;
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
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
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
Hi!
I want to use a code like:
img src="./randomgif.php"
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/)
26 matches
Mail list logo