RE: [PHP] File handling
Justin, Option b. delete all AFTER foo, I.E. truncate the file directly after foo. Leaving foo and all the data before foo untouched. Jeff -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: 29 November 2002 04:29 To: Jeff; [EMAIL PROTECTED] Subject: Re: [PHP] File handling Quick one, how do i read a file for a key word, say TEXt, and the delete the rest of the remaining file? Do you mean: a) how do i make sure a word (eg foo) is in a file, and if it is, delete all contents of the file except the word foo OR b) how do i search a file for the word foo, and delete everything in the file AFTER the word foo ?? Justin French http://Indent.com.au Web Development Graphic Design DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't recover data in php posted with a form tag.
I have 2 files runQuery.php and doSQL.php, where the first one is posting data entered by the user to the second page and displaying it but the data never arrives. Any idea why this would not work, maybe some configuration issue?? Any help is really appreciated... !-- !-- runQuery.php -- DIV align=left FORM name=sql method=post action=doSQL.php INPUT type=text name=clSQL size=50BRBR INPUT type=submit name=submit value=Lancer requètenbsp;nbsp; INPUT type=reset name=reset value=EffacerBR /FORM I class=normali.e. select * from scpsft/I /DIV !-- doSQL.php -- HTML BODY bgcolor=#efefde H1Résultat de la requète:/H1 ?PHP echo ($clSQL); ? /BODY /HTML --
Re: [PHP] File handling
I've got this coed but it still don't do the business: $MESSAGE_FILE=foobar.txt; $handle=fopen($MESSAGE_FILE,w); $sizez= sizeof($handle); $string= 'foo'; while ( fgets($handle,$sisez) { fputs($handle,$sizez); if (strstr($handle,$string)){ break; } } Any ideas? Jeff Ringrose [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Justin, Option b. delete all AFTER foo, I.E. truncate the file directly after foo. Leaving foo and all the data before foo untouched. Jeff -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: 29 November 2002 04:29 To: Jeff; [EMAIL PROTECTED] Subject: Re: [PHP] File handling Quick one, how do i read a file for a key word, say TEXt, and the delete the rest of the remaining file? Do you mean: a) how do i make sure a word (eg foo) is in a file, and if it is, delete all contents of the file except the word foo OR b) how do i search a file for the word foo, and delete everything in the file AFTER the word foo ?? Justin French http://Indent.com.au Web Development Graphic Design DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can't recover data in php posted with a form tag.
FORM action='doSQL.php' method='POST' try that jeff Luc Roettgers [EMAIL PROTECTED] wrote in message 002401c29782$8300de10$3b09c881@rolxp">news:002401c29782$8300de10$3b09c881@rolxp... I have 2 files runQuery.php and doSQL.php, where the first one is posting data entered by the user to the second page and displaying it but the data never arrives. Any idea why this would not work, maybe some configuration issue?? Any help is really appreciated... !-- !-- runQuery.php -- DIV align=left FORM name=sql method=post action=doSQL.php INPUT type=text name=clSQL size=50BRBR INPUT type=submit name=submit value=Lancer requètenbsp;nbsp; INPUT type=reset name=reset value=EffacerBR /FORM I class=normali.e. select * from scpsft/I /DIV !-- doSQL.php -- HTML BODY bgcolor=#efefde H1Résultat de la requète:/H1 ?PHP echo ($clSQL); ? /BODY /HTML -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can't recover data in php posted with a form tag.
hi, you could try to fetch the value from the superglobal variable $_POST or $HTTP_POST_VARS (echo $_POST[clSQL]; echo $HTTP_POST_VARS[clSQL];) regars, bastian Luc Roettgers schrieb: I have 2 files runQuery.php and doSQL.php, where the first one is posting data entered by the user to the second page and displaying it but the data never arrives. Any idea why this would not work, maybe some configuration issue?? Any help is really appreciated... !-- !-- runQuery.php -- DIV align=left FORM name=sql method=post action=doSQL.php INPUT type=text name=clSQL size=50BRBR INPUT type=submit name=submit value=Lancer requètenbsp;nbsp; INPUT type=reset name=reset value=EffacerBR /FORM I class=normali.e. select * from scpsft/I /DIV !-- doSQL.php -- HTML BODY bgcolor=#efefde H1Résultat de la requète:/H1 ?PHP echo ($clSQL); ? /BODY /HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Logging out and session ids
Hi, Friday, November 29, 2002, 4:58:02 PM, you wrote: GS I was just going through the archive. Seems this comes up enough for me GS to think I have something wrong. GS A simplistic code flow of events... GS ?php GS session_start(); GS // user successfully logs in, set a session variable GS $_SESSION['user_id']; GS // when the user logs out, destroy session and redirect to top GS $_SESSION = array(); GS setcookie(session_name(), '', time() - 3600); GS session_destroy(); GS header('location: back_to_top'); ? GS Ok, so when the user logs in, a session id is assigned to them. GS When they log out and are redirected to the beginning, the session id is GS the same (verified by the file name in /tmp and cookie manager in mozilla). GS My question is, even though the session contains no data after its GS destroyed, should the session id remain the same, after logging out, GS or should another be assigned when session_start() is called after the GS redirect??? The browser will send the old cookie and as the name is probably the same as the the old session it will get used again, or at least I think that is what is happening :) This should not be a problem as the data associated with the old session is gone. If you close the browser and start a fresh one you will get a new session id. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
scott wrote: What would php run as on a cobalt raq4 so I don't get the x header warning Best regards As php is a web application, it is the webserver sending emails. Apache runs as user httpd on the raq on which I have an account. Get it to send you an email so that you can check. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to do this in PHP ? If it is then, how ?
In the browser it might look something like this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titlePizza place/title script function add(n) { document.pizza.num.value=document.pizza.num.value + n; if(document.pizza.num.value.length!=2) { document.pizzaimage.src='blank.jpg'; } else { // alert(Pizza is + document.pizza.num.value); document.pizzaimage.src='show_image.php?img_id=' + document.pizza.num.value; } } /script /head body img src=blank.jpg alt= name=pizzaimage id=pizzaimage border=0 form action= name=pizza input type=text name=num onchange=checkimg(this.value) input type=button value= Clear onclick=this.form.num.value=''; add('')br input type=button value= 7 accesskey=7 onclick=add('7') input type=button value= 8 accesskey=8 onclick=add('8') input type=button value= 9 accesskey=9 onclick=add('9') br input type=button value= 4 accesskey=4 onclick=add('4') input type=button value= 5 accesskey=5 onclick=add('5') input type=button value= 6 accesskey=6 onclick=add('6') br input type=button value= 1 accesskey=1 onclick=add('1') input type=button value= 2 accesskey=2 onclick=add('2') input type=button value= 3 accesskey=3 onclick=add('3') br input type=button value= 0 accesskey=0 onclick=add('0') input type=submit value=nbsp;nbsp;nbsp;nbsp;Ordernbsp;nbsp;nbsp;nbsp; br /form /body /html Additional information (size, weitht ...) can be provided in the image Axis Computers wrote: Thanks for replying, Now I know it's possible to do it, but I still don't know how can I develop such interface, I will do it in php and mysql, but I need a little guidance with the way to do it I just can't figure out how ... Thank you Ricardo Fitzgerald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Questions on PHPs openssl extensions
I've been looking on PHP.net's manual for openssl functions but it seems that they have very little information on the said functions. Ive tried posting on mailing lists for some help but I havent been receiving fruitful responses. Some even told me that it is very difficult to find a great deal of information on client authentication, simply because 99% of SSL implementations are only concerned with authenticating the server. I have an idea but I couldnt implement it because there are things that I wanted to know first. Is there a way where I can get or reference the certificate submitted by the client when they connect to the server? Coz I looked at the openssl_x509_read() function and the manual says that openssl_x509_read() parses the certificate supplied by x509certdata and returns a resource identifier for it. However, Im wondring what is this x509certdata or how would I assign the client's certificate to this. Ive seen some examples but they all point to a definite path to the harddisk and not by remote connection. I was thinking of something like the pg_connect() in postgres or ldap_connect where you get the resource that you can later use for processing. Coz like in this example, they say that $data and $signature are assumed to contain the data and the signature but I couldnt find the docs nor explanation on how the get $data and $signature. // fetch public key from certificate and ready it $fp = fopen(/src/openssl-0.9.6/demos/sign/cert.pem, r); $cert = fread($fp, 8192); fclose($fp); $pubkeyid = openssl_get_publickey($cert); // state whether signature is okay or not $ok = openssl_verify($data, $signature, $pubkeyid); if ($ok == 1) echo good; elseif ($ok == 0) echo bad; else echo ugly, error checking signature; // free the key from memory openssl_free_key($pubkeyid); Maybe, I just overlooked it or most likely, I just couldn't understand it, but one thing is for sure: Im really, really lost. But I have a feeling that these openssl_x509_xxx set of functions are the answer so if only I can find a more elaborate information on this (not like on http://www.php.net/manual/en/function.openssl-x509-read.php which of course, doesnt contain much), I think I can pull this off. Please help me. Happy ThanksGiving, Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] images
Not sure if this would be anyway possible, hopefull some of you GD gurus will have an idea. Basically the scenario is, I have a dirtectory of images(5 to be exact). What I want to be able to do is something similar to the script below, which randomizes a gif image selection. the file is called image.php, the person calls it like they would an image: img src=img.php and boom there ya have a nice gif image. But what I want to be able to do is join together a number of images, so based on certain conditions, a user could call img src=img.php and this would show maybe two/three/four images joined together. I can do this with one fine, but I thought there may be some sort of GD function that would tackle this. Thanks for any help, Craig ?php Header(Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0); Header(Expires: Thu, 19 Nov 1981 08:52:00 GMT); Header(Pragma: no-cache); Header(Content-Type: image/gif); srand((double)microtime()*100); $i = 0; $dir = opendir(img); while(($im = readdir($dir))) { if($im != .. $im != .){ $image[$i] = $im; $i++; } } closedir($dir); $tot = count($image)-1; $n = rand(0,$tot); readfile(img/.$image[$n]); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamic arraynames
-Original Message- From: Floyd Baker [mailto:[EMAIL PROTECTED]] Sent: 28 November 2002 17:09 OK, I think I'm finally beginning to understand what you're up to, and it seems to me everyine's been making rather heavy weather of it so far! The user's choice is made from a drop down list of available items, prior to running the routine itself. The choices are predetermined and kept in a personal table to be called by the routine. This part is finished to the point of putting the needed column names at the top of the input columns on the form. The choices are fixed spellings to match formula if-then's, etc. If this is the case, couldn't you use 2-dimensional arrays with the column names as the first dimension, and the values relating to it in the second dimension? So you'd have something like $user['colour'][0] $user['hobby'][0] $user['etc'][0] $user['colour'][1] $user['hobby'][1] $user['etc'][1] $user['colour'][2] $user['hobby'][2] $user['etc'][2] $user['colour'][3] $user['hobby'][3] $user['etc'][3] etc. Anyway, going back to your forms: if ($start_button==1) { print form action=$PHP_SELF method=get; print Input the following information; // these are your fixed cells and they now contain user input print Name: input type=text name=name value=\$name\ size=20br; print Temp: input type=text name=temp value=\$temp\ size=20br; print Time: input type=text name=time value=\$time\ size=20br; print Offset: input type=text name=offset value=\$offset\ size=20br; print Input the names of the desired additional cells in the spaces provided.; // this is where your user will name the cells he asked to create for($i=1;$i=$additional_cells;$i++) { print $i input type=text name=user_added[$i] size=20br; } OK, this looks good -- it will give you your array of column names. But you really should quote all those attributes, so: print $i input type=\text\ name=\user_added[$i]\ size=\20\br; The next bit is where I'd do the clever stuff to build the 2-dimensional array: Name Temp Time OffsetEtc. As needed... process 1[input] [input] [input] [input] [inputs] process 2[input] [input] [input] [input] [inputs] process 3[input] [input] [input] [input] [inputs] process 4[input] [input] [input] [input] [inputs] Right now, for the three *basic* columns, I have the lines below in a 'while' loop. INPUT TYPE='text' NAME='temp[]' VALUE='$temp' SIZE='10' MAXLENGTH='10' INPUT TYPE='text' NAME='time[]' VALUE='$time' SIZE='10' MAXLENGTH='10' INPUT TYPE='text' NAME='offs[]' VALUE='$offs' SIZE='10' MAXLENGTH='10' So, you just need additional lines in your while loop to add the entries for the user columns, named in such a way that you'll get back the 2-dimensional array I described earlier. As you already have those column namers in the $user_added[] array built above, we can do it like this: foreach ($user_added as $user_col): echo input type='text' name=\user['$user_col'][]\ size='10' maxlength='10'; endforeach; and, bingo, you have your user's input being submitted into a 2-dimensional array indexable by column name and row number. (Actually, to be absolutely sure all the row numbers match, I'd be outputting those into the form field names as well.) Additionally, having gone this far I'd consider doing the same sort of thing with your standard columns, something like this: $std_cols = array('temp', 'time', 'offs'); // now fill the $user_added[] array from database or wherever echo form ..; for ($n=0; $nROWS_NEEDED; $n++): foreach ($std_cols as $col_id): echo input type='text' name=\$col_id[$n]\ size='10' ; endforeach; foreach ($user_added as $col_id): echo input type='text' name=\user['$col_id'][$n]\ size='10' ; endforeach; endfor; You could even 2-dimensionalize your standard columns, so you get: $std['temp'][0] $std['time'][0] $std['offs'][0] $std['temp'][1] $std['time'][1] $std['offs'][1] etc., with the corresponding form fields being written using: foreach ($std_cols as $col_id): echo input type='text' name=\std['$col_id'][$n]\ size='10' ; endforeach; And, then, of course, you might well wonder why you should bother having two separate sets of very similar arrays, when you could merge them and just keep track of how many are standard ones (with the rest automatically treated as user added ones). So you'd start off something like: $cols = array('temp', 'time', 'offs'); define('N_STD_COLS', 3); and build from there -- but I leave that as an exercise for the reader!!! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services,
php-general Digest 29 Nov 2002 11:47:32 -0000 Issue 1733
php-general Digest 29 Nov 2002 11:47:32 - Issue 1733 Topics (messages 126443 through 126464): Werid problemswith mail() command: From address on sent messages 126443 by: C.F. Scheidecker Antunes Suppressing X-Return-Path 126444 by: Darren Fehrmann Re: Is it possible to do this in PHP ? If it is then, how ? 126445 by: Axis Computers 126461 by: Marek Kilimajer file creation date 126446 by: Research and Development 126450 by: John W. Holmes Re: Postnuke --- Meta keywords and title different for all the pages... 126447 by: Peter Houchin Re: File handling 126448 by: Justin French 126454 by: Jeff RingRose 126456 by: Jeff RingRose Help with login/redirect/insert to dbase 126449 by: Karl James IRCG/PHP and Apache 1.3 126451 by: Sascha Schumann Logging out and session ids 126452 by: Gerard Samuel 126459 by: Tom Rogers how to use mssql_connect()? 126453 by: Kim Can't recover data in php posted with a form tag. 126455 by: Luc Roettgers 126457 by: Jeff RingRose 126458 by: Bastian Vogt Re: Detecting email bounces sent by the mail function? 126460 by: Chris Hewitt Questions on PHPs openssl extensions 126462 by: Richard Rojas images 126463 by: Craig Re: dynamic arraynames 126464 by: Ford, Mike [LSS] Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Hello All, I wonder if is there anyone who ever had the same problem and know how to solve it. I have a web site that does send e-mail to some users based on requests. The problem is that although I pass the right user/from address on the mail function, the message source shows From as beeing apache@localhost and therefore some messages bouce back due to anti spam filters. This server is a Red Hat Linux 7.2 and it does not have apache 2.0 but 1.3. It does not have sendmail runnig or installed but another server on the same network does have it. The problem is that I do not want and cannot have my message headers with a From: Apache@LocalHost as this copy bellow shows: I've changed the header variable and put a From in it so it does displays the right FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by servername, etc is there so the spam filters filter it. Return-Path: apache Received: (from apache@localhost) by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458; Thu, 28 Nov 2002 19:55:26 -0200 Date: Thu, 28 Nov 2002 19:55:26 -0200 Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Order # 603 (511066220021128194052) Content-Type: text/html From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-Mailer: PHP/ My php.ini has an smtp entry but no sendmail is running on the local machine. Do I have to have one running? I wish I did not have to do it. Any other way to fix this issue? Carlos Fernando Scheidecker Antunes Linux User #207984 ---End Message--- ---BeginMessage--- Has anyone had experience with PHP or a mail server setting the X-Return-Path header on mail sent using PHP's mail() command? Our tests indicate the X-Return-Path is being set to the sendmail_from address found in php.ini. Our code definately isn't doing it, as a hello-world mail() example proved. The system is running Win 2K, all current service packs and hot fixes, IIS 5, php 4.2.3 (running as a CGI), and the Zend optimizer 2.0.1. The mail server is Microsoft Exhange Server. Does anyone know why the webserver or mail server would set the X-Return-Path, and if it can be suppressed? Regards, Darren Fehrmann Storefront.com ---End Message--- ---BeginMessage--- Thanks for replying, Now I know it's possible to do it, but I still don't know how can I develop such interface, I will do it in php and mysql, but I need a little guidance with the way to do it I just can't figure out how ... Thank you Ricardo Fitzgerald - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Wednesday, November 27, 2002 10:34 AM Subject: Re: [PHP] Is it possible to do this in PHP ? If it is then, how ? Using javascript you can change the src of image. So you start with blank image, and if onchange event handler finds out the input field has two chars, changes the src of the image to say show_image.php?id=input.value Axis Computers wrote: Hi, I was wondering if this is possible to in PHP ... I am developing an application for a pizza place, where touch typing interface is much faster than using the mouse, so I was wondering if I can develop an interface with a calculator style keypad, and the codes entered (using something like STDIN in Perl),
[PHP] OpenSSL Encryption to a browser.
I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted automatically, but only when the destination browser has the right private key installed. Would it be possible to us header(Content-type: multipart/encrypted), since it is originally meant for messages? -- René
RE: [PHP] Re: Multidimensional arrays (more and more...)
-Original Message- From: Mako Shark [mailto:[EMAIL PROTECTED]] Sent: 28 November 2002 18:20 A little more info on my count()ing. I have $issue[0][number] to $issue[x][number] just like any other multidimensional array (we'll call them m-arrays for simplicity). If I try to count($issue), I'll get all instances of my array (instances?) mltipled by the number of elements Uh -- have you actually tried this? Without doing so myself, I'm 99% sure that count($issue) will give you the answer you're looking for -- i.e. the number of different subscripts in the first dimension. From your description of how you expect count() to work, I suspect you're labouring under a misapprehension about how PHP arrays are built: in this case, $issue is an array of (x+1) elements, indexed from 0 to x, each element of which just happens to contain an array itself; it's not a single array of (x+1)*(no. of string subscripts) elements. This means you can do something like $current = $issue[0] and $current will be the array of string-subscripted elements contained in $issue[0]. My problem is I need to loop through these. Well, you don't need to know how many there are to do this -- just use foreach: foreach ($issue as $n=$elements): // in here, $elements['number']==$issue[$n]['number'], etc. endforeach; Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File handling
on 29/11/02 7:06 PM, Jeff RingRose ([EMAIL PROTECTED]) wrote: Justin, Option b. delete all AFTER foo, I.E. truncate the file directly after foo. Leaving foo and all the data before foo untouched. And what happens if there are more than one occurrence of foo? I assume you mean the first occurrence. And what happens if foo is found within another word, like aafooaa... this example assumes this doesn't matter... it's looking for 'foo', not ' foo '. One of way is to read the file into a variable, split the var on foo, and rewrite the file out. ? $split = 'foo'; $file = 'dummyfiles/01-04-29.php'; // get file contents $fd = fopen ($file, r); $mytext = fread ($fd, filesize($file)); fclose ($fd); // split it on $split, append $split to first chunk list($prefix,$suffix) = split($split,$mytext); unset($suffix); $newtext = $prefix.$split; // write to file $fp = fopen($file, 'w'); fwrite($fp, $newtext); fclose($fp); ? 1. Totally untested code, but most of it was lifted out of the manual in some way or another. 2. Permissions of the file to be read/written will need to be correct 3. I've included no error reporting or correct checking... you'll need to add this yourself Season to taste... Justin French http://Indent.com.au Web Development Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OpenSSL Encryption to a browser.
I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted automatically, but only when the destination browser has the right private key installed. Most people would leave apache (usually with mod_ssl) to handle the encryption over https. Im not even sure if you could do what I think you are asking without controlling the whole http communication (as the whole thing is SSL wrapped, or none of it). Would it be possible to us header(Content-type: multipart/encrypted), since it is originally meant for messages? I think you need to look into one of the following: - Handling the requests yourself by listening to port 80 (not advisable - php wasnt built for that sort of task, but its possible) - Using ssl certificate pairs and installing them in a custom manner on the apache installation - Alternative methods PS: if your not using apache, I cant help you at all. Others may. --- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array with session
hello everyone, I'm trying to get some images value from a checkbox putting them in a session to preserve the data. The array works perfectly without the session_start() and session_register. can anyone help? html script html head title/title /head body form action=submit_information.php method=post input type=checkbox name=Image[] value=Image_One img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_Two img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_Three img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_four img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_five img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_six img src=.gif name=Image_Twobr input type=submit value=submit /form /body /html php script: submit_information.php ?php session_start(); session_register(Image); $count = count($Image); for ($i=0; $i$count; $i++) { echo $Image[$i]; } //I also tried that /*foreach ($Image as $i= $Img) { $Img == $Image[$i]; echo $Img; }*/ ? - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs
[PHP] Re: array with session
You should have session_start(); on every page that you want to hold the session. The way I would do what you are trying to achieve is go the $_SUPERGLOBALS way.. on the submit_information.php page: ?php session_start(); $_SESSION['image'] = $_POST['image']; foreach($_SESSION['image'] as $foo){ echo $foo . br\n; } ? Also, another good way of debugging etc is to use the print_r() function (http://www.php.net/print_r) If you do : pre?php print_r($_SESSION);?/pre This produces a nice formatted look at the the session arrays/structures - same goes for all arrays. Hope that helps, Craig Laurence [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello everyone, I'm trying to get some images value from a checkbox putting them in a session to preserve the data. The array works perfectly without the session_start() and session_register. can anyone help? html script html head title/title /head body form action=submit_information.php method=post input type=checkbox name=Image[] value=Image_One img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_Two img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_Three img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_four img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_five img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_six img src=.gif name=Image_Twobr input type=submit value=submit /form /body /html php script: submit_information.php ?php session_start(); session_register(Image); $count = count($Image); for ($i=0; $i$count; $i++) { echo $Image[$i]; } //I also tried that /*foreach ($Image as $i= $Img) { $Img == $Image[$i]; echo $Img; }*/ ? - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: array with session
Files are attached.. Craig Craig [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You should have session_start(); on every page that you want to hold the session. The way I would do what you are trying to achieve is go the $_SUPERGLOBALS way.. on the submit_information.php page: ?php session_start(); $_SESSION['image'] = $_POST['image']; foreach($_SESSION['image'] as $foo){ echo $foo . br\n; } ? Also, another good way of debugging etc is to use the print_r() function (http://www.php.net/print_r) If you do : pre?php print_r($_SESSION);?/pre This produces a nice formatted look at the the session arrays/structures - same goes for all arrays. Hope that helps, Craig Laurence [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello everyone, I'm trying to get some images value from a checkbox putting them in a session to preserve the data. The array works perfectly without the session_start() and session_register. can anyone help? html script html head title/title /head body form action=submit_information.php method=post input type=checkbox name=Image[] value=Image_One img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_Two img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_Three img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_four img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_five img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_six img src=.gif name=Image_Twobr input type=submit value=submit /form /body /html php script: submit_information.php ?php session_start(); session_register(Image); $count = count($Image); for ($i=0; $i$count; $i++) { echo $Image[$i]; } //I also tried that /*foreach ($Image as $i= $Img) { $Img == $Image[$i]; echo $Img; }*/ ? - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs begin 666 submit_information.php M/#]P:' -@T*7-EW-I;VY?W1AG0H*3L-@T*21?4T534TE/3ELG:6UA M9V4G72 ](1?4$]35%LG26UA9V4G73L-@T*69OF5A8V@H)%]315-324]. M6R=I;6%G92==(%S(1F;V\IPT*#0H)65C:\@)9O;R N((\8G(^7XB M.PT*#0H)?0T*#0H_/@T*/'!R93X-@D\/W!H!PFEN=%]R*1?4T534TE/ .3BD[(#\^#0H\+W!R93X` ` end begin 666 index.html M/AT;6P^#0H\:5A9#X-CQT:71L93X\+W1I=QE/@T*/]H96%D/@T*#0H\ M8F]D3X-@D\9F]R;2!A8W1I;VX](G-U8FUI=%]I;F9OFUA=EO;BYP:' B M(UE=AO9#TB]S=(^#0H)2!);6%G95]/;F4\:6YP=70@='EP93TB8VAE M8VMB;W@B(YA;64]26UA9V5;72!V86QU93TB26UA9V5?3VYE(CX\8G(^#0H) M2!);6%G95]4=V\\:6YP=70@='EP93TB8VAE8VMB;W@B(YA;64]26UA9V5; M72!V86QU93TB26UA9V5?5'=O(CX\8G(^#0H)2!);6%G95]4:')E93QI;G!U M=!T7!E/2)C:5C:V)O(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]4 M:')E92(^/)R/@T*0D@26UA9V5?9F]UCQI;G!U=!T7!E/2)C:5C:V)O M(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]F;W5R(CX\8G(^#0H)2!) M;6%G95]F:79E/EN'5T('1Y4](F-H96-K8F]X(B!N86UE/4EM86=E6UT@ M=F%L=64](DEM86=E7V9I=F4B/CQBCX-@D)($EM86=E7W-I#QI;G!U=!T M7!E/2)C:5C:V)O(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]S:7@B M/CQBCX-@D)(#QI;G!U=!T7!E/2)S=6)M:70B('9A;'5E/2)S=6)M:70B ?/@T*3PO9F]R;3X-CPO8F]D3X-CPO:'1M;#X-@`` ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] First PHP
Hello! I would like to know, Who made the first step to start programming PHP? So who is the father of PHP. Can anyone give me a link to proof it? -- =|---+---|= Heikki Kniivilä [EMAIL PROTECTED] http://heikkikk.homelinux.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP
hi, how about the manual? http://www.php.net/manual/en/history.php#history.php :) Regards, khalid _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload wont work, OS X
I have trouble using upload scripts - none of them work on my current config. I'vq got php 4.2.3 and global registerd = off. The problem is that the script doesnt send the variable $_FILES['my_file'] as it should. I can only upload if i hard code the filename into the script. OS: OS X 10.2 PHP: PHP 4.2.3 MYSQL: 3.23.51 // the script i've tried, it works with older versions av php. ?php // Programmerer: Kim aka astrox // Mail: [EMAIL PROTECTED] // Dato: 19.04.2002 // Hjemmeisde: www.htmlhjelp.no ? h3Bilde upload/h3 Dette scriptet uploader bilder og bare bilder!br Dvs.. *.jpg, *.gif og *.pngbrbr ?php #Config $MAX_FILE_SIZE = $_POST['MAX_FILE_SIZE']; $bilde_fil = $_FILES['bilde_fil']; // HTTP_POST_FILES $nyttnavn = $_POST['nyttnavn']; $ending = $_POST['ending']; $Upload = $_POST['Upload']; echo is_array($HTTP_POST_FILES['bilde_fil']); print_r($bilde_fil); print $bilde_fil; $path=upload; //Mappa som bildene skal havne i (husk den siste '/') #Ikke rediger under her hvis du ikke vet hva du driver med :) if ($bilde_fil $nyttnavn){ $ok = 1; if (is_file($path.$nyttnavn.$ending)){ print bSorry/b, fila eksisterer allerede, finn p et nytt navn.br; $ok = 0; } if (preg_match(/^[\/\\\.]/, $nyttnavn)){ print bSorry/b, filnavnet kan ikke begynne ned: '.', '/' eller '\'br; $ok = 0; } if (!($ending == .jpg || $ending == .gif || $ending == .png)){ print bSorry/b, ingen triksing med filendingen ($ending) takk!br; $ok = 0; } print br; } if ($ok){ $res = copy($bilde_fil, $path./.$nyttnavn.$ending); print ($res)?bFerdig/b, uploadet .$nyttnavn.$ending.!br:bSorry/b, Kunne ikke uploade.br; print br; } ? form name=formen action=upload.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=100 Bilde: input type=file name=bilde_filbr Hva skal fila hete p servern: input type=text name=nyttnavn select name=ending option.jpg/option option.png/option option.gif/option /select brbrinput type=submit value=Upload /form
Re: [PHP] Logging out and session ids
Tom Rogers wrote: Hi, Friday, November 29, 2002, 4:58:02 PM, you wrote: GS I was just going through the archive. Seems this comes up enough for me GS to think I have something wrong. GS A simplistic code flow of events... GS ?php GS session_start(); GS // user successfully logs in, set a session variable GS $_SESSION['user_id']; GS // when the user logs out, destroy session and redirect to top GS $_SESSION = array(); GS setcookie(session_name(), '', time() - 3600); GS session_destroy(); GS header('location: back_to_top'); ? GS Ok, so when the user logs in, a session id is assigned to them. GS When they log out and are redirected to the beginning, the session id is GS the same (verified by the file name in /tmp and cookie manager in mozilla). GS My question is, even though the session contains no data after its GS destroyed, should the session id remain the same, after logging out, GS or should another be assigned when session_start() is called after the GS redirect??? The browser will send the old cookie and as the name is probably the same as the the old session it will get used again, or at least I think that is what is happening :) This should not be a problem as the data associated with the old session is gone. If that is the case, then the setcookie() call to destroy the clien't cookie probably isn't neccessary. If you close the browser and start a fresh one you will get a new session id. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Werid problemswith mail() command: From address on sent messages
C.F. Scheidecker Antunes wrote: The problem is that I do not want and cannot have my message headers with a From: Apache@LocalHost as this copy bellow shows: I've changed the header variable and put a From in it so it does displays the right FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by servername, etc is there so the spam filters filter it. Return-Path: apache Received: (from apache@localhost) by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458; Thu, 28 Nov 2002 19:55:26 -0200 Date: Thu, 28 Nov 2002 19:55:26 -0200 Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Order # 603 (511066220021128194052) Content-Type: text/html From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-Mailer: PHP/ My php.ini has an smtp entry but no sendmail is running on the local machine. Do I have to have one running? I wish I did not have to do it. Any other way to fix this issue? I have not seen any replies to this, I don't think I can see exactly what is wrong but I may be able to provide some pointers for you. I only use the inbuilt mail() function where I do have sendmail running (I thought it was required). The From: that you set in the mail() function is coming out correctly. The received header showing apache@localhost is the first in the list of computers that your email is going through. It is the webserver that is actually sending the email. On RH7.2 Apache runs as the user apache so that is correct. What I cannot understand is that the webserver/computer cannot find its own name (so it comes out as localhost). What have you set the hostname of your computer to? It sounds as though it is not set. Have you set the ServerName parameter in httpd.conf (leave it commented out)? What have you set the sendmail_path in php.ini to? I think that it is your computer hostname that is causing the problem. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to use mssql_connect()?
Kim wrote: when i using mssql_connect() function,that's show Fatal error: Call to undefined function: mssql_connect() on php page,i don't know why that it is! php 4.2.3 sql server 2000 apache 1.3.19 windows 2000 pro php.ini had configurated ok. This error message means that the function is not compiled into your php. I suggest putting a phpinfo.php file in and looking at it to see whether mssql support is actually there. The file can be as simple as: ?php phpinfo(); ? It could be that the php.ini you altered is not where php expects it to be. Phpinfo will show the location for php.ini as the --with-config-file-path configure command. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: rewrite urls with preg_replace
Hi Liljim, thanks very much, with the 'e' modifier and some quote-fixes it works well ! Dieter Liljim [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Dieter, You need to use the 'e' modifier as well as 'is' in your pattern. Have a look in the manual, here: http://www.php.net/manual/en/pcre.pattern.modifiers.php If this modifier is set, preg_replace() does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string. Also look here: http://www.php.net/manual/en/function.preg-replace.php And check the Example 2. Using /e modifier part. Hope that helps ;) James Dieter Koch [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi to all the PHP-Fans out there, i have a syntax-problem with the folowing preg_replace command: $returnString = preg_replace(/(href=\)(.+?)(\)/is, preg_quote(\\1.ebLinkEncode(.\\2.).\\3), $returnString); i'm trying to call my own function within a preg_replace function and it won't work. any ideas ? it seems to me, that the quoting is incorrect, but i'm not shure, why it is incorrect, especially because i use preg_quote() ... thanks in advance for some hints ! best regards [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload wont work, OS X
Hi Magnus, Your problem was you weren't using the correct part of the $_FILES array when using copy(); Cut and Past This: if ($ok){ $res = copy($bilde_fil[tmp_name], $path./.$nyttnavn.$ending); print ($res)?bFerdig/b, uploadet .$nyttnavn.$ending.!br:bSorry/b, Kunne ikke uploade.br; print br; } ? The Important bit is the $bilde_fil[tmp_name] bit. This means it's copying the file from the temporary location on the server to your chosen location. Also, as a side note, replace this too: $MAX_FILE_SIZE = 100; $bilde_fil = $_FILES['bilde_fil']; // HTTP_POST_FILES $nyttnavn = $_POST['nyttnavn']; $ending = $_POST['ending']; if($bilde_fil[size] $MAX_FILE_SIZE) { die(bSorry/b, Kunne ikke uploade.br); } $path=upload; //Mappa som bildene skal havne i (husk den siste '/') Don't set $MAX_FILE_SIZE using $_POST variables for security reasons - someone could very easily alter it in the HTML file!!! Beth Gore magnus nilsson wrote: I have trouble using upload scripts - none of them work on my current config. I'vq got php 4.2.3 and global registerd = off. The problem is that the script doesnt send the variable $_FILES['my_file'] as it should. I can only upload if i hard code the filename into the script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and https
Hi, I'm trying to connect to a https site to get a file. The target site replies to me: Unable to service this URL without parent cache. Is there someone who knows what that means? Thanks, Greg. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with login/redirect/insert to dbase
I think you better describe your question here and wait for the world to answer. -- Maxim Maletsky [EMAIL PROTECTED] Karl James [EMAIL PROTECTED] wrote... : Hello guys Happy thanksgiving!!! My question is I'm Trying to apply this code to what I have done already on my site http://robouk.mchost.com/tuts/tutorial.php?tutorial=login1 my site is this. http://www.ultimatefootballleague.com http://www.ultimatefootballleague.com/ Im trying to do with login and if login is good It takes you to the team page. But I have some questions on this and need to talk to someone online If possible, I can meet via MSN and IRC Please email if interested in helping. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file creation date
How would you know about a file on someone's system before it was implicitly sent you by user? Take a look at JavaScript, but I doubt there will be a sure solution for it. Nothing is sure with JavaScript except for it's cross-browser incompatibility :) -- Maxim Maletsky [EMAIL PROTECTED] Research and Development [EMAIL PROTECTED] wrote... : Is it possible to get the creation date of a file that is going to be uploaded? I saw a function that returns the file creation date once on the server, but is it possible to get that information from a file that is not yet on the server? Thanks in advance. -- 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] Help with the PHP
Try this: http://www.sourceforge.net/projects/phptriad and dowload there phptriad. It is a simplified distribution of PHP. Also, try reading the articles on the web. You might want to start from PHP Beginner (www.phpbeginner.com). There are also some installtion tutorials for you. -- Maxim Maletsky [EMAIL PROTECTED] Ted Frank [EMAIL PROTECTED] wrote... : Hello, I am trying to make my free home page and my friend told me to download the php because it is for the web and i want to make a web page. so i downloaded the php with the flash plugin and i put it on my desktop and nothing showed up - i just want to make the free home page but the php does not work - i double click and noting happens i have the windows 95 with internet exploerer with a pentium 100 drive what do i do? Ted _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- 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] File handling
loop through the file line by line explode()ing every line with TEXt in it. Then, if retrning array count is bigger than one, unset() the key one and break the loop. All read OVERWRITE in the original file. Sorry, too lazy writing the code here :) -- Maxim Maletsky [EMAIL PROTECTED] Jeff [EMAIL PROTECTED] wrote... : Quick one, how do i read a file for a key word, say TEXt, and the delete the rest of the remaining file? -- 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 and https
Is this related to PHP? Or are you getting the error from your browser? In that case, are you using IE? If so, it might be a bug with IE--I've seen it discussed in a few mailing lists. Otherwise, it might indicate that the web server you're connecting to is not configured properly. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! ---BeginMessage--- Hi, I'm trying to connect to a https site to get a file. The target site replies to me: Unable to service this URL without parent cache. Is there someone who knows what that means? Thanks, Greg. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiuser System with Sessions
Hi, I'm building a multiuser system with PHP. It appears that session data is getting overwritten with the latest users information. The site is hosted remotly with a virtual host. The problem only seems to occur to people inside our building (i.e. two people here login to the system with seperate logins). Example: User 1 logs in, session data is: UserID = 1 DescriptionEntered = No QuestionsVisible = No QuestionsRanked = No User 2 logs in, session data is: UserID = 2 DescriptionEntered = No QuestionsVisible = No QuestionsRanked = No Once User 1 refreshes the page or goes to another page User 2's information shows up. So it appears that the last login is being set for the session. I've gotten my host to look into this. From their end they login with the 2 ids and the session data stays completly seperate. Our building accesses the internet through a DSL connection. Would that cause a problem? Any ideas are greatly appreciated. Anson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php and https
i'm using PHP to connect to the server. i need to get a file, parse it, include the datas in mysql and then display an html page with a report... -Message d'origine- De : Marco Tabini [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 29 novembre 2002 16:58 À : DUPUIS Grégoire BE/DGC Cc : PHP-General Objet : Re: [PHP] php and https Is this related to PHP? Or are you getting the error from your browser? In that case, are you using IE? If so, it might be a bug with IE--I've seen it discussed in a few mailing lists. Otherwise, it might indicate that the web server you're connecting to is not configured properly. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Enable Quota function with php
Hello, About the System of my company : Server A : imap server ( come from redhat 6.2 ) Server B : Web server ( redhat system 7.2 ) + IMP ( http://horde.org/imp ) How can I enable the quota function with imap server by this php config ? if (!function_exists('imp_show_quota')) { function imp_show_quota ($imp) { $imap_admin = $imp['user']; $passwd_array = posix_getpwnam($imap_admin); $homedir = split(/, $passwd_array['dir']); $realname = split(,, $passwd_array['gecos']); $quota_html = 'table width=100% border=0 cellpadding=0 cellspacing=0trtd class=itemtable border=0 cellspacing=0 cellpadding=0 width=100%tr'; $quota_html .= 'td align=left class=headerLogin: ' . $realname[0] . ( . $imap_admin . ) . '/td'; $junk = exec(sudo /usr/bin/quota -u $imap_admin | grep /dev/md1, $quota_data,$return_code); if ($return_code == 0 count($quota_data) == 1) { $splitted = split([[:blank:]]+, trim($quota_data[0])); $taken = $splitted[1] / 1000 ; $total = $splitted[2] / 1000 ; $percent = $taken * 100 / $total ; if ($percent = 90) { $color = '#FF'; } elseif ($percent = 80) { $color = '#FCE30D'; } else { $color = '#339933'; } $quota_html .= 'td align=center class=header'; $quota_html .= sprintf(font size=-2Quota on /%s: %.1fMB/%.1fMB (%.1f%%)/font, $homedir[1], $taken, $total, $percent); } else { $quota_html .= 'td align=center class=header'; $quota_html .= Quota not available; } $quota_html .= '/tdtd width=30 class=header align=rightfont size=-30%/font/tdtd width=200 class=header'; $quota_html .= 'table width=100%trtd bgcolor=#ffdiv style=height:6px; width:'. sprintf(%.1f%%, $percent). '; font-size:3px; background-color:'.$color.''; $quota_html .= '/div/td/tr/table/tdtd width=30 class=header align=leftfont size=-3100%/font/td/tr/table/td/tr/table'; return $quota_html; } } And I want the result similar with http://www.ita.org.mo/~edward/imp/screenshot.gif Thank for your help ! Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Logging out and session ids
Hi, I have never bothered with the cookie, I only delete the server side info. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Convert dates
Is there a way to convert a date 2002-11-29 00:00:00:000to 29 November 2002 . Sturle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Convert dates
Is there a way to convert a date 2002-11-29 00:00:00:000to 29 November 2002 Yes. Try strtotime() and date() in PHP, or break the string apart. If this date is coming from MySQL, then look at the DATE_FORMAT() function that you can use in your query to format it. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to access properties of objects within objects
Can't figure out how to get at the properties of an object which itself is a property of another object. In sample code below neither the assignment of $mystring produces an error. ?php class Obj1 { function Obj1 ($string) { $this-string = $string; } } class Obj2 { function Obj1 ($obj) { $this-obj = $obj; } var $mystring = $this-obj-string; } $o1 = New Obj1(hello); $o2 = New Obj2($o1); print \$o2-mystring = $o2-mystringbr ? -- Randall Perry sysTame Xserve Web Hosting/Co-location Website Development/Promotion Mac Consulting/Sales http://www.systame.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting email bounces sent by the mail function?
To the best of my knowledge, there is no way to do this with the mail function. However, I check for bounces using Perl and a cron. I don't see why you couldn't use php to do the same thing though. Ade Smith wrote: Hello Is it possible to detect with PHP whether an email sent using the PHP 'mail' function has bounced back or has not been delivered? I currently all ready check the email address using the 'ereg' function before the mail function is called, but this only checks the format is valid beforehand. Ade -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP
Maybe if you're lucky, the father of PHP will reply to you. :) heikkikk wrote: Hello! I would like to know, Who made the first step to start programming PHP? So who is the father of PHP. Can anyone give me a link to proof it? -- =|---+---|= Heikki Kniivilä [EMAIL PROTECTED] http://heikkikk.homelinux.com -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Fwd: imap Server support Quota]
---BeginMessage--- Hello, Does your imap server come from redhat ? If so, have you ever try IMP ( http://www.horde.org/imp ) and enable Quota function with imap server by using php code ? Would you mind to send me your solution ? Thank for your help ! Edward. ---End Message--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Khalid El-Kary) wrote: http://www.php.net/manual/en/history.php#history.php First public announcement of PHP by Rasmus: http://groups.google.com/groups?selm=3r7pgp%24aa1%40ionews.io.org -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions not written to db on windows...
I have a bit of code that uses sessions and stores session data in the database. Works flawlessly on FreeBSD 4.7/mySQL/PostgreSQL running php 4.2.3. When trying to run my code on Windows 2k with MSSQL and mySQL, its not working. The windows box is running php 4.1.2 (its a dev box). Here is the section on sessions from php.ini. Can anyone see anything wrong with this setup?? And also, can alternative means of storage be used under windows php?? Thanks for any insight you may provide... - [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. session.save_path = c:\winnt\temp ; Whether to use cookies. session.use_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = / ; The domain for which the cookie is valid. session.cookie_domain = ; Handler used to serialize data. php is the standard serializer of PHP. session.serialize_handler = php ; Percentual probability that the 'garbage collection' process is started ; on every session initialization. session.gc_probability = 1 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 ; Check HTTP Referer to invalidate externally stored URLs containing ids. session.referer_check = ; How many bytes to read from the file. session.entropy_length = 0 ; Specified here to create the session id. session.entropy_file = ;session.entropy_length = 16 ;session.entropy_file = /dev/urandom ; Set to {nocache,private,public} to determine HTTP caching aspects. session.cache_limiter = nocache ; Document expires after n minutes. session.cache_expire = 180 ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 0 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bad File Mode?
At 11/28/2002 01:51 PM, Ernest E Vogelsinger wrote: ? $data = mtype=XMLDOCoutfile=true; $dataFile = http://www.healthtvchannel.org/courses/pay/data/test.xml;; $fileSize = filesize($dataFile); Ah. It is a local file, I was just using an absolute reference for it. However you do not need to know the size of the file to read it - simply do it in chunks: $dataFile = http://www.healthtvchannel.org/courses/pay/data/test.xml;; $fp = fopen($dataFile, rb); $strFile = null; while ($chunk = fread($fp, 524288)) // 512 kB chunks modify as needed $strFile .= $chunk; fclose($fp); Thanks. I'll definitely give that a try. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] YATS on OS X
I'm trying to compile the YATS template system for PHP on Mac OS X. It compiles without problems (one warning actually, but that's not the problem I'm having), but it gives me a static library as an archive file, instead of a shared library which I can install into my PHP installation. I'm not a porting expert at all. Does anyone know how I should do this? My configuration: PHP 4.3 RC2, compiled from source Apache httpd 1.3.27, compiled from source Mac OS X 10.2.2 Thanks, Adam Atlas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload wont work, OS X
It works, partially. I can upload the file, but it's named array. On fredag, nov 29, 2002, at 16:28 Europe/Stockholm, Beth Gore wrote: Hi Magnus, Your problem was you weren't using the correct part of the $_FILES array when using copy(); Cut and Past This: if ($ok){ $res = copy($bilde_fil[tmp_name], $path./.$nyttnavn.$ending); print ($res)?bFerdig/b, uploadet .$nyttnavn.$ending.!br:bSorry/b, Kunne ikke uploade.br; print br; } ? The Important bit is the $bilde_fil[tmp_name] bit. This means it's copying the file from the temporary location on the server to your chosen location. Also, as a side note, replace this too: $MAX_FILE_SIZE = 100; $bilde_fil = $_FILES['bilde_fil']; // HTTP_POST_FILES $nyttnavn = $_POST['nyttnavn']; $ending = $_POST['ending']; if($bilde_fil[size] $MAX_FILE_SIZE) { die(bSorry/b, Kunne ikke uploade.br); } $path=upload; //Mappa som bildene skal havne i (husk den siste '/') Don't set $MAX_FILE_SIZE using $_POST variables for security reasons - someone could very easily alter it in the HTML file!!! Beth Gore magnus nilsson wrote: I have trouble using upload scripts - none of them work on my current config. I'vq got php 4.2.3 and global registerd = off. The problem is that the script doesnt send the variable $_FILES['my_file'] as it should. I can only upload if i hard code the filename into the script. -- 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
[PHP] Test links?
First, I'd like to say that I'm not asking for anyone to write a script... how would I go about checking a MySQL database of links to see if any are down? I've had some varying results with all the methods I've tried, so would like to see if anyone has a proven method for doing this. Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Test links?
fopen each link and see if it returns true or false (false meaning its down) Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca - Original Message - From: Rob Packer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 29, 2002 3:53 PM Subject: [PHP] Test links? First, I'd like to say that I'm not asking for anyone to write a script... how would I go about checking a MySQL database of links to see if any are down? I've had some varying results with all the methods I've tried, so would like to see if anyone has a proven method for doing this. Thanks, Robert -- 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
[PHP] Re: First PHP
Not to hard to find http://www.php.net/manual/en/history.php ~Tim Heikkikk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello! I would like to know, Who made the first step to start programming PHP? So who is the father of PHP. Can anyone give me a link to proof it? -- =|---+---|= Heikki Kniivilä [EMAIL PROTECTED] http://heikkikk.homelinux.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to do this in PHP ? If it is then, how ?
Marek, Thanks for your ideas, I was thinking in a complicated scheme using $fp = fopen (php://stdin, $hexkeynumber) ... but I wasn't sure if that is better ... I think your solution is much neatier ... then I just have to compare the entered code with an id in the mysql database - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Friday, November 29, 2002 7:49 AM Subject: Re: [PHP] Is it possible to do this in PHP ? If it is then, how ? In the browser it might look something like this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titlePizza place/title script function add(n) { document.pizza.num.value=document.pizza.num.value + n; if(document.pizza.num.value.length!=2) { document.pizzaimage.src='blank.jpg'; } else { // alert(Pizza is + document.pizza.num.value); document.pizzaimage.src='show_image.php?img_id=' + document.pizza.num.value; } } /script /head body img src=blank.jpg alt= name=pizzaimage id=pizzaimage border=0 form action= name=pizza input type=text name=num onchange=checkimg(this.value) input type=button value= Clear onclick=this.form.num.value=''; add('')br input type=button value= 7 accesskey=7 onclick=add('7') input type=button value= 8 accesskey=8 onclick=add('8') input type=button value= 9 accesskey=9 onclick=add('9') br input type=button value= 4 accesskey=4 onclick=add('4') input type=button value= 5 accesskey=5 onclick=add('5') input type=button value= 6 accesskey=6 onclick=add('6') br input type=button value= 1 accesskey=1 onclick=add('1') input type=button value= 2 accesskey=2 onclick=add('2') input type=button value= 3 accesskey=3 onclick=add('3') br input type=button value= 0 accesskey=0 onclick=add('0') input type=submit value=nbsp;nbsp;nbsp;nbsp;Ordernbsp;nbsp;nbsp;nbsp; br /form /body /html Additional information (size, weitht ...) can be provided in the image Axis Computers wrote: Thanks for replying, Now I know it's possible to do it, but I still don't know how can I develop such interface, I will do it in php and mysql, but I need a little guidance with the way to do it I just can't figure out how ... Thank you Ricardo Fitzgerald -- 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] array with session
Are you on PHP = 4.1 ? Try this: ? session_start(); print_r($_POST['Image']); // should print out your //checkbox array $_SESSION['Image'] = $_POST['Image']; // instead of session register print_r($_SESSION['Image']);// should print out your // checkbox array from the session ? This should test if a) $_POST['Image'] is being populated b) $_SESSION['Image'] is being populated Then, to do what you were trying to achieve: ? session_start(); $_SESSION['Image'] = $_POST['Image']; foreach($_SESSION['Image'] as $key = $val) { echo $val; } // OR // $i = 0; while($i count($_SESSION['Image'])) { echo $Image[$i]; $i++; } ? Justin on 29/11/02 11:58 PM, Laurence ([EMAIL PROTECTED]) wrote: hello everyone, I'm trying to get some images value from a checkbox putting them in a session to preserve the data. The array works perfectly without the session_start() and session_register. can anyone help? html script html head title/title /head body form action=submit_information.php method=post input type=checkbox name=Image[] value=Image_One img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_Two img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_Three img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_four img src=.gif name=Image_Onebr input type=checkbox name=Image[] value=Image_five img src=.gif name=Image_Twobr input type=checkbox name=Image[] value=Image_six img src=.gif name=Image_Twobr input type=submit value=submit /form /body /html php script: submit_information.php ?php session_start(); session_register(Image); $count = count($Image); for ($i=0; $i$count; $i++) { echo $Image[$i]; } //I also tried that /*foreach ($Image as $i= $Img) { $Img == $Image[$i]; echo $Img; }*/ ? - With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs Justin French http://Indent.com.au Web Development Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 30 Nov 2002 00:18:12 -0000 Issue 1734
php-general Digest 30 Nov 2002 00:18:12 - Issue 1734 Topics (messages 126465 through 126505): OpenSSL Encryption to a browser. 126465 by: Comunica2 s. coop. 126468 by: Dan Hardiker Re: Multidimensional arrays (more and more...) 126466 by: Ford, Mike [LSS] Re: File handling 126467 by: Justin French 126484 by: Maxim Maletsky array with session 126469 by: Laurence 126470 by: Craig 126471 by: Craig 126505 by: Justin French First PHP 126472 by: heikkikk 126473 by: Khalid El-Kary 126494 by: John Nichel 126496 by: CC Zona 126503 by: Godzilla Upload wont work, OS X 126474 by: magnus nilsson 126479 by: Beth Gore 126500 by: magnus nilsson Re: Logging out and session ids 126475 by: Gerard Samuel 126489 by: Tom Rogers Re: Werid problemswith mail() command: From address on sent messages 126476 by: Chris Hewitt Re: how to use mssql_connect()? 126477 by: Chris Hewitt Re: rewrite urls with preg_replace 126478 by: Dieter Koch php and https 126480 by: DUPUIS Grégoire BE/DGC 126485 by: Marco Tabini 126487 by: DUPUIS Grégoire BE/DGC Re: Help with login/redirect/insert to dbase 126481 by: Maxim Maletsky Re: file creation date 126482 by: Maxim Maletsky Re: Help with the PHP 126483 by: Maxim Maletsky Multiuser System with Sessions 126486 by: Anson LeClair Enable Quota function with php 126488 by: EdwardSPL.ita.org.mo Convert dates 126490 by: Sturle 126491 by: John W. Holmes How to access properties of objects within objects 126492 by: Randall Perry Re: Detecting email bounces sent by the mail function? 126493 by: John Nichel Re: imap Server support Quota] 126495 by: EdwardSPL.ita.org.mo Sessions not written to db on windows... 126497 by: Gerard Samuel Re: Bad File Mode? 126498 by: Steve Keller YATS on OS X 126499 by: Adam Atlas Test links? 126501 by: Rob Packer 126502 by: Jason Reid Re: Is it possible to do this in PHP ? If it is then, how ? 126504 by: Axis Computers Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted automatically, but only when the destination browser has the right private key installed. Would it be possible to us header(Content-type: multipart/encrypted), since it is originally meant for messages? -- René ---End Message--- ---BeginMessage--- I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted automatically, but only when the destination browser has the right private key installed. Most people would leave apache (usually with mod_ssl) to handle the encryption over https. Im not even sure if you could do what I think you are asking without controlling the whole http communication (as the whole thing is SSL wrapped, or none of it). Would it be possible to us header(Content-type: multipart/encrypted), since it is originally meant for messages? I think you need to look into one of the following: - Handling the requests yourself by listening to port 80 (not advisable - php wasnt built for that sort of task, but its possible) - Using ssl certificate pairs and installing them in a custom manner on the apache installation - Alternative methods PS: if your not using apache, I cant help you at all. Others may. --- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative ---End Message--- ---BeginMessage--- -Original Message- From: Mako Shark [mailto:[EMAIL PROTECTED]] Sent: 28 November 2002 18:20 A little more info on my count()ing. I have $issue[0][number] to $issue[x][number] just like any other multidimensional array (we'll call them m-arrays for simplicity). If I try to count($issue), I'll get all instances of my array (instances?) mltipled by the number of elements Uh -- have you actually tried this? Without doing so myself, I'm 99% sure that count($issue) will give you the answer you're looking for -- i.e. the number of different subscripts in the first dimension. From your description of how you expect count() to work, I suspect you're labouring under a misapprehension about how PHP arrays are built: in this case, $issue is an
[PHP] Method for displaying downline
I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How Do I install php on Apache 2.0
Hi Adam Voigt, On 27 Nov 2002 11:44:49 -0500, you wrote about Re: [PHP] How Do I install php on Apache 2.0 something that looked like this: A. What does having Adobe installed matter? Where'd you get that?? B. Why are you trying to run 2.0? Apache 2.0 isn't even recommended for use with PHP on linux systems yet, let alone windows. You'd have much better luck with the 1.3.27 version. Why not??? I'm running a custom built Apache 2.0.40 with the latest PHP and it works trouble free on WinXP ... Granted, this is for experimental testing only ... I'd never have a public server running Windows in any shape or form any way... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP
Hi Khalid El-Kary, On Fri, 29 Nov 2002 14:18:15 +, you wrote about Re: [PHP] First PHP something that looked like this: hi, how about the manual? Works for me to learn it ... it's the only thing I've read on PHP besides the WebMonkey guide to get the Apache+PHP set up ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_open authentication failure
Hi, I'm using the following code: $x = imap_open({mail..com:110/pop3}INBOX, [EMAIL PROTECTED], ); echo $x ? YAY! : NO YAY!BR . implode(BR, imap_errors()); It works fine on my local server, but as soon as I try it on the live machine it gives me: Retrying CRAM-MD5 authentication after Retrying CRAM-MD5 authentication after Invalid userid/password Retrying CRAM-MD5 authentication after illegal command Retrying CRAM-MD5 authentication after authentication exchange failed Can not authenticate to POP3 server: authentication exchange failed Which is just mean, the local server is Debian 2.2 running PHP 4.0.3pl1 and the live one is Slackware 8.1-rc1 running PHP 4.2.1. The mail server seems to identify itself as IMail 6.02. The live server can telnet into the mail server okay so it's not a connection problem and it can connect to different mail servers without problems. After extensive googling I found something in Norwegian which I guessed was saying to try replacing the @ in the login to \$, which was tried... as before, worked locally but failed live. So I gave up and decided to leave it to better minds than mine, ie. you. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Method for displaying Downline
I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: amp; in Query String
Looks fine in Opera 6.03 hth http://www.vogelsinger.at/test.php?par1=value1par2=value2par3=value3 Opera Version 6.03 Build 1107 Platform Win32 System Windows 98 Java Sun Java Runtime Environment 1.4 Testing the query string This is the full query string ($_SERVER['QUERY_STRING']): par1=value1par2=value2 par3=value3 This is a printout of $_GET: Array ( [par1] = value1 [par2] = value2 [par3] = value3 ) I will use this string for the link below: /test.php?par1=value1amp;par2=value2 amp;par3=value3 On Wed, 27 Nov 2002 00:09:35 +0100, [EMAIL PROTECTED] (Ernest E Vogelsinger) wrote: At 00:00 27.11.2002, Jonathan Rosenberg \(Tabby's Place\) said: [snip] Ok ... I take back what I said about amp; not working in a query string. It works just fine. [snip] Ahhh - and I just created a test page for all to check out... nevertheless, here it is: http://www.vogelsinger.at/test.php Simply provides a link using query parameters encoded with amp;, to check with different browsers. Maybe someone will check this outwith his browser anyway. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Method for displaying Downline
I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test for ascii or binary string
Is there a way to determine if a string has ascii or binary data in it? -js -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: test for ascii or binary string
Doh, so simple. I guess the correct form of the question would be how do I determine if a string has just a-zA-Z0-9 in it plus punctuation... thanks, -js Paul Chvostek wrote: On Fri, Nov 29, 2002 at 10:27:05PM -0600, Jonathan Sharp wrote: Is there a way to determine if a string has ascii or binary data in it? You could always see if it matches a regular expression that represents the ascii range you're considering. I.e., ereg('[^a-zA-Z0-9]',$string) will return true if non-alphanumerics are in the string. Remember that a string is just a string. Whether the data contained in it is represented as ASCII or something else is completely a matter of implementation. ALL 7-bit data can be represented as ASCII. All 8-bit data can be represented as IBM Extended ASCII or whatever you want to call it. But the string is just a string of bits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] test for ascii or binary string
On Fri, 29 Nov 2002, Jonathan Sharp wrote: Is there a way to determine if a string has ascii or binary data in it? I've used this kind of approach in the past to determine which encoding to use on a string which may contain text or an image. Basically it uses addcslashes to escape non-ASCII chars, then strips all non-backslash chars, and takes the size of the string... $size should contain the number of bytes (out of 1024) that were escaped, and should be very low for clean text, and pretty high for binary. This was made for analyzing blobs, but maybe the approach is useful... $text = addcslashes(substr($string, 0, 1024), \\\'\0..\37\177..\377); $size = strlen(preg_replace('/[^]/', '', $text)); if ($size 200) print mostly text, use addslashes; else print mostly binary, use base64_encode; -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] string
hi everyone.. how to get the part of string and make it into a variable.. sample : determine now, i want to take just mine or 4 word from right, or deter (for left function). and after i got it, i want to make the mine into $x variable my mind.. $x = mean help please... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: string
hi everyone.. how to get the part of string and make it into a variable.. sample : determine now, i want to take just mine or 4 word from right, or deter (for left function). and after i got it, i want to make the mine into $x variable my mind.. $x = mean help please... $x = substr(determine,-4); For more information on SUBSTR, http://www.php.net/manual/en/function.substr.php ;) -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Javascript compatibilty
Hi all, I'm developing a WYSIWYG editor using PHP and Javascript (for COM). However, I start having problems when I try to display the page using the .php extension. The Javascript is not working. However, when I save it to HTML, it worked fine. Can anyone please help me? Why is this so? What can I do to get Javascript working with PHP with ease? Any articles on this? Thanks a lot... again. :) Yours, Wee Keat Chin -- If you cannot win, make the one ahead of you break the record.
[PHP] Re: PHP Javascript compatibilty
I'm developing a WYSIWYG editor using PHP and Javascript (for COM). However, I start having problems when I try to display the page using the .php extension. The Javascript is not working. However, when I save it to HTML, it worked fine. Can anyone please help me? Why is this so? What can I do to get Javascript working with PHP with ease? Any articles on this? Thanks a lot... again. :) If you show me some code I can look at, I might be able to assist you. You should have no trouble executing JS on a file with a .php extension, so long as it is incorporated into HTML. -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] About Speech
Hi. I need to know if it's possible generate a wav, mid or mp3 file from php. I really need create a sound file and send it to the user using http. Exist some tool to do this work? Someone can give me an idea? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Test links?
On Saturday 30 November 2002 06:53, Rob Packer wrote: First, I'd like to say that I'm not asking for anyone to write a script... how would I go about checking a MySQL database of links to see if any are down? I've had some varying results with all the methods I've tried, so would like to see if anyone has a proven method for doing this. Why don't you briefly summarise what methods you have tried? That way people won't reply with methods that you already know of. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Between grand theft and a legal fee, there only stands a law degree. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload wont work, OS X
On Saturday 30 November 2002 06:42, magnus nilsson wrote: It works, partially. I can upload the file, but it's named array. print_r($_FILES) to see what it contains and how you can use it. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The Beatles: Paul McCartney's old back-up band. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php