[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

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] Fo

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 M

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

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 st

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 Kommunikations

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 al

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:" exp

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");

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 Kommun

[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 wil

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

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 I

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 "

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

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

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 ses

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 t

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

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 throug

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

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 PROTECTE

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)

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;

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; $PH

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 po

[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,

[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 els

[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 brows

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 t

[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

[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: [E

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