RE: [PHP] SESSIONS in javascript
if you use SID you can get the session out of the url. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 4:31 PM To: [EMAIL PROTECTED] Subject: [PHP] SESSIONS in javascript Hi, I got a PHP page where I define a SESSION. I then include a javascript page where I would like to use the value which is stored in the SESSION. The problem is that the php tags doesn't work in javascript. Can anyone tell me how to do that? Regards, Morten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP.ini Session section
sure, I've had it working before... what's the hang-up. ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Mauricio Sthandier [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 4:17 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP.ini Session section Does anybody have a Session section of the php.ini working on Windows 2000 ? I'm not able to make my session persistent along pages... perhaps a bad configuration of IIS ? Should I move to Linux ? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: sablotron XMl XSLT
thanks. did the trick. no sablotron. :( Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] You could use function_exists() to test if xslt_create() is a defined function. If not, then error out. If so, carry on. It's not limited to sablotron checking - check for GD, PDF, etc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sockets and flush()
Are you using ob_start () and ob_end_flush() ? If not then declaring ob_start () as the very first "mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 5:39 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] sockets and flush() no tables. my test script prints a single string prior to the sockets code. thx, dietrich > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 11:12 AM > To: dietrich > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] sockets and flush() > > > dietrich wrote: > > > > i have a script that makes a socket connection about halfway through the > > page. > > > > nothing on the page prints until the socket operation is finished, even if i > > call flush() prior to the socket operation. > > > > does anyone now of a way to force PHP to output the buffer prior to > > executing the socket code? > > > > thanks! > > > > dietrich > > [EMAIL PROTECTED] > > dietrich.ganx4.com > > Are you using Netscape 4.x and possibly making the socket connection > while inside a main table tag? Nescape 4.x series doesn't usually draw > a table until the close tag is found or the page ends. > > Cheers, > Rob. > -- > .-. > | Robert Cummings | > :-`. > | Webdeployer - Chief PHP and Java Programmer | > :--: > | Mail : mailto:[EMAIL PROTECTED] | > | Phone : (613) 731-4046 x.109 | > :--: > | Website : http://www.webmotion.com | > | Fax : (613) 260-9545 | > `--' > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sablotron XMl XSLT
Thanks Ray but what I need to know is if there is indeed a better way than what I've tried to test if sablotron has been complied or not. ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Hunter, Ray [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:29 PM To: Matthew Luchak; [EMAIL PROTECTED] Subject: RE: [PHP] sablotron XMl XSLT You need to check if you have sablotron compiled in with php. If you need the rpms you can get them from here: http://www.gingerall.com/charlie/ga/xml/d_sab.xml Sablotron also needs javascript engine to run, you can get that here: http://rpmfind.net/linux/rpm2html/search.php?query=js I am actually installing it now as we speak... RAY HUNTER Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Matthew Luchak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: [PHP] sablotron XMl XSLT PHP 4.1.2 SunOS web-unix1 5.7 apache_1.3.22 I'm trying to parse XML/XSL on a shared box and I'm using : $xslthandler = xslt_create() or die("Can't create XSLT handle!"); to test for sablotron. Unfortunately I just get a "Call to undefined function" error which I guess means no - there's no sablotron installed - but I was wondering if there is another way to test for Sablotron? I need a little quicker turnaround time then passing from voicemail to voicemail at my ISP ;) thanks, Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
[PHP] flock and unix/apache
PHP 4.1.2 SunOS web-unix1 5.7 apache_1.3.22 I'm porting from WIN2000 to Apache/Unix and having problems with the flock() function. The following : $fd = fopen ($file, "r");if (flock($fd, 2)) { ...} "if" statement never returns true... any ideas? ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
[PHP] sablotron XMl XSLT
PHP 4.1.2 SunOS web-unix1 5.7 apache_1.3.22 I'm trying to parse XML/XSL on a shared box and I'm using : $xslthandler = xslt_create() or die("Can't create XSLT handle!"); to test for sablotron. Unfortunately I just get a "Call to undefined function" error which I guess means no - there's no sablotron installed - but I was wondering if there is another way to test for Sablotron? I need a little quicker turnaround time then passing from voicemail to voicemail at my ISP ;) thanks, Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
RE: [PHP] Re: Testing for the presence of HTML
If I understand the question correctly - came late to the thread - I think the easiest way to do this would be to check for the presence of "mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Testing for the presence of HTML Unfortunately, I also have users entering complex HTML code such as tables; which, if each tag of a table is on a separate line, renders badly with nl2br(). I mean, really badly. You have no idea. My users range from professional web developers to people who are still frightened by the idea of using a mouse. At 01:20 PM 11/20/2001, Fred wrote: >This may not actually be a problem. If you are expecting that users may >enter links as html you can still use nl2br and get a decent result. The >only time this would be a problem, would be if the users actually entered > as they filled in the form. In my experience, it is highly unlikely >that a user will write their own as they fill in a form, even if they >do enter other html such as links. > >Fred > >Richard S. Crawford <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >My database contains a field which may or may not contain HTML code, >depending on what a particular user enters when they enter the data. > >Here's the challenge: > >If there is HTML code in this field, then print the text with interpreted >HTML. No problem at all. > >If there is no HTML code in the field, then I still want the data printed >nice and neat; the users will probably use line returns to make their text >look somewhat decent. > >So, assuming that $text contains the contents of this field, then what I >want to do is this: > > if (!HTMLin$text) then $text = nl2br($text); > >What's the best way to check and see if HTML is present in the field? > > >Sliante, >Richard S. Crawford > >http://www.mossroot.com >AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford >MSN: [EMAIL PROTECTED] > >"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!" > > > > >-- >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 AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] "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!" -- 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 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] Re: A tricky one?
try &&($val!="") instead of &&(isset($var) ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 3:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: A tricky one? It works after modifying it a little. BUT... :) It lists all the variables even if they aren't given any value. Is it possible to only get the defined ones? Regards Raymond "Matthew Luchak" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how about... Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: A tricky one? Thanks for answering. But this only works if the customer orders one of each. Do you know how to do it if, lets say the customer order 2 hamburgers and nothing else? Raymond "Raymond LilleøDegåRd" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I'm trying to make this form working with a mail() script. > I made this form. Then the customer could write how many "pizzas" or > "hamburgers" as he want. > But how do I solve this without too much headache? Havent slept for days > because of this problem : ) > > > > > > > > script > /* recipients */ > $to = "[EMAIL PROTECTED]" ; > > /* subject */ > $subject = "Order"; > > /* message */ > $message = "I would like to order $?"; > > /* To send HTML mail, you can set the Content-type header. */ > > /* additional headers */ > $headers = "From: Someone <[EMAIL PROTECTED]>\r\n"; > > > /* and now mail it */ > mail($to, $subject, $message, $headers); > > > Best regards > > Raymond > > -- 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 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 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] Re: A tricky one?
how about... Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: A tricky one? Thanks for answering. But this only works if the customer orders one of each. Do you know how to do it if, lets say the customer order 2 hamburgers and nothing else? Raymond "Raymond LilleøDegåRd" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I'm trying to make this form working with a mail() script. > I made this form. Then the customer could write how many "pizzas" or > "hamburgers" as he want. > But how do I solve this without too much headache? Havent slept for days > because of this problem : ) > > > > > > > > script > /* recipients */ > $to = "[EMAIL PROTECTED]" ; > > /* subject */ > $subject = "Order"; > > /* message */ > $message = "I would like to order $?"; > > /* To send HTML mail, you can set the Content-type header. */ > > /* additional headers */ > $headers = "From: Someone <[EMAIL PROTECTED]>\r\n"; > > > /* and now mail it */ > mail($to, $subject, $message, $headers); > > > Best regards > > Raymond > > -- 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 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] timing
If the other application is written in PHP you can use "flock". ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 11:00 AM To: Php-General Subject: [PHP] timing I have a script that when is executed parses and html file and writes the contents to a text file. I need to then read this text file from another apllication Is there a way of timing this operation, so that my other app does not try to access the file before being written? -- 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 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] Parse POST-Data myself
If you know the setup of the form beforehand it is relatively easy to do something like : $string="$myfield1[0] $myfield2[0] $myfield1[1] $myfield2[1] etc..." However I remember one of my stupid mistakes awhile ago was mistakenly giving two form fields the same name. My result was that the second field overwrote the first. How do you get an array? ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Stefan [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 10:03 AM To: PHP Subject: [PHP] Parse POST-Data myself Hi I have following problem: I get a form with some fields having the same name. PHP solves this problem by appending [] to the form-field-names which causes the creation of arrays. My problem now is, that I have to pass those variables further to another script (not PHP) in exactly that order I receive them from the form. But when I have a form (schematically) like this: -input type=text name=myfield1 -input type=text name=myfield2 -input type=text name=myfield1 -input type=text name=myfield2 -input type=text name=myfield1 -input type=text name=myfield2 Then I get in PHP all myfield1 in 1 variable (the array myfield1) and all myfield2 in 1 other variable -> order is irreversibly destroyed. Give the fields numbers is not a solution (for complexity reasons). So my ultima ratio is to parse the post-data myself - but how can I do this? I have not found any indices for a variable containing post-data :-( If someone has another approach to a solution: I will have both ears open for it :) 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 -- -- 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] Setting variables from a text file
How about pseudocode... $variable=variablename; $array = explode("|",$text); foreach ($array as $key => $value) { $variable$key=$value; } ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 3:12 PM To: Rudi Ahlers; PHP General Subject: Re: [PHP] Setting variables from a text file Someone may have a better way but you can read each line (assuming the file uses \n for a new record) and use: arrayname = explode("|",$variable_holding_line_from_file); Then you can do assign the variables as such: $name = $arrayname[0]; etc Could be a better way from the list :) Jeff - Original Message - From: "Rudi Ahlers" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Wednesday, November 14, 2001 3:08 PM Subject: [PHP] Setting variables from a text file > Hi > > Say I have a text file, separated by "|" ( a pipe). Now, I want to extract > that info, in the form of variables. I can extract and display the info in > the text files, but that's not what I want. I want to be able to tell it > that the first entry should be variable1, the second entry should be > variable2, etc. I add the info into the file with a script, that always adds > variable1 into field one, variable2 into field2, etc. These variables are > taken from a form. Now, I need to pass those variables onto another script, > but I need to be able to extract them. Can anyone help me with this please? > Thank you > > Rudi Ahlers > > > > -- > 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 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 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] variable issue
if(!isset($dte)) { $dte=date("j", time()+$ctime);} You don't need the else statement. ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Clint Tredway [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 2:37 PM To: PHP General Subject: [PHP] variable issue Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j", time()+$ctime); } else { $dte=$dte; } and this causing an error in the 'if' expression. Thanks! clint -- 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 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] defending PHP mail function
OK. here's why I think it's in PHP's SMTP support: There is an address that fails in 4.06 yet functions in 4.04 - exactly the same code, same SMTP server, same .ini, everything the same. I wouldn't question the class if I hadn't tested my own code and settings first. I've been trying to track this down for the past two weeks and have already been advised by someone on this list that PHP's SMTP support is not the greatest: >SMTP code in PHP is not good enough. It needs to be rewritten. >Yasuo Ohgaki It doesn't do much good to test on a nix box because what I'm looking for is a solution to a PHP/SMTP problem. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:57 AM To: PHP General List Subject: Re: [PHP] defending PHP mail function On Wednesday 31 October 2001 08:40 am, you wrote: > for now it's PHP that's in question AFAIK, this is the first I've ever heard of probelms with mail() not sending to perfectly valid email addresses. Scalability issues and other performance problems, sure, but that's a different animal. Given the number of people that use PHP (and use mail(), especially) I would certainly think this problem would have been reported before if it were a real bug. So, to be blunt, you probably have a problem with your code, your SMTP server, the way you've configured PHP, or something other than mail(). It's easy to blame it on mail() and/or PHP, but I think you're barking up the wrong tree. Find a forgiving customer who reported the problem, ask for their help in troubleshooting it and then send some test emails from a completely different server, preferably on a *nix platform. (not because *nix is better than windows, but because *nix PHP doesn't use smtp for mail delivery) --kurt -- 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 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] defending PHP mail function
>Well hey, if mail() won't send to those addresses, what's wrong with us >testing them? :-) ;) >Can you send to those addresses from a regular email client? If so, can you >do it from the command line with your MTA? Of course I am talking about valid addresses, in fact there is at least one address that "works" with 4.04 but not with 4.06. I apologize about being vague with the addresses that fail but I obviously can't be sending out my client's email addresses for testing - for now it's PHP that's in question - if I send out the client's addresses well... management might just decide to kill two birds with one stone. -- 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] defending PHP mail function
The addresses I know about are clients that are already a little peeved with me so I can't send them out for testing but I have found at least 4 addresses that will "not work" (no error message, just dead air) with Mail(). It is something about the string of letters that does it because if I try "[EMAIL PROTECTED]" it doesn't mail. If I try "[EMAIL PROTECTED]", or the like, it mails. I first noticed this problem when inserting addresses into the "From:" field and have now found it happening (not) in the "To:" field. Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Jason Brooke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:10 AM To: Matthew Luchak; Php-General (E-mail) Subject: Re: [PHP] defending PHP mail function Which addresses won't work? -- 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] defending PHP mail function
WIN 2000 Blankwhat os was it?!?!? -- 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] defending PHP mail function
Title: Blank Recently I have had to defend the use of PHP in light of a number of screw-ups with the mail function in 4.0+. It seems that some email addresses will simply "not work" with mail. I have been shopping around for a smtp direct class ( http://www.zend.com/codex.php?id=347&single=1 ) looks pretty good to me and was wondering if anyone has any experiences, shortcuts etc. to this kind of problem with mail. ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
[PHP] RE: check if file is already in use before fopen
Title: Blank damn... RTFM. I just now discovered flock. Sorry 'bout that. ps. Don't flame me for being rude to the original poster. I am the original poster ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message-From: Matthew Luchak Sent: Thursday, October 04, 2001 11:11 AMTo: '[EMAIL PROTECTED]'Subject: check if file is already in use before fopen Is there a way to verify if a file is in use by another user before fopening it? ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
[PHP] check if file is already in use before fopen
Title: Blank Is there a way to verify if a file is in use by another user before fopening it? Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED]
RE: [PHP] Running for loop and concat. variables...
I think using isset should do it. try: for ($i = 0; $i <= $ffromx; $i++) { if (isset($ffrom.$i)){ echo $ffrom.$i."";} } ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 2:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Running for loop and concat. variables... I have a page with about 80 checkboxes on it. The values are names and my users are to select names. Now on the next step I want to be able to list all names processed. I thought a for loop would be best but am having problems. $ffromx is the number of checkboxes generated in the previous step. So I want to step through each to make sure that they were checked or not and then display them. for ($i = 0; $i <= $ffromx; $i++) { if ($ffrom.$i){ echo $ffrom.$i."";} } -- 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] HTML tags in database fields
sure. Quick and dirty is to count all the '' tags and compare this to the number of '' tags. If the number doesn't match up spit out a message saying "Sorry, I can't complete your request you have $countopen - $countclose $whatever tags not closed". Also check for the reverse; closed but not opened tags... Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] Hello. I wrote a comments application that allows the use of some HTML tags for text formatting (). I ran into a problem of users not closing the tags (), so when I display a page with all the comments, if the user did not close the tag then all the text in the other comments is bold. Is there a solution to this? -- 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] Variable Next To Variable?
how about : if ((isset($number ))&&($number <= $max)){ while ($number > 0;$number -- ) { echo 'Last Name';} } if you're not crazy about having the fields labled in reverse order you could push to an array and then arsort the array. ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] What I'm doing is having a form page ask, "How many children do you want to sign up?" Then it spits out form fields for as many children as they asked for. So each field has name="C_Last_Name$x" and $x in incremented for each child. Should I make it name="C_Last_Name[$x]" ? Jeff Oien -- 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] echo array name
Not sure if this helps but how about? array("31","has 1 day holiday"), February=>array("28","is very cold")); for($i=0; $i < count($months); $i++) { while(list($key,$val)=each($months)) {echo $key.' has '.$val[0].' days, it '.$val[1].' ';} } ?> Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- 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] dynamically naming arrays
any hints on dynamically naming arrays? ie: $stuff= explode ("!", $contents); //$stuff[3] is "foo" $stuff[3]=explode("&",$stuff[4]); print_r($foo); ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- 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] OT question..
Happiness is a warm gun. - John Lennon > > What luck for the rulers that men do not think. > > - Adolf Hitler Could you please remove that signature. Thanks. -Egon -- 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 redirection
http://www.somewhere.com/index.php";); exit; ?> ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] > Hi, > > Is there a PHP function that will redirect the current page to another url? -- 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] nslookup function ?
I'm working on a email address verification script and need to do a DNS lookup given the IP number of a remote host. ie: is [EMAIL PROTECTED] a viable address? get IP gethostbyname(here.net); nslookup IP to get mail server address pfsockopen blah...blah..blah... sois there a nifty yet undocumented nslookup() function out there? ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- 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_register()
I would be very interested in hearing of any developments with session anomilies.. Netscape® Communicator 4.76 M$2000 PHP Version 4.0.4pl1 System Windows NT 5.0 build 2195 Server API CGI ZEND_DEBUG disabled Thread Safety enabled "works" using: Hello visitor, you have seen this page times. is necessary to preserve the session id # in the case that the user has disabled cookies ?> ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] I would be very interested in hearing of any developments with session anomilies.. Netscape® Communicator 4.76 M$2000 "works" using: Hello visitor, you have seen this page times. is necessary to preserve the session id # in the case that the user has disabled cookies ?> ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- 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] Returning Lowest Number Not In Array
pseudo code: for($i=-1; $i < count($my_array); $i++) { if (!in_array($i,$my_array)){echo $i; exit;} } should do it. ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Mike Potter [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 9:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Returning Lowest Number Not In Array Hi all: I'm hoping someone can help me out with this array problem. I'm trying to find the lowest number which is not in the array. -- 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 and array logic
I can't quite get the logic to create my own associative arrays: if: $stuff[0]="165.33.114.63 anonymous Mozilla/4.0" $stuff[1]="213.35.354.93 anonymous Mozilla/4.0" how do I end up with: $stuff[0][user]="165.33.114.63" $stuff[0][browser]="Mozilla/4.0" $stuff[1][user]="213.35.354.93" $stuff[1][browser]="Mozilla/4.0" I am hacking away at: foreach( $stuff as $cFile ) { list ($user, $junk, $browser) = split (' ', $cFile); } and it hurts.any hints ? TIA, Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- 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] fsockopen question
$fp = fsockopen("www.somewhere.com",4096); here you have to check the syntax for POST and HTTPS but I THINK (hoo-boy am I ever risking ridicule) it should look something like this: fputs($fp, "POST https://www.somewhere.com/dir/app HTTPS/1.0\r\n\r\n", $xmlstring); then try the response.. ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Michael Conley [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 1:00 PM To: Matthew Luchak; [EMAIL PROTECTED] Subject: RE: [PHP] fsockopen question It looks like that is working, but I'm not getting a response. I created the XML string and set it as $xmlstring. Then, after the fputs that you provided below (except with the URL I'm sending to) I have: fputs($fp, "$xmlstring"); Then, to receive the response I enter: $RetValue=fgets($w_socket, ); echo $RetValue; I am not getting any response, so I have no idea if my XML string is accepted, rejected or what. Is this the right way for me to get the response? After I send the XML string, they will send me back some info that will let me know if the transaction is accepted. -- 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] fsockopen question
I use: $fp = fsockopen("www.somewhere.com",80); fputs($fp, "GET http://www.somewhere.com/somedir/somepage.html HTTP/1.0\r\n\r\n"); to parse. Should be easily modified ________ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Michael Conley [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 12:37 PM To: '[EMAIL PROTECTED]' Subject: [PHP] fsockopen question How do I send the XML string to the above URL? When I use fsockopen, it doesn't like anything other than an IP address or a host name (ie www.myprovider.com). I don't even really see where to force this to go over HTTPS. I set the port to 443, but need to be sure that the data going across uses SSL. How do I send this XML string over HTTPS to https://www.myprovider.com/XMLSubmit/processtrans.asp? -- 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] SVG & PHP
What about writting a gimp plug-in...? http://www.gimp.org Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Nick Winfield [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 9:50 AM To: PHP General Mailing List Subject: [PHP] SVG & PHP Hi, This might be a bit of a long shot, but I'm willing to give it a go. :) Does anyone know of a server-side SVG parser that can be called via some kind of PHP extension? -- 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] Posting to a form
you can't have whitespace in $valsI would replace the whitespace with _ and vice-versa when you want to ouput the $vals... ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] I'm trying to do the following But when Aname is multiple words, such as "Wade Williams", everything from the whitespace on gets cut off. -- 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] Site Searchable function
check php.ini file for "allow fopen" I think. ____ Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: ~~~LeoN~ [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 10:59 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Site Searchable function On 19 Apr 2001 13:25:09 -0700 impersonator of [EMAIL PROTECTED] ("Steve Lawson") planted &I saw in php.general: >fopen("http://localhost/name-of-file") will return the rendered page instead Sounds good (theoretically:). Hovever, in practical attempt on my remote server it gave: Warning: fopen("http://my.domain/file_name.htm","r") - A socket must be already connected. in ...etc on line 304 where it worked ok with 'filesystem open' (On my home window localhost, it worked though). Suggestions, how to go around this problem? Leon. -- 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 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] Advanced Help Needed
check the enctype of your form has not changed I had some inconsistencies using multipart... >when I post a file in the form I recieve an "Cannot Find Server". When >there isnt a file posted then the form works fine. -- 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] Site Searchable function
there is a good starting point for walking a directory tree and printing out the names of the files at: http://www.php.net/manual/en/function.readdir.php it should be no mean feat to add a search file function and voila Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: Kevin A Williams [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 1:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Site Searchable function Hi, I was wondering whether anyone could direct me in the direction of creating a search function like the one on php.net? I have tried looking rather fruitlessly to implement a system, would one possible implementation be to use reference files for the information and then use string matching to analyse the information, or search the source .php files (although security issues of revealing scripts). Thanks in advance -- 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] List Files
$path='/root/helpfiles/'; $dir_handle = opendir($path); while ($file = readdir($dir_handle)) { if ((ereg("help",$file)){ INCLUDE "$path$file"; OR echo ''.$file.' } } Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 8:25 AM To: [EMAIL PROTECTED] Subject: [PHP] List Files Hi, Does anyone know how I can list all the files begining with help in one of my pages. So I have a dir which has various files, like so: help_me.php help_you.php help_us.php Is there some command I can use to select all the files and then print them out? TIA Ade -- 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 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] array_count_values
can someone give a quick hint as to why this does not work: $array = split ("\n", $contents); $stuff = array_count_values ($array); echo $stuff[nuts]; or even: $array = array (split ("\n", $contents)); $stuff = array_count_values ($array); echo $stuff[nuts]; thnx... matthew -- 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]