[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
romolo Mon Mar 26 00:00:44 2001 EDT Modified files: /php4/ext/pgsql pgsql.c Log: pg_close was undefining default_conn even if a ref to it was still there. Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.94 php4/ext/pgsql/pgsql.c:1.95 --- php4/ext/pgsql/pgsql.c:1.94 Sat Mar 24 10:36:43 2001 +++ php4/ext/pgsql/pgsql.c Mon Mar 26 00:00:43 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.94 2001/03/24 18:36:43 romolo Exp $ */ +/* $Id: pgsql.c,v 1.95 2001/03/26 08:00:43 romolo Exp $ */ #include @@ -501,7 +501,8 @@ PHP_FUNCTION(pg_close) { zval **pgsql_link = NULL; - int id; + void *ptr; + int id, type; PGconn *pgsql; PGLS_FETCH(); @@ -527,12 +528,15 @@ if (id==-1) { /* explicit resource number */ zend_list_delete(Z_RESVAL_PP(pgsql_link)); + ptr = zend_list_find(Z_RESVAL_PP(pgsql_link),&type); + if (ptr && (type==le_link || type==le_plink)) { + RETURN_TRUE; + } } if (id!=-1 || (pgsql_link && Z_RESVAL_PP(pgsql_link)==PGG(default_link))) { - if (id!=-1) - zend_list_delete(PGG(default_link)); + zend_list_delete(PGG(default_link)); PGG(default_link) = -1; } -- PHP CVS 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] PHP Authentication
Hi Jon, just to let you know, you don't "need" $PHP_AUTH_USER to do authentication...i just finished up a little auth system (which works and i'm psyched) and i only used some session variables.that having been said, if you want to configure it as a module, check out www.php.net if you got it up and running once, getting it to work as a module shouldn't be too bad -jack -Original Message- From: Jon [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 2:38 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP Authentication Hi, I have read that for using PHP authentication I must be able to user variables such as $PHP_AUTH_USER that are only avaible when PHP is installed as a module. On the other hand I am using APACHE 1.3.17 with PHP 4.04 and I have configured Apache with the following lines: ScriptAlias /php4/ "C:/php/" Action application/x-httpd-php4 "/php4/php.exe" AddType application/x-httpd-php4 .php As I think it could be interesting to use this kind of authentication, I need some help for configuring PHP as a module discarding the CGI version of PHP that I think I am using with the lines of code above, so I would be very grateful if anyone could give some help about configuring PHP this way. Thank everybody, -- 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] PHP Authentication
Hi, I have read that for using PHP authentication I must be able to user variables such as $PHP_AUTH_USER that are only avaible when PHP is installed as a module. On the other hand I am using APACHE 1.3.17 with PHP 4.04 and I have configured Apache with the following lines: ScriptAlias /php4/ "C:/php/" Action application/x-httpd-php4 "/php4/php.exe" AddType application/x-httpd-php4 .php As I think it could be interesting to use this kind of authentication, I need some help for configuring PHP as a module discarding the CGI version of PHP that I think I am using with the lines of code above, so I would be very grateful if anyone could give some help about configuring PHP this way. Thank everybody, -- 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] Email validation
Hello Mike, On 21-Mar-01 01:21:13, you wrote: >Hello Again, >Can anyone tell me what the best form of Email validation there is? It needs >to be quick & as open to - and . as possible. Look here for a complete email validation class: http://phpclasses.UpperDesign.com/browse.html/package/13 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] oracle last inserted
On Mon, Mar 26, 2001 at 10:19:28AM +0800, Chien-pin Wang wrote: > > If you use sequence to generate your last_inserted_id, then you can always > get that ID by calling > > SELECT sequence_name.CURRVAL > FROM DUAL; > > within the same session. re, tc > > Chien-pin > > On Sun, 25 Mar 2001, almir wrote: > > > is there a way to get last inserted id from oracle as > > mysql_inerted_id() or > > SELECT @@IDENTITY AS LastId > > in mssql server > > > > i have a function that does only that, takes insert statement and returns > > last id, but this function have to work for all tables (different triggers > > in oracle) , right now the only thing i can imagine is to give this function > > the name of ID column and read name of table with regex and then do > > select max(parametar_id) from regex_table > > and then to do commit , > > this way is somehow realy stupid but is my only solution in this moment so > > if you have any better ideas plese help > > > > almir > > > > > > > > > > > -- > 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 Digest 26 Mar 2001 06:43:51 -0000 Issue 589
php-general Digest 26 Mar 2001 06:43:51 - Issue 589 Topics (messages 45501 through 45582): Re: URL parsing 45501 by: Jaxon 45505 by: CC Zona 45507 by: Jaxon 45511 by: Philip Olson 45553 by: Jaxon 45556 by: Aaron Tuller 45557 by: Jaxon [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah! 45502 by: Dddogbruce \(.home.com\) 45503 by: Jack Dempsey 45504 by: Dddogbruce \(.home.com\) 45506 by: Dddogbruce \(.home.com\) 45509 by: Richard 45510 by: Joe Brown 45515 by: Dddogbruce \(.home.com\) 45517 by: Joe Brown 45518 by: Dddogbruce \(.home.com\) 45519 by: Dddogbruce \(.home.com\) 45522 by: Joe Brown 45523 by: Dddogbruce \(.home.com\) 45524 by: Dddogbruce \(.home.com\) 45530 by: Dddogbruce \(.home.com\) rewind 45508 by: Jack Dempsey 45512 by: Dddogbruce \(.home.com\) finding primary key with oci8 45513 by: almir script filename? 45514 by: Kurth Bemis 45516 by: Philip Olson 45525 by: Kurth Bemis Re: Sendmail 45520 by: Chris Anderson 45545 by: Atet Sugiharto getting numeric index of array 45521 by: Christian Dechery 45534 by: CC Zona How to jump 7 rows in array 45526 by: Christian Dechery drop down used to redirect? 45527 by: duirfire 45565 by: Data Driven Design A few questions... 45528 by: Chris Cocuzzo 45532 by: Jaxon 45536 by: Chris Cocuzzo 45537 by: Jaxon 45540 by: Chris Cocuzzo 45543 by: Jaxon 'How to jump..' part 2 45529 by: Christian Dechery 45548 by: David Robley Requesting username/pwd with apache and aqcuiring input 45531 by: NoSpeed 45533 by: Jaxon 45535 by: NoSpeed PHP and MySQL insert problem 45538 by: Pinwang Chao Decrypt Function? 45539 by: Chris Anderson 45541 by: Opec Kemp \( Ozemail \) 45544 by: Stephan Ahonen 45546 by: Valter Santos 45554 by: Chris Anderson Making a function/method private 45542 by: Reuben D Budiardja Re: ImageTTFText() 45547 by: David Robley Re: I need an expert to tell me what I am doing wrong 45549 by: David Robley 45551 by: trogers Re: I want to execute a cgi 45550 by: David Robley about:home 45552 by: JCampbell 45578 by: Felix Kronlage Re: oracle last inserted 4 by: Chien-pin Wang Re: reading microsoft word document text in php? 45558 by: David Robley array in cookie . . . 45559 by: PHPretard The ubitquitous forum project 45560 by: Kath 45561 by: Stephan Ahonen 45563 by: Gfunk 45564 by: Kath 45566 by: Matt Stone 45575 by: Felix Kronlage 45576 by: Matt Stone 45577 by: Matt Stone Re: reading microsoft word, excel, pdf document text 45562 by: Erick Papadakis 45567 by: Reinke Bonte 45568 by: Erick Papadakis 45570 by: David Robley 45571 by: Reinke Bonte Cookie problem 45569 by: Martin Skjöldebrand 45573 by: Nuno Silva Re: Delaying Printed Output 45572 by: Andrew Braund imap_open() dosen't work :( 45574 by: Nilesh Parmar Random letter/number passwords 45579 by: Matt Stone 45580 by: Matt Stone multiple record out put 45581 by: Peter Houchin 45582 by: David Robley 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] -- Any way to combine both forms of url parsing? I want to use standard slash notation for navigation ,but also account for the occasional variable used within a single page. e.g. URL can be either: domain.com/index.php/main/index.html?ii=1 or: domain.com/index.php/main/index.html?ii=1 if (isset($ii) // how do I grab value and truncate $REQUEST_URI $path_array = explode('/', $REQUEST_URI); $page_name = array_pop($path_array); //get page name from end of array $page_type = array_pop($path_array); //get page type from next item best regards, jaxon On 3/23/01 9:09 PM, "Aaron Tuller" <[EMAIL PROTECTED]> wrote: > super easy. > > $path_array = explode('/', $REQUEST_URI); > $numPathElements = count($path_array); > > then loop through the elements and do what you need, you might need > to use strtok() if you're expecting slashes in your arguments. > > -aaron > > At 8:58 PM -0500 3/23/01, Jaxon wrote: >> how about parsing a url from passing variables like : >> test.php/op/3/op2/6/pagename.html >> >> cannot this be parsed, to let search engines spider past the "?" properly? >> >> regards, >> jaxon In article <[EMAIL PROTECTED]>, [EMAIL PROT
Re: [PHP] multiple record out put
On Mon, 26 Mar 2001 15:50, Peter Houchin wrote: > Hiya, > > I'm creating a page where the user can select multiple options to > query the DB with i am at the moment i can't get more than 1 record to > display from the db at all. If any one could offer soem suggestions i > would be very grateful > > > //db connect info above > if ($Submit) { > $rs = "SELECT * FROM machine WHERE avail='y' AND system='$system'"; > $result = mysql_query($rs); > $system = mysql_result($result, 0, 'system'); > $serial = mysql_result($result, 0, 'serial'); > $availe = mysql_result($result, 0, 'avail'); > echo "$system $serial $avail"; > } > echo mysql_error(); > > ?> > > > > MODEL > Config >Available > Weekly > Monthly > > > > > Sparc 5 > Sparc 20 > Ultra 1 > Ultra 2 > Ultra 5 > Ultra 10 > > > > > > > > You have several problems here; first is that the name of your 'select multiple' box should be system[] in order to be able to pass ALL the selected items - otherwise you only get the last one selected. That will then give you an array named system, which you'll need to parse and break up into a query like WHERE ... system = '$system[0]' OR system = '$system[1] ... OR system = '$system[n]' Lastly, you seem to have omitted the loop to cycle through all the rows of your result set ;-( -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] multiple record out put
Hiya, I'm creating a page where the user can select multiple options to query the DB with i am at the moment i can't get more than 1 record to display from the db at all. If any one could offer soem suggestions i would be very grateful MODEL Config Available Weekly Monthly Sparc 5 Sparc 20 Ultra 1 Ultra 2 Ultra 5 Ultra 10 Peter Houchin [EMAIL PROTECTED] = _ __ /\ /_/_/_\/ |_/ \ /_/_/___ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/v /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ __ __ __ /_/ __ __ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\/_//_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/ = Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 * We rent the dot in .COM! **
RE: [PHP] Random letter/number passwords
Oops sorry, this line is supposed to read: $passfirst = randomGen($length-3, 1); >>$passend = randomGen(3, 0); $pass = $passfirst.'-'.$passend; return $pass; -Original Message- From: Matt Stone [mailto:[EMAIL PROTECTED]] Sent: Monday, 26 March 2001 4:12 PM To: PHPlist Subject: [PHP] Random letter/number passwords Hi, I have this code below which is supposed to be generating a password like QCCQCN2-IUZ with 10 characters - All but three in the first section (7) and three in the last part - but does not work in all cases. Sometimes it prints LPSA3WD-IM or G22G2G9-FC. Is there a catch in the code that will stuff up in certain circumstances? Please help, Matt 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] -- 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] Random letter/number passwords
Hi, I have this code below which is supposed to be generating a password like QCCQCN2-IUZ with 10 characters - All but three in the first section (7) and three in the last part - but does not work in all cases. Sometimes it prints LPSA3WD-IM or G22G2G9-FC. Is there a catch in the code that will stuff up in certain circumstances? Please help, Matt 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] about:home
On Sun, Mar 25, 2001 at 09:02:53PM -0500, JCampbell wrote: > I know it is possible to redirect a user to their home page, > but is it possible to determine what home page they are using? you might be able to access this value from within javascript (not sure on this). Don't think it's possible with php. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | PGP signature
RE: [PHP] The ubitquitous forum project
See http://www.planetveggie.com/ubb-bin/Ultimate.cgi?action=intro Basically it is like: Topic 1 Topic 2 Topic 3 Topic 4 Topic 5 When I click on topic 5 I get: Topic 5: Post 1 Post 2 Post 3 Post 4 Post 5 See for yourself. -Original Message- From: Felix Kronlage [mailto:[EMAIL PROTECTED]] Sent: Monday, 26 March 2001 2:52 PM To: Matt Stone Cc: PHP User Group Subject: Re: [PHP] The ubitquitous forum project On Mon, Mar 26, 2001 at 02:11:46PM +1000, Matt Stone wrote: > I dont like any of them, the UBB style is the best. what's UBB-style like? -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] The ubitquitous forum project
Like so http://www.planetveggie.com/ubb-bin/Ultimate.cgi?action=intro Basically Topic 1 Topic 2 Topic 3 Topic 4 Topic 5 say I click on topic 5 then Topic 5 Post 1 Post 1 Post 1 Post 1 -Original Message- From: Felix Kronlage [mailto:[EMAIL PROTECTED]] Sent: Monday, 26 March 2001 2:52 PM To: Matt Stone Cc: PHP User Group Subject: Re: [PHP] The ubitquitous forum project On Mon, Mar 26, 2001 at 02:11:46PM +1000, Matt Stone wrote: > I dont like any of them, the UBB style is the best. what's UBB-style like? -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] The ubitquitous forum project
On Mon, Mar 26, 2001 at 02:11:46PM +1000, Matt Stone wrote: > I dont like any of them, the UBB style is the best. what's UBB-style like? -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | PGP signature
[PHP] imap_open() dosen't work :(
Hi Gurus :) I have installed php4.0.4 on my windows 98 machine with apache .I am having a problem while calling te imap_open() function.I get the following error.I get this error also with Linux.(Redhat 7.0). ** Call to undefined function: imap_open() in c:\Program Files\apache group\apache\htdocs\imap.php *** Do I require to configure any file or change any settings ? Can anyone figure out what is the problem.I can however telnet successfully to my imap server. Thanx in advance Nilesh Parmar -- 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] Cookie problem
Hello, short: try removing the third parameter to setcookie and if the errors go away you know it's a cookie problem :) long: you're setting auth based in the (server's) time + 600sec. If the client (or even the server) has a clock skew... well bad luck :) removing the third parameter makes php create a "session cookie" that will stay there until the browser is closed (alll the windows). If this is not a problem, let it be. I love session cookies!! :) Anyway, the best method to get decent auth are sessions. Try php4's sessions or phplib or something. Regards, Nuno Martin Skjöldebrand wrote: > I'm experiencing all kinds of problems with, what we suppose is the cookie > setting. This is the code: > > if (isset($authentication)) { > setcookie("status", $status, time()+600); > setcookie("user", $user, time()+600); > setcookie("group", $group, time()+600); > setcookie("authentication", $authentication, time()+600); > setcookie("laston", $laston, time()+600); > } > else { > setcookie("status", "Logged In", time()+600); > setcookie("user", $txtUsername, time()+600); > setcookie("group", $row[4], time()+600); > setcookie("authentication", "YES", time()+600); > setcookie("laston", $row[6], time()+600); > } > > (I have not coded this). > > What seems to happen is that - with alarming regularity - people are > getting logged off when choosing item from a menu. Either they are thrown > out into the log on-screen or (as has happened to me recently) the app > simply states I'm not logged on even if I am in the middle of using it (and > must have logged on). > > I'm not at all familiar with cookies (yet) but suspect that the timing of > the critters could be a culprit. IS this correct? > How do I solve the problem? > > M. -- 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] Delaying Printed Output
This topic comes up from time to time... Some previous information, if you get any further please post it to the list. A while ago I saw a web page explaining a system (written in Perl I think) that was used to show a presentation to a number of different sites simultaneously (and synchronised). A presenter was at the main site and the browsers at 4 other remote sites would display the same page the presenter was viewing on his web browser as he went to various sites. I think it worked using multipart Content-type. Unfortunately I have lost the URL to the explanation of how it was done. On Saturday, 5 August 2000 8:48 AM Mr Bruce Christensen posted the following links explaining browser push; http://home.netscape.com/assist/net_sites/pushpull.html and; As for keeping the connection from timing out, see http://www.php.net/manual/function.set-time-limit.php. I have experimented with this but didn't get too far. I posted the following to the PHP list but didn't get any reply. I have tried the following script on WinNT5, Apache/1.3.13-dev, PHP Version 4.0.1pl2 and OpenBSD2.7 Apache/1.3.12, PHP Version 4.0.1pl2 (mod_php4) push.php; --8<---snip---8<--start --8<---snip---8<--end On NT with the header("HTTP/1.0 200 OK"); statement I get an Apache error message; [Sun Aug 06 09:02:47 2000] [error] [client 192.168.0.60] malformed header from script. Bad header=HTTP/1.0 200 OK: f:/program files /novato/allcnet/php.exe I do not get this error on OpenBSD. I then removed the header("HTTP/1.0 200 OK"); statement and now NT and OpenBSD give the following output to the browser(IE5.0); (after a 5 second pause) --8<---snip---8<--start --ThisRandomString Content-type: text/html First update at 18:22:47 --ThisRandomString Content-type: text/html Second update at 18:22:52 --ThisRandomString --8<---snip---8<--end And the following output to the browser(Netscape 4.6); (after a 5 second pause) --8<---snip---8<--start Second update at 18:23:19 --8<---snip---8<--end ie With Netscape I never see the first update at ... part of the output as I would expect. I have also tried it with; header("Content-type: multipart/mixed;boundary=ThisRandomString"); but it makes no difference, the behaviour is identical. IE5 does not seem to understand multipart. The multipart mime boundary does not seem to be working properly in Netscape4.6. Regards Andrew Braund > -Original Message- > From: Greg Scott [mailto:[EMAIL PROTECTED]] > Sent: Sunday, 25 March 2001 04:49 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Delaying Printed Output > > > > You might try using flush() after the prints. > > > I tried that too, but at least in Netscape 6, it still waits until > everything is done before displaying. I think Jack must be correct that > this isn't possible for browser display. > > Thanks, > Greg -- 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] reading microsoft word, excel, pdf document text
As far as I know, you can do very little in this respect on a non-windows machine without some programming in a lower generation language. Don't you have a windows machine somewhere in your network? Just pass it on to that machine, and let it do this work. I personally would prefer doing this in perl. -ren - Original Message - From: "Erick Papadakis" <[EMAIL PROTECTED]> To: "Reinke Bonte" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 12:26 PM Subject: Re: [PHP] reading microsoft word, excel, pdf document text > hi renike, > > thanks for that link, but looks like that tutorial > will only work on windows machines (because of COM > objects)? > > i am on a linux box. > > > cheers/erick > > > > --- Reinke Bonte <[EMAIL PROTECTED]> wrote: > > Hey Erick, > > > > unfortunately I know little about this myself, but > > I'm sure, this article > > will help you as a starting point. > > > > http://www.phpbuilder.com/columns/alain20001003.php3 > > > > > > Good luck > > > > > > -ren > > > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > 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] reading microsoft word, excel, pdf document text
On Mon, 26 Mar 2001 13:20, Erick Papadakis wrote: > hi david, > > thanks for the note. ok, here is what i want to do. i > want my users to upload WORD, XLS, PPT and PDF files. > when they upload, i store these files in the temp > directory, grab the text from them, and then put it > into my database for later searching. i dont care > about the formatting, i only care about the text > because i need the keywords later for searching. > > can i run some sort of a parser on the server side > like the wvware.com's word parser and just call it > through php? i have not been able to figure out how to > do this using php. > > i would really appreciate any ideas and suggestions! > > thanks/erick OK - do you have the relevant parsers? There are specific (Unix) tools available for PDF (pdftotext or acrobat reader) and Word; I mentioned some of that in an earlier mail. For Excel you could probably use (Unix again) just the Unix command strings to get the text - same might work for Powerpoint but if some dipstick has created a graphics-only presentation you won't get much that's useful. As I mentioned previously, you'll probably want to run the parser[s] from PHP using one of the Program execution functions; exec, system or the backtick operator should do what you want. How you capture the output will of course depend on how the output is delivered - see the docs for the particular parser. None of the above is probably relevant if your server is Windows. -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] Cookie problem
I'm experiencing all kinds of problems with, what we suppose is the cookie setting. This is the code: if (isset($authentication)) { setcookie("status", $status, time()+600); setcookie("user", $user, time()+600); setcookie("group", $group, time()+600); setcookie("authentication", $authentication, time()+600); setcookie("laston", $laston, time()+600); } else { setcookie("status", "Logged In", time()+600); setcookie("user", $txtUsername, time()+600); setcookie("group", $row[4], time()+600); setcookie("authentication", "YES", time()+600); setcookie("laston", $row[6], time()+600); } (I have not coded this). What seems to happen is that - with alarming regularity - people are getting logged off when choosing item from a menu. Either they are thrown out into the log on-screen or (as has happened to me recently) the app simply states I'm not logged on even if I am in the middle of using it (and must have logged on). I'm not at all familiar with cookies (yet) but suspect that the timing of the critters could be a culprit. IS this correct? How do I solve the problem? M. -- 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] reading microsoft word, excel, pdf document text
hi renike, thanks for that link, but looks like that tutorial will only work on windows machines (because of COM objects)? i am on a linux box. cheers/erick --- Reinke Bonte <[EMAIL PROTECTED]> wrote: > Hey Erick, > > unfortunately I know little about this myself, but > I'm sure, this article > will help you as a starting point. > > http://www.phpbuilder.com/columns/alain20001003.php3 > > > Good luck > > > -ren __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- 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] reading microsoft word, excel, pdf document text
Hey Erick, unfortunately I know little about this myself, but I'm sure, this article will help you as a starting point. http://www.phpbuilder.com/columns/alain20001003.php3 Good luck -ren - Original Message - From: "Erick Papadakis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 11:50 AM Subject: Re: [PHP] reading microsoft word, excel, pdf document text > hi david, > > thanks for the note. ok, here is what i want to do. i > want my users to upload WORD, XLS, PPT and PDF files. > when they upload, i store these files in the temp > directory, grab the text from them, and then put it > into my database for later searching. i dont care > about the formatting, i only care about the text > because i need the keywords later for searching. > > can i run some sort of a parser on the server side > like the wvware.com's word parser and just call it > through php? i have not been able to figure out how to > do this using php. > > i would really appreciate any ideas and suggestions! > > thanks/erick > > > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > 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] The ubitquitous forum project
I dont like any of them, the UBB style is the best. -Original Message- From: Kath [mailto:[EMAIL PROTECTED]] Sent: Monday, 26 March 2001 2:02 PM To: Gfunk; Stephan Ahonen; PHP User Group Subject: Re: [PHP] The ubitquitous forum project I think what he means is this: This is newsgroup style: + Main Post | | - Reply 1 | | --- Reply 1 to Reply 1 | --- Reply 2 to Reply 1 | | --- Reply 1 to Reply 2 to Reply 1 | | - Reply 2 ( I hope that formatted ok) This is phorum style: + Main Post - Reply 1 - Reply 2 - Reply 3 - Reply 4 I'm partial to phorum style, myself. - Kath - Original Message - From: "Gfunk" <[EMAIL PROTECTED]> To: "Stephan Ahonen" <[EMAIL PROTECTED]>; "PHP User Group" <[EMAIL PROTECTED]> Sent: Sunday, March 25, 2001 10:48 PM Subject: Re: [PHP] The ubitquitous forum project > What's the difference between newsgroup-style and phorum style threads? > > I'm always doing messageboards, and this thread got my attention > > -- -- > Gfunk - [EMAIL PROTECTED] > http://www.gfunk007.com/ > -- -- > > > - Original Message - > From: "Stephan Ahonen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 26, 2001 1:46 PM > Subject: Re: [PHP] The ubitquitous forum project > > > > > Any advice? > > > > USENET style threads. I *really* hate Phorum-style threads, where > > everything's just tacked onto the end. Though Phorum-style is easier, it > > really detracts from the conversation when you have to write whose post > > you're replying to in your replies. > > > > Sig for a Day > > Stephan Ahonen, ICQ 491101 > > "That's very funny Scotty, now beam down my clothes!" > > Come back tomorrow for a different sig! > > Backspace a single "s" to reply by email > > > > > > -- > > 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] -- 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] drop down used to redirect?
You can do it with javascript like this. function go(selectBox) { var where = selectBox.options[selectBox.selectedIndex].value; if (where != "") window.location = where; } Page ... Or you can use PHP like this. page ... --- nav.php --- - Original Message - From: duirfire <[EMAIL PROTECTED]> To: PHP User Group <[EMAIL PROTECTED]> Sent: Sunday, March 25, 2001 2:39 PM Subject: [PHP] drop down used to redirect? > > Hi, can anyone point me towards an example of how to use a drop down select > as a navigation jump, maybe by sending a redirect header? > > thanks! > duirfire > > > > > -- > 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] The ubitquitous forum project
I think what he means is this: This is newsgroup style: + Main Post | | - Reply 1 | | --- Reply 1 to Reply 1 | --- Reply 2 to Reply 1 | | --- Reply 1 to Reply 2 to Reply 1 | | - Reply 2 ( I hope that formatted ok) This is phorum style: + Main Post - Reply 1 - Reply 2 - Reply 3 - Reply 4 I'm partial to phorum style, myself. - Kath - Original Message - From: "Gfunk" <[EMAIL PROTECTED]> To: "Stephan Ahonen" <[EMAIL PROTECTED]>; "PHP User Group" <[EMAIL PROTECTED]> Sent: Sunday, March 25, 2001 10:48 PM Subject: Re: [PHP] The ubitquitous forum project > What's the difference between newsgroup-style and phorum style threads? > > I'm always doing messageboards, and this thread got my attention > > -- -- > Gfunk - [EMAIL PROTECTED] > http://www.gfunk007.com/ > -- -- > > > - Original Message - > From: "Stephan Ahonen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 26, 2001 1:46 PM > Subject: Re: [PHP] The ubitquitous forum project > > > > > Any advice? > > > > USENET style threads. I *really* hate Phorum-style threads, where > > everything's just tacked onto the end. Though Phorum-style is easier, it > > really detracts from the conversation when you have to write whose post > > you're replying to in your replies. > > > > Sig for a Day > > Stephan Ahonen, ICQ 491101 > > "That's very funny Scotty, now beam down my clothes!" > > Come back tomorrow for a different sig! > > Backspace a single "s" to reply by email > > > > > > -- > > 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] The ubitquitous forum project
What's the difference between newsgroup-style and phorum style threads? I'm always doing messageboards, and this thread got my attention Gfunk - [EMAIL PROTECTED] http://www.gfunk007.com/ - Original Message - From: "Stephan Ahonen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 1:46 PM Subject: Re: [PHP] The ubitquitous forum project > > Any advice? > > USENET style threads. I *really* hate Phorum-style threads, where > everything's just tacked onto the end. Though Phorum-style is easier, it > really detracts from the conversation when you have to write whose post > you're replying to in your replies. > > Sig for a Day > Stephan Ahonen, ICQ 491101 > "That's very funny Scotty, now beam down my clothes!" > Come back tomorrow for a different sig! > Backspace a single "s" to reply by email > > > -- > 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] reading microsoft word, excel, pdf document text
hi david, thanks for the note. ok, here is what i want to do. i want my users to upload WORD, XLS, PPT and PDF files. when they upload, i store these files in the temp directory, grab the text from them, and then put it into my database for later searching. i dont care about the formatting, i only care about the text because i need the keywords later for searching. can i run some sort of a parser on the server side like the wvware.com's word parser and just call it through php? i have not been able to figure out how to do this using php. i would really appreciate any ideas and suggestions! thanks/erick __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- 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] The ubitquitous forum project
> Any advice? USENET style threads. I *really* hate Phorum-style threads, where everything's just tacked onto the end. Though Phorum-style is easier, it really detracts from the conversation when you have to write whose post you're replying to in your replies. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- 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] The ubitquitous forum project
I guess I'm doing another rite of passage for a PHP programmer: The forum Any advice? I did code forums once before, but they were rather rudimentary (No OOP, poorly written, no DB abstraction). - Kath
[PHP] array in cookie . . .
Im trying to get an array saved in a cookie, I have this snippet so far.. $username and the others vars are coming from a form submitted. did I write this ok? is there a limit to how much I can save in the array ? Thanx amd _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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] reading microsoft word document text in php?
On Sat, 24 Mar 2001 01:08, Erick Papadakis wrote: > actually, i am not sure how i can use this to convert an uploaded word > or pdf file into plain text and then do somethign with that text? can > someone please help? > > thanks/erick Well, presumably you would use system or somesuch to run whatever it is; you may want to place the output in a file or capture it from stdout to do 'something' with it. Can you be a little more specific on what you are using and what you want to do? -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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 parsing
whups, sorry - here is the example: I want to turn URI's like: /script.php/main/index.html?junk=junk /script.php/main/index.html// /script.php/main/index.html?? all into: /script.php/main/index.html best regards, jaxon On 3/25/01 9:25 PM, "Aaron Tuller" <[EMAIL PROTECTED]> wrote: > why can't you str_replace the $QUERY_STRING frm the $REQUEST_URI? > > give an example of what you are trying to do? (I'm sorry if you did > and I missed it) > > -aaron > > At 9:06 PM -0500 3/25/01, Jaxon wrote: >> K, read em all, and understood more than I thought I :) >> >> >> I still don't see how you can 'sanitize' a URI, eg discard anything >> including and after "//" or "??". I think this is needed if you want to >> discard a query string or irregular syntax from your URI. >> >> ereg's don't work reliably, due to the possibility of special chars in the >> URI. >> >> regards, >> jaxon >> >> On 3/25/01 3:18 PM, "Philip Olson" <[EMAIL PROTECTED]> wrote: >> >>> Hi! >>> >>> Check out these two related articles (and user comments) : >>> >>> Building Dynamic Pages With Search Engines in Mind : >>> >>>* http://phpbuilder.com/columns/tim19990117.php3 >>>* http://phpbuilder.com/columns/tim2526.php3 >>> >>> Also check phpinfo() for available predefined variables and plan >>> accordingly. >>> >>> Predefined Variables : >>> >>>* http://www.php.net/manual/en/language.variables.predefined.php >>> >>> And for the brave, check out mod_rewrite : >>> >>> Mod-Rewrite: >>> >>>* http://httpd.apache.org/docs/mod/mod_rewrite.html >>>* http://www.engelschall.com/pw/apache/rewriteguide/ >>>* http://marc.theaimsgroup.com/?l=php-general&s=mod_rewrite >>> >>> >>> Regards, >>> >>> Philip Olson >>> http://www.cornado.com/ >>> >>> >> >> >> -- >> 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] URL parsing
why can't you str_replace the $QUERY_STRING frm the $REQUEST_URI? give an example of what you are trying to do? (I'm sorry if you did and I missed it) -aaron At 9:06 PM -0500 3/25/01, Jaxon wrote: >K, read em all, and understood more than I thought I :) > > >I still don't see how you can 'sanitize' a URI, eg discard anything >including and after "//" or "??". I think this is needed if you want to >discard a query string or irregular syntax from your URI. > >ereg's don't work reliably, due to the possibility of special chars in the >URI. > >regards, >jaxon > >On 3/25/01 3:18 PM, "Philip Olson" <[EMAIL PROTECTED]> wrote: > >> Hi! >> >> Check out these two related articles (and user comments) : >> >> Building Dynamic Pages With Search Engines in Mind : >> >>* http://phpbuilder.com/columns/tim19990117.php3 >>* http://phpbuilder.com/columns/tim2526.php3 >> >> Also check phpinfo() for available predefined variables and plan >> accordingly. >> >> Predefined Variables : >> >>* http://www.php.net/manual/en/language.variables.predefined.php >> >> And for the brave, check out mod_rewrite : >> >> Mod-Rewrite: >> >>* http://httpd.apache.org/docs/mod/mod_rewrite.html >>* http://www.engelschall.com/pw/apache/rewriteguide/ >>* http://marc.theaimsgroup.com/?l=php-general&s=mod_rewrite >> >> >> Regards, >> >> Philip Olson >> http://www.cornado.com/ >> >> > > >-- >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] oracle last inserted
If you use sequence to generate your last_inserted_id, then you can always get that ID by calling SELECT sequence_name.CURRVAL FROM DUAL; within the same session. Chien-pin On Sun, 25 Mar 2001, almir wrote: > is there a way to get last inserted id from oracle as > mysql_inerted_id() or > SELECT @@IDENTITY AS LastId > in mssql server > > i have a function that does only that, takes insert statement and returns > last id, but this function have to work for all tables (different triggers > in oracle) , right now the only thing i can imagine is to give this function > the name of ID column and read name of table with regex and then do > select max(parametar_id) from regex_table > and then to do commit , > this way is somehow realy stupid but is my only solution in this moment so > if you have any better ideas plese help > > almir > > > > -- 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] Decrypt Function?
A, I see. Thank youthat is actually a great idea. Why didn't I think of that? /me hits himself in the head - Original Message - From: "Opec Kemp ( Ozemail )" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 25, 2001 6:57 PM Subject: RE: [PHP] Decrypt Function? > Unix "Crypt" function is a one way encrypytion algorithm therefore you > can not technically decrupted as such. The way that you can check to > see if the given uncrypted value is equals to its crypted value is to > > 1) Crypt the string with the same "salt" > 2) Compare this with the crypted version > > If these 2 are the same then you assume that the 2 strings are equal. > If you really want to "decrypt" the string i.e. turn the encrypted > version into its original readable text then you'll have to use > Mcrypt() functions in PHP instead (if you have PHP 4 and above ). > There are also other Encrytion functions available, check in the > manual: > > http://www.php.net/manual/en/ref.mcrypt.php > > > > -Original Message- > > From: Chris Anderson [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, March 24, 2001 8:44 AM > > To: PHP > > Subject: [PHP] Decrypt Function? > > > > > > Is there any way to decrypt dat encrypted using the crypt > > function? If not, then what purpose does that function have? > > > > > -- > 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] URL parsing
K, read em all, and understood more than I thought I :) I still don't see how you can 'sanitize' a URI, eg discard anything including and after "//" or "??". I think this is needed if you want to discard a query string or irregular syntax from your URI. ereg's don't work reliably, due to the possibility of special chars in the URI. regards, jaxon On 3/25/01 3:18 PM, "Philip Olson" <[EMAIL PROTECTED]> wrote: > Hi! > > Check out these two related articles (and user comments) : > > Building Dynamic Pages With Search Engines in Mind : > > * http://phpbuilder.com/columns/tim19990117.php3 > * http://phpbuilder.com/columns/tim2526.php3 > > Also check phpinfo() for available predefined variables and plan > accordingly. > > Predefined Variables : > > * http://www.php.net/manual/en/language.variables.predefined.php > > And for the brave, check out mod_rewrite : > > Mod-Rewrite: > > * http://httpd.apache.org/docs/mod/mod_rewrite.html > * http://www.engelschall.com/pw/apache/rewriteguide/ > * http://marc.theaimsgroup.com/?l=php-general&s=mod_rewrite > > > Regards, > > Philip Olson > http://www.cornado.com/ > > -- 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] about:home
I know it is possible to redirect a user to their home page, but is it possible to determine what home page they are using?
Re: [PHP] I need an expert to tell me what I am doing wrong
Hi what you need is: $sql = "INSERT INTO orders (product,name,email) :VALUES ('$product','$name','$email')"; You will also need to escape any single quotes in the variables Tom At 01:05 PM 24/03/01 +1200, YoBro wrote: >I have tried that, and I have been reading all sorts of info and been >copying it exact, but it still doesn't work. I am not receiving any errors, >but the data just doesn't appear in the database. I have the table set up >and it all works fine in phpMyAdmin, but I cant get my own form to work. > >There is a page called order.php with a form that on submit goes to the >discussed page. All field variables are correct. Any other ideas. > >: You don't say where the failure is, but I'm guessing its when you do the >: mysql_query. Your INSERT statement looks a bit odd. >: Try: >: >: $sql = "INSERT INTO orders (product,name,email) >:VALUES ($product,$name,$email)"; >: >: John >: >: >: >: -- >: 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] I want to execute a cgi
On Sat, 24 Mar 2001 14:58, Brandon Orther wrote: > Hello, > > I have a cgi that I run in telnet by doing this: > > perl /script/cgi-script.cgi name=cgi+script purpose=test > > is there a way I can run a cgi script and pass it variables? > > Thanks > Brandon Check the Program execution functions; exec, system or the backtick operator should do what you want. -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] I need an expert to tell me what I am doing wrong
On Sat, 24 Mar 2001 11:07, YoBro wrote: > What could I possibly be doing wrong here. The information just will > not insert into my database. > ARGH! > > Please help if you can... > > > $user = "xyz"; > $pass = "123"; > > > //Connect to Database xyz > $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect > to database"); > > mysql_select_db("xyz",$db) OR DIE("Unable to connect to database"); > > $sql = ("INSERT INTO orders VALUES > 'product,name,email'($product,$name,$email)"); > $result = mysql_query($sql); echo mysql_error(); > echo "Order for the $product has been sent"; > > > ?> I think you got the solution to your problem, but for future debugging you might want to add the line above which will spit out a meaningful error message. You could of course combine that with mysql_errno() for some error handling branching. -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] 'How to jump..' part 2
On Mon, 26 Mar 2001 08:25, Christian Dechery wrote: > Regarding my last email (about jumping the first 7 rows of an array)... > > why does this code doesnt work? > > for(reset($array),$count=0;$count<6;next($array),$count++); > > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer I don't think PHP will understand commas as command separators. Perhaps what you could try is a simple loop 0 to 6 and for each iteration of the loop, unset the corresponding array element for($i=0; $i <= 6; $i++) { unset($array[$i]; } Better still if you have PHP4, use array_shift to pop the first however many elements from the front of the array. -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] ImageTTFText()
On Sun, 25 Mar 2001 08:52, Paulo Vinícius Vitto Ruthes wrote: > folks, > i installed php4 by a RPM, it wasn't compiled --enable-gd-imgstrttf , > so, when I use a function like > ImageTTFText(), it returns me the text mirrowed (inverted like a > mirror) and the angulation doesn't work right... > but, when I try to compile the tar.gz php installation, > it don't let me compile because can't find libgd.* > not in /usr /usr/lib... can anybody give me a really good reason for > this not working? 1) You don't have libgd installed? 2) You have it somewhere else like /usr/local/lib? -- David Robley| WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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] Decrypt Function?
> Is there any way to decrypt dat encrypted using the crypt > function? If not, then what purpose does that function have? Encrypt data! ;) crypt is a one-way finction, it produces a hash from some plain text, and its result is suitable to store sensitive data in database, like passwords... If you want to store information that you want to get back to the initial state (plain text) you should not use crypt() or md5()... If you only want to store encrypted passwords crypt is enought.. When you want to confirm that a inputed text is equals to the stored and encrypted password, you just have to encrypt the inputed text and compare it with the previously stored password... Valter Santos WEB/WAP Consultant Email : [EMAIL PROTECTED] Mobile: +351 93 9650075 WeDo Consulting - http://www.wedo.pt > -Original Message- > From: Chris Anderson [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 23, 2001 10:44 PM > To: PHP > Subject: [PHP] Decrypt Function? > > > Is there any way to decrypt dat encrypted using the crypt > function? If not, then what purpose does that function have? > -- 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] Sendmail
Dear All, I put the code like this : Email Thank you for your input\n"; } else{ echo "Error \n"; } ?> I've try to put this code to another server and it's work. I really lost to figure out what's wrong with my configuration (I'm new in PHP too..) Thanks for all answer ... regards, Atet >it would help if you showed a snippet of your mail code >- Original Message - >From: "Atet Sugiharto" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Saturday, March 24, 2001 1:49 AM >Subject: [PHP] Sendmail > > >> Hi , >> >> I'm at a lossI've searched throught the knowledgebase, archives, docs, >> etc but I can't figure out what's going on. The problem is when using the >> mail() function nothing gets send and I don't get any error messages >either. >> It's like the message gets eaten by a black hole. >> >> I already put "-t -i" in the path, but still doesn't work .. >> Anybody can help me ? >> >> Regards, >> >> Atet Sugiharto >> >> >> -- >> 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] Decrypt Function?
<< Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? >> Crypt cannot be decrypted. One use of the function is for storing passwords on a server where people can access them. If you crypt the passwords before you store them on the server, nobody can see the actual passwords. Now when someone tries to login with one of those passwords, you crypt the password he enters, compare it with the version on the server, and if they match, it's the right password. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- 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] A few questions...
while a bit ugly, you could just use array_pop() to get each item into a variable and then echo them back out into your variable assignment... somewhat cleaner would be to create an assoc array of config vars: $uri_items_num=count($path_array); for ($i=1, $i <= $uri_items_num, $i++) { $key=array_pop($path_array); $value=array_pop($path_array); config_array[$key] = $value } or something. regards, jaxon On 3/25/01 6:54 PM, "Chris Cocuzzo" <[EMAIL PROTECTED]> wrote: > right. ok I understand that explode function. But what I'm asking is not so > much once I have a URL in the form of /something/something/something > ...etc.., but more if I have a URL like /something?d=a&f=g, to make it like > /something/d/a/f/g ... do you know what I mean? > > > Chris > > -Original Message- > From: Jaxon [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 25, 2001 6:32 PM > To: [EMAIL PROTECTED]; PHP General List (E-mail) > Subject: Re: [PHP] A few questions... > > > Chris, > >> I think I just slightly unsure of how that explode() function works in > this >> situation...could you clarify further? >> >>> >>> $path_array = explode('/', $REQUEST_URI); >>> >>> $last_item = array_pop($path_array); >>> $next_to_last_item = array_pop($path_array); / item >>> > $REQUEST_URI contains the non-domin path (the URI) - it's a predefined > variable like $PHP_SELF, etc > > http://www.php.net/manual/en/language.variables.predefined.php > > in this explode() example, the '/' is the devider, so if you have > > http://www.somedomain.com/dir1/dir2/dir3/somepage3.php > > The URI is: /dir1/dir2/dir3/somepage3.php > > and 'exploding' divides that into array elements (dir1, dir2, dir3, > somepage.php) > > regards, > jaxon > > > -- > 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] Making a function/method private
Hi all, I know that we can't make a class method or variable private in php (I hope this get improved sometimes). But, I'm wondering if anyone has found a smart way to limit that only a certain file can call the function/method from another file. Say, I have the file function_def.inc that has a whole bunch of function in it. I want to make it private. I want that only the file wrapper.inc can use the function inside function.def, by including it. If I have another file, say application.php, and I include function_def.inc in application.php, I want that application.php still cannot use any function defined in function_def.inc. Can I do that? If there is a way to do that, maybe there is a way to make some method in a class private by the putting it in certain file, using this same analogy. I want to do that because I'm developing an API/Wrapper for other developers, and I want to make some methods/functions private, for security reason. Thanks for any help. Reuben D. Budiardja -- 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] Decrypt Function?
Unix "Crypt" function is a one way encrypytion algorithm therefore you can not technically decrupted as such. The way that you can check to see if the given uncrypted value is equals to its crypted value is to 1) Crypt the string with the same "salt" 2) Compare this with the crypted version If these 2 are the same then you assume that the 2 strings are equal. If you really want to "decrypt" the string i.e. turn the encrypted version into its original readable text then you'll have to use Mcrypt() functions in PHP instead (if you have PHP 4 and above ). There are also other Encrytion functions available, check in the manual: http://www.php.net/manual/en/ref.mcrypt.php > -Original Message- > From: Chris Anderson [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 24, 2001 8:44 AM > To: PHP > Subject: [PHP] Decrypt Function? > > > Is there any way to decrypt dat encrypted using the crypt > function? If not, then what purpose does that function have? > -- 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] A few questions...
right. ok I understand that explode function. But what I'm asking is not so much once I have a URL in the form of /something/something/something ...etc.., but more if I have a URL like /something?d=a&f=g, to make it like /something/d/a/f/g ... do you know what I mean? Chris -Original Message- From: Jaxon [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 6:32 PM To: [EMAIL PROTECTED]; PHP General List (E-mail) Subject: Re: [PHP] A few questions... Chris, > I think I just slightly unsure of how that explode() function works in this > situation...could you clarify further? > >> >> $path_array = explode('/', $REQUEST_URI); >> >> $last_item = array_pop($path_array); >> $next_to_last_item = array_pop($path_array); / item >> $REQUEST_URI contains the non-domin path (the URI) - it's a predefined variable like $PHP_SELF, etc http://www.php.net/manual/en/language.variables.predefined.php in this explode() example, the '/' is the devider, so if you have http://www.somedomain.com/dir1/dir2/dir3/somepage3.php The URI is: /dir1/dir2/dir3/somepage3.php and 'exploding' divides that into array elements (dir1, dir2, dir3, somepage.php) regards, jaxon -- 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] Decrypt Function?
Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have?
[PHP] PHP and MySQL insert problem
Can any one help me with the following problem? I have a very simple query: ... $sql="insert into tt (a, b) values ('1', '2')"; $result=mysql_query($sql); ... I always got the following error message when I run it from my browser. Warning: MySQL: Unable to save result set in /usr/local/apache/htdocs/tt.php on line 9 But even with this message, the values are still inserted into tt. When I change $sql to &sql="select * from tt"; There were no such error message. It puzzled me? Why? My system: PHP 4.0.4pl1, MySQL 3.23.32 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] A few questions...
Chris, > I think I just slightly unsure of how that explode() function works in this > situation...could you clarify further? > >> >> $path_array = explode('/', $REQUEST_URI); >> >> $last_item = array_pop($path_array); >> $next_to_last_item = array_pop($path_array); / item >> $REQUEST_URI contains the non-domin path (the URI) - it's a predefined variable like $PHP_SELF, etc http://www.php.net/manual/en/language.variables.predefined.php in this explode() example, the '/' is the devider, so if you have http://www.somedomain.com/dir1/dir2/dir3/somepage3.php The URI is: /dir1/dir2/dir3/somepage3.php and 'exploding' divides that into array elements (dir1, dir2, dir3, somepage.php) regards, jaxon -- 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] Requesting username/pwd with apache and aqcuiring input
Wow, great !! Just what I was looking for ! Thanks : -- - NoSpeed -- - Carpe Noctem "The stickers on the side of the box said "Supported Platforms: Windows 98, Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported platform." "Jaxon" <[EMAIL PROTECTED]> schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | check this out: | http://www.zend.com/zend/tut/authentication.php | | regards, | jaxon | | | On 3/25/01 5:59 PM, "NoSpeed" <[EMAIL PROTECTED]> wrote: | | > Hi | > | > I wondered if it was possible in PHP to let it pop up a screen which | > reqcuires username/pwd from the visitor, just like you can tell apache to do | > so with the .htaccess files. | > | > And if yes, how to retrieve the input from the user ? | > | > -- | > - NoSpeed | > -- | > - Carpe Noctem | > | > "The stickers on the side of the box said "Supported Platforms: Windows 98, | > Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported | > platform." | > | > | | | -- | 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] getting numeric index of array
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christian Dechery) wrote: > $myArray = array( > "one" => "something", > "two" => "otherthing", > "three" => "whatever" > ); > > I want to, given the key (or value), it returns me the numeric index for > that ocurrence... examples: > > given "one" -> returns 0 > given "whatever" -> returns 2 > given "two" -> returns 1 > given "four" -> returns NULL or false... http://php.net/manual/en/function.array-search.php (It's only avaliable in PHP4 CVS so far, but see the annotations for examples of user functions to do the same thing.) -- CC -- 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] Requesting username/pwd with apache and aqcuiring input
check this out: http://www.zend.com/zend/tut/authentication.php regards, jaxon On 3/25/01 5:59 PM, "NoSpeed" <[EMAIL PROTECTED]> wrote: > Hi > > I wondered if it was possible in PHP to let it pop up a screen which > reqcuires username/pwd from the visitor, just like you can tell apache to do > so with the .htaccess files. > > And if yes, how to retrieve the input from the user ? > > -- > - NoSpeed > -- > - Carpe Noctem > > "The stickers on the side of the box said "Supported Platforms: Windows 98, > Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported > platform." > > -- 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] A few questions...
I think I just slightly unsure of how that explode() function works in this situation...could you clarify further? chris -Original Message- From: Jaxon [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 6:06 PM To: [EMAIL PROTECTED]; PHP General List (E-mail) Subject: Re: [PHP] A few questions... Chris, a few answers :) On 3/25/01 5:43 PM, "Chris Cocuzzo" <[EMAIL PROTECTED]> wrote: > hey- > > Alright I noticed that question about URL parsing. I could've sworn I saw > some article on PHPBuilder.com that said that instead of doing all that > modifying with apache, you could simply write something to change the URL > with '?' and '&' and '=' so that they symbols could be represented using a > simple /, does anyone remember seeing it?... dunno - think it's in the php.ini? > > In any case, I'll ask, what would be the best way to do this with > scripting, something like str_replace() or perhaps a regular expression to > both modify the URL and then allow pages using that modified URL to > recognized the variable/value pairs? Or is that even possible? You could... I'm hacking through using: $path_array = explode('/', $REQUEST_URI); $last_item = array_pop($path_array); $next_to_last_item = array_pop($path_array); / item only drawback is the positional stuff is fixed. now I am trying to figure out how to generate my hrefs in the page to have a matching structure > > My other question is this: Sometimes I notice URL's where it looks like > this, http://www.whatever.com/?blah=blah&d=d, or > http://www.whatever.com/local?name=name&d=d. How is that done, where there > is no file extension after the file name, or no file name at all, just a > question mark directly after the slash? probably the a .htaccess or apache.conf directive: ForceType application/x-httpd-php3 This would send everything to a script called "local". This is from: http://phpbuilder.com/columns/tim19990117.php3 hth, regards, jaxon > > thanks > Chris > -- 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] Requesting username/pwd with apache and aqcuiring input
Hi I wondered if it was possible in PHP to let it pop up a screen which reqcuires username/pwd from the visitor, just like you can tell apache to do so with the .htaccess files. And if yes, how to retrieve the input from the user ? -- - NoSpeed -- - Carpe Noctem "The stickers on the side of the box said "Supported Platforms: Windows 98, Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported platform." -- 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] A few questions...
Chris, a few answers :) On 3/25/01 5:43 PM, "Chris Cocuzzo" <[EMAIL PROTECTED]> wrote: > hey- > > Alright I noticed that question about URL parsing. I could've sworn I saw > some article on PHPBuilder.com that said that instead of doing all that > modifying with apache, you could simply write something to change the URL > with '?' and '&' and '=' so that they symbols could be represented using a > simple /, does anyone remember seeing it?... dunno - think it's in the php.ini? > > In any case, I'll ask, what would be the best way to do this with > scripting, something like str_replace() or perhaps a regular expression to > both modify the URL and then allow pages using that modified URL to > recognized the variable/value pairs? Or is that even possible? You could... I'm hacking through using: $path_array = explode('/', $REQUEST_URI); $last_item = array_pop($path_array); $next_to_last_item = array_pop($path_array); / item only drawback is the positional stuff is fixed. now I am trying to figure out how to generate my hrefs in the page to have a matching structure > > My other question is this: Sometimes I notice URL's where it looks like > this, http://www.whatever.com/?blah=blah&d=d, or > http://www.whatever.com/local?name=name&d=d. How is that done, where there > is no file extension after the file name, or no file name at all, just a > question mark directly after the slash? probably the a .htaccess or apache.conf directive: ForceType application/x-httpd-php3 This would send everything to a script called "local". This is from: http://phpbuilder.com/columns/tim19990117.php3 hth, regards, jaxon > > thanks > Chris > -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Ok, I'll get this eventually. -- 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] 'How to jump..' part 2
Regarding my last email (about jumping the first 7 rows of an array)... why does this code doesnt work? for(reset($array),$count=0;$count<6;next($array),$count++); . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] A few questions...
hey- Alright I noticed that question about URL parsing. I could've sworn I saw some article on PHPBuilder.com that said that instead of doing all that modifying with apache, you could simply write something to change the URL with '?' and '&' and '=' so that they symbols could be represented using a simple /, does anyone remember seeing it?... In any case, I'll ask, what would be the best way to do this with scripting, something like str_replace() or perhaps a regular expression to both modify the URL and then allow pages using that modified URL to recognized the variable/value pairs? Or is that even possible? My other question is this: Sometimes I notice URL's where it looks like this, http://www.whatever.com/?blah=blah&d=d, or http://www.whatever.com/local?name=name&d=d. How is that done, where there is no file extension after the file name, or no file name at all, just a question mark directly after the slash? thanks Chris -- 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] drop down used to redirect?
Hi, can anyone point me towards an example of how to use a drop down select as a navigation jump, maybe by sending a redirect header? thanks! duirfire -- 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] How to jump 7 rows in array
I'm loading a set of txt files into a DB. The first 7 lines of each file are useless to me... I want some way I can always jump those 7 lines... I tought of doing a little function like jumpfirstsevenrows(array), but then I'd have to pass the whole array as parameter and that can get real memory consuming for such a small task. I'll have arrays with more than 100.000 lines... since there are pointers in PHP, I'm lost... I don't wanna have to get the same 'for bla bla bla code' in each and every function that processes this file (there is one function per file, more then 20 overall)... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] script filename?
At 03:53 PM 3/25/2001, Philip Olson wrote: thank you - that was the function that i was looking for! ~kurth >Hi Kurth, > >Check out basename() and use it against a predefined variable such as >SCRIPT_NAME. Example : > >///apples/foo.php?fruit=apple > > print basename($SCRIPT_NAME); // foo.php > >Be sure to check out : > > http://www.php.net/manual/en/language.variables.predefined.php > http://www.php.net/manual/en/function.basename.php > >Also check phpinfo() to view how your server deals with such things. > > >Regards, > >Philip Olson >http://www.cornado.com/ > >On Sun, 25 Mar 2001, Kurth Bemis wrote: > > > i was pretty sure that there was a function to return JUST the script > > filename.. Unlike $php_self and $script_name i need something that till > > ruturn JUST the scriptname. ie /test/test/blah.php returns blah.php. > > > > any ideas? or am i going to have to reverse the string find the first "/" > > drop the rest of the string and return the file name. :-) > > > > ~kurth > > > > > > -- > > 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Ok, it wrote, but didn't write above.. *grins* -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
I'm such a pest. -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
maybe spinning the 'd' in $fd 180 degrees to make it a p will help... Sorry, haven't tried this myself, typo's happen. heh, I'm still trying to compile php 4 windows :-( been hoping for a helping hand. ""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $fp = fopen ($filename, "r"); > $newsSubmit = fread ($fd, filesize ($filename)); > > These are giving me a parse error: > Warning: Supplied argument is not a valid File-Handle resource in > C:/XITAMI/owen/website/php/newsSubmit.php on line 10 > > > > > > > > -- > 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] getting numeric index of array
I wanna get the numeric index for a multi-dimensional associative array... I have like $myArray = array( "one" => "something", "two" => "otherthing", "three" => "whatever" ); I want to, given the key (or value), it returns me the numeric index for that ocurrence... examples: given "one" -> returns 0 given "whatever" -> returns 2 given "two" -> returns 1 given "four" -> returns NULL or false... anyone? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] Sendmail
it would help if you showed a snippet of your mail code - Original Message - From: "Atet Sugiharto" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 24, 2001 1:49 AM Subject: [PHP] Sendmail > Hi , > > I'm at a lossI've searched throught the knowledgebase, archives, docs, > etc but I can't figure out what's going on. The problem is when using the > mail() function nothing gets send and I don't get any error messages either. > It's like the message gets eaten by a black hole. > > I already put "-t -i" in the path, but still doesn't work .. > Anybody can help me ? > > Regards, > > Atet Sugiharto > > > -- > 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
$fp = fopen ($filename, "r"); $newsSubmit = fread ($fd, filesize ($filename)); These are giving me a parse error: Warning: Supplied argument is not a valid File-Handle resource in C:/XITAMI/owen/website/php/newsSubmit.php on line 10 -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Oh. Duh! Thanks. ;P Joe Brown wrote: > Take a closer look at the previous message I sent $filename was defined as: > $filename="news.txt"; > > ""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > When you say $newsSubmit = fread ($fd, filesize ($filename)); > > > > Do you mean specify the filename? $news.txt then? > > > > > > > > > > -- > > 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Take a closer look at the previous message I sent $filename was defined as: $filename="news.txt"; ""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When you say $newsSubmit = fread ($fd, filesize ($filename)); > > Do you mean specify the filename? $news.txt then? > > > > > -- > 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] script filename?
Hi Kurth, Check out basename() and use it against a predefined variable such as SCRIPT_NAME. Example : ///apples/foo.php?fruit=apple print basename($SCRIPT_NAME); // foo.php Be sure to check out : http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/manual/en/function.basename.php Also check phpinfo() to view how your server deals with such things. Regards, Philip Olson http://www.cornado.com/ On Sun, 25 Mar 2001, Kurth Bemis wrote: > i was pretty sure that there was a function to return JUST the script > filename.. Unlike $php_self and $script_name i need something that till > ruturn JUST the scriptname. ie /test/test/blah.php returns blah.php. > > any ideas? or am i going to have to reverse the string find the first "/" > drop the rest of the string and return the file name. :-) > > ~kurth > > > -- > 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
When you say $newsSubmit = fread ($fd, filesize ($filename)); Do you mean specify the filename? $news.txt then? -- 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] script filename?
i was pretty sure that there was a function to return JUST the script filename.. Unlike $php_self and $script_name i need something that till ruturn JUST the scriptname. ie /test/test/blah.php returns blah.php. any ideas? or am i going to have to reverse the string find the first "/" drop the rest of the string and return the file name. :-) ~kurth -- 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] finding primary key with oci8
is there any why to find out from php with oci8 functionen , which colomn/s is/are primary key in a table in oracle almir -- 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] rewind
Thanks! :) Jack Dempsey wrote: > someone was asking about fseek...try this: > http://www.php.net/manual/en/function.rewind.php > > i haven't tried it, but it seems to return the pointer to the beginning, > which is where you wanted... > > -jack > > -- > 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] URL parsing
Hi! Check out these two related articles (and user comments) : Building Dynamic Pages With Search Engines in Mind : * http://phpbuilder.com/columns/tim19990117.php3 * http://phpbuilder.com/columns/tim2526.php3 Also check phpinfo() for available predefined variables and plan accordingly. Predefined Variables : * http://www.php.net/manual/en/language.variables.predefined.php And for the brave, check out mod_rewrite : Mod-Rewrite: * http://httpd.apache.org/docs/mod/mod_rewrite.html * http://www.engelschall.com/pw/apache/rewriteguide/ * http://marc.theaimsgroup.com/?l=php-general&s=mod_rewrite Regards, Philip Olson http://www.cornado.com/ On Sun, 25 Mar 2001, Jaxon wrote: > oops :) > > http://www.domain.com/index.php/main/index.html?ii=1 > versus > http://www.domain.com/index.php/main/index.html > > I want to get "index.html" and "main" into variables, as the two items will > always be present - if $ii is set, I want to strip it from the URI before > parsing the items out. > > I suppose with parse_url() I could do something..but I really only want to > deal with the URI. > > currently, this seems to work: > > $path_array = explode('/', $REQUEST_URI); > > if (isset($ii)) array_pop($path_array); // remove $ii > $page_name = array_pop($path_array); //get page name from end of array > $tpl= array_pop($path_array); //get page type from next item > > but is inelegant :) > > regards, > jaxon > > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (Jaxon) wrote: > > > >> Any way to combine both forms of url parsing? > >> I want to use standard slash notation for navigation ,but also account for > >> the occasional variable used within a single page. > >> > >> e.g. URL can be either: > >> domain.com/index.php/main/index.html?ii=1 > >> > >> or: > >> domain.com/index.php/main/index.html?ii=1 > > > > Umm, how are these different? > > > > (If you're trying to extract info from a url, perhaps > > parse_url(),basename(), and/or dirname() are what you're seeking...?) > > > -- > 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Re-create the file. You're most of the way there. if( $formSubmit ) { echo "Your news has been processed."; $filename = "news.txt"; //This is simpler than messing with an array of the original content. $fp = fopen ($filename, "r"); $newsSubmit = fread ($fd, filesize ($filename)); fclose ($fp); $fp = fopen( $filename, "w" ); // change append to write (a to w) fwrite( $fp, $frmName );//write the new fwrite( $fp, $newsSubmit);//write the old fclose( $fp ); } else { include ( "newsForm.php" ); } if you want to use fseek, then try this: if( $formSubmit ) { echo "Your news has been processed."; $filename = "news.txt"; //This is simpler than messing with an array of the original content. $fp = fopen ($filename, "r+"); $newsSubmit = fread ($fd, filesize ($filename)); fseek($fp,0); fwrite( $fp, $frmName );//write the new fwrite( $fp, $newsSubmit);//write the old fclose( $fp ); } else { include ( "newsForm.php" ); } ""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, with this fseek.. > > Could you give me an example of how to implement 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 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
You should find it on http://www.php.net/manual/en/functions.fseek.php Or something. There are examples that are quite clear. - Richard ""Dddogbruce (@home.com)"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, with this fseek.. > > Could you give me an example of how to implement 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 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] rewind
someone was asking about fseek...try this: http://www.php.net/manual/en/function.rewind.php i haven't tried it, but it seems to return the pointer to the beginning, which is where you wanted... -jack -- 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 parsing
oops :) http://www.domain.com/index.php/main/index.html?ii=1 versus http://www.domain.com/index.php/main/index.html I want to get "index.html" and "main" into variables, as the two items will always be present - if $ii is set, I want to strip it from the URI before parsing the items out. I suppose with parse_url() I could do something..but I really only want to deal with the URI. currently, this seems to work: $path_array = explode('/', $REQUEST_URI); if (isset($ii)) array_pop($path_array); // remove $ii $page_name = array_pop($path_array); //get page name from end of array $tpl= array_pop($path_array); //get page type from next item but is inelegant :) regards, jaxon > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Jaxon) wrote: > >> Any way to combine both forms of url parsing? >> I want to use standard slash notation for navigation ,but also account for >> the occasional variable used within a single page. >> >> e.g. URL can be either: >> domain.com/index.php/main/index.html?ii=1 >> >> or: >> domain.com/index.php/main/index.html?ii=1 > > Umm, how are these different? > > (If you're trying to extract info from a url, perhaps > parse_url(),basename(), and/or dirname() are what you're seeking...?) -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Ok, with this fseek.. Could you give me an example of how to implement 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]
Re: [PHP] URL parsing
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jaxon) wrote: > Any way to combine both forms of url parsing? > I want to use standard slash notation for navigation ,but also account for > the occasional variable used within a single page. > > e.g. URL can be either: > domain.com/index.php/main/index.html?ii=1 > > or: > domain.com/index.php/main/index.html?ii=1 Umm, how are these different? (If you're trying to extract info from a url, perhaps parse_url(),basename(), and/or dirname() are what you're seeking...?) -- CC -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
Thanks for the quick reply, looking in to 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]
RE: [PHP] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
i believe there was a post about 10 messages ago regarding this same problem--try fseek: http://www.php.net/manual/en/function.fseek.php -jack -Original Message- From: Dddogbruce (@home.com) [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 1:36 PM To: [EMAIL PROTECTED] Subject: [PHP] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah! I'm writing a news script, and I just got it working earlier this morning. Now it writes the variables from the form to the .txt file; but when I go to write again (another news article) it does it beside, not above. Me, thinking so brilliantly at 6AM, thought append would mean above, but it means beside. This is the script in working condition, although it only writes one varibale since I was testing. I'm not using mysql, only a .txt file and two PHP documents. What I want it to do is post $frmName in the .txt file, and when another entry is processed it will add that above. I hope this is possible, because I don't have access to a MySQL database *yet.* Post all suggestions, please. -Owen -- 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] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append! Wah!
I'm writing a news script, and I just got it working earlier this morning. Now it writes the variables from the form to the .txt file; but when I go to write again (another news article) it does it beside, not above. Me, thinking so brilliantly at 6AM, thought append would mean above, but it means beside. This is the script in working condition, although it only writes one varibale since I was testing. I'm not using mysql, only a .txt file and two PHP documents. What I want it to do is post $frmName in the .txt file, and when another entry is processed it will add that above. I hope this is possible, because I don't have access to a MySQL database *yet.* Post all suggestions, please. -Owen -- 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 parsing
Any way to combine both forms of url parsing? I want to use standard slash notation for navigation ,but also account for the occasional variable used within a single page. e.g. URL can be either: domain.com/index.php/main/index.html?ii=1 or: domain.com/index.php/main/index.html?ii=1 if (isset($ii) // how do I grab value and truncate $REQUEST_URI $path_array = explode('/', $REQUEST_URI); $page_name = array_pop($path_array); //get page name from end of array $page_type = array_pop($path_array); //get page type from next item best regards, jaxon On 3/23/01 9:09 PM, "Aaron Tuller" <[EMAIL PROTECTED]> wrote: > super easy. > > $path_array = explode('/', $REQUEST_URI); > $numPathElements = count($path_array); > > then loop through the elements and do what you need, you might need > to use strtok() if you're expecting slashes in your arguments. > > -aaron > > At 8:58 PM -0500 3/23/01, Jaxon wrote: >> how about parsing a url from passing variables like : >> test.php/op/3/op2/6/pagename.html >> >> cannot this be parsed, to let search engines spider past the "?" properly? >> >> regards, >> jaxon -- 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 Digest 25 Mar 2001 18:29:24 -0000 Issue 588
php-general Digest 25 Mar 2001 18:29:24 - Issue 588 Topics (messages 45471 through 45500): Re: Text fading with PHP? 45471 by: Kristofer Widholm Re: What is session.cookie_secure? 45472 by: Yasuo Ohgaki Re: [PHP4] 45473 by: Joe Brown 45496 by: Dddogbruce \(.home.com\) 45497 by: Dddogbruce \(.home.com\) Compiling, How to resolve COM 45474 by: Joe Brown Strange Error Reporting 45475 by: Kristofer Widholm 45495 by: CC Zona Re: compile php4 compress uncompress libmysqlclient issue 45476 by: Grant Walters Re: PHP_SELF problems! 45477 by: almir Re: PHP vs Servlet 45478 by: Jesper Blomström PDF support in PHP 45479 by: Phil Allsopp Let the Server do the downloading 45480 by: techzeus.pacific.net.sg writing to a file 45481 by: adam 45484 by: Felix Kronlage 45485 by: Mukul Sabharwal Regular Expr. on access.log 45482 by: Andre $B#J#u#s#t(B$B#i#n(B$B#M#a#i#l(B$B>pJs(B 45483 by: ka.tkk.att.ne.jp Can You get a file unlinked after one month? 45486 by: Jan Grafström 45489 by: Christian Reiniger Re: ODBC & Oracle 45487 by: Brooks, Ken Re: attachments with mail() function 45488 by: BlackLord String Functions (replace) 45490 by: Brooks, Ken 45491 by: Brooks, Ken Changing within a file 45492 by: Jimmy Bäckström 45499 by: Jesper Blomström huge time/memory consuming script 45493 by: Christian Dechery 45494 by: Brooks, Ken Re: Delaying Printed Output 45498 by: Greg Scott set_error_handler and parse errors 45500 by: Dean Hall 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] -- Here's what you wrote, 01.03.24: >Hi > >Is it possible to do text fading with PHP. For instance, I want to one line >of text fade in, have another line fade in later, and a third line after >that. Then all three lines will fade out at the same time and start over >with three different lines. Is this possible with php? > >Thanks > >Jamie No, due to some browsers waiting for all a complete document object before outputting text. Even with browsers that will parse and display a partial feed, you really can't achieve a smooth effect due to network latency. The best thing to do is to work with JavaScript and CSS. Look into the setTimeout() function in JavaScript and use it to step through different color values for your text using CSS. Or, just use an animated gif. K -- __ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 __ I guess its for make use of cookie's secure option. (Send cookie only when encryption (SSL) is enabled) I haven't look into code, so I can be wrong. -- Yasuo Ohgaki "Michael Champagne" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I noticed the setting session.cookie_secure in my php_info(), but could not > find anything mentioned about it in the documentation. Does anyone know what > this setting does? > > -- > Michael Champagne, Software Engineer > Capital Institutional Services, Inc. > wk: [EMAIL PROTECTED] > hm: [EMAIL PROTECTED] > > > > ** > This communication is for informational purposes only. It is not > intended as an offer or solicitation for the purchase or sale of > any financial instrument or as an official confirmation of any > transaction, unless specifically agreed otherwise. All market > prices, data and other information are not warranted as to > completeness or accuracy and are subject to change without > notice. Any comments or statements made herein do not > necessarily reflect the views or opinions of Capital Institutional > Services, Inc. Capital Institutional Services, Inc. accepts no > liability for any errors or omissions arising as a result of > transmission. Use of this communication by other than intended > recipients is prohibited. > ** > > -- > 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] > if($formSubmit) { echo "form submitted: $frmName"; //<= have you tried this to make sure $formSubmit is true? $newsSubmit = file("news.txt"); //RTM, your not using file() the way it's inteneded. $fp = fopen("news.txt", 'a'); //looks good fwrite($fp, $frmName); //looks good, but does $frmName contain anything? fclose($fb); //$newsSubmit is not a file
[PHP] set_error_handler and parse errors
Is it just me, or do parse errors get reported by the engine even if you use your own error handler? I've registered my own error handler with "set_error_handler()", but it doesn't get called on parse errors -- the manual seems to hint that this is the case (without actually saying it), and I searched the list archives and came across someone who hacked the PHP source to make parse errors get passed to the error handler. Anyone know for sure? Dean. -- 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]
SV: [PHP] Changing within a file
Hi! This is what you want: http://www.php.net/manual/en/function.preg-replace.php The preg_replace-method uses a ordinary RE to search and replace. Hoppas det går vägen! / Jeppe Jimmy Bäckström <[EMAIL PROTECTED]> skrev i diskussionsgruppsmeddelandet:001901c0b543$329648c0$[EMAIL PROTECTED] Yo! Does anyone know how I can change a line in a textfile? I want to find a specific line, and then change it a bit... -- 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] Delaying Printed Output
> Have you looked into javascript/java? This client has worked up a Power Point slide presentation that he wants me to duplicate on the web. I had a PHP solution that was working fine, but then he decided to jazz up his Power Point presentation some. The adding a single line of text at time didn't seem to complicated so I was going to see if I could find a PHP solution to it that would work with all browsers. But now he's decided that he wants motion involved with it too, so I guess I'll start learning a little more about FLASH. I did discover I have an Adobe program I have can use to create FLASH files so I guess I'll try that route and just warn him that he may be eliminating some web visitors this way (actually I'll probably keep the old PHP slide show and give them an option). Thanks everyone for your input into this. Greg -- 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] [PHP4]
All the variables are true. When I "post" the information to a nother file from the form, it works. This is the form script, if you're wondering.. Submit news Name: Email: Subject: Message: -- 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] [PHP4]
Your suggestions returned a parse error: I don't know.. I'm new to this. You said something about file(), could you explain that? Maybe that's the problem. -- 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] Strange Error Reporting
In article, [EMAIL PROTECTED] (Kristofer Widholm) wrote: > Warning: Bad escape sequence: \. in validate.inc.php on line 142 > > CODE: > Line 142: if (!eregi("index\.php",$PHP_SELF)) { > blah blah blah; > } > > I didn't know there was any other escape sequence possible in RegEx! In a way, there is another "escape": using square braces. eregi("index[.]php",$PHP_SELF) -- CC -- 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] huge time/memory consuming script
I don't know exactly what you are asking. But I'm running a script as we speak that is pulling 75000+ rows from an oracle database over ODBC (from a remote server) and creating a table in a local mysql database, dumping all records into it. -ken -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: [PHP] huge time/memory consuming script I'm thinking about building a PHP script that loads an entire database on a weekly basis, based on a text catalog. The reason I'm doing it, it's because the catalog is too generic and has lots off stuff to be done in it (such as lots of string replacements and 'fixing') before I can really parse it and create the insert statements. The doubt I have is this: it's kinda of BIG catalog, I'm talking about more than 20MB of text files, and I have to 'clean' the whole DB and load it entirely again (I don't make the rules, this is how it works)... I'm worried about the time it will take and the memory it'll cost, so I was thinking of a step-by-step solution, like break the process into several 'steps' that of course would be carried out automatically. Like I'd have So... just by reloading the page, I get a good 'memory cleaning' so I can be sure everything is going to get carried out??... there are steps that I'm worried about taking over 30min to finish, like loading the main table with 140.000 rows... thanks... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] huge time/memory consuming script
I'm thinking about building a PHP script that loads an entire database on a weekly basis, based on a text catalog. The reason I'm doing it, it's because the catalog is too generic and has lots off stuff to be done in it (such as lots of string replacements and 'fixing') before I can really parse it and create the insert statements. The doubt I have is this: it's kinda of BIG catalog, I'm talking about more than 20MB of text files, and I have to 'clean' the whole DB and load it entirely again (I don't make the rules, this is how it works)... I'm worried about the time it will take and the memory it'll cost, so I was thinking of a step-by-step solution, like break the process into several 'steps' that of course would be carried out automatically. Like I'd have So... just by reloading the page, I get a good 'memory cleaning' so I can be sure everything is going to get carried out??... there are steps that I'm worried about taking over 30min to finish, like loading the main table with 140.000 rows... thanks... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] Changing within a file
Yo! Does anyone know how I can change a line in a textfile? I want to find a specific line, and then change it a bit...
RE: [PHP] String Functions (replace)
Nevermind, stumbled across addslashes(). What a wonderful language. :) -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] String Functions (replace) I know this is completely stupid but how can i take something with a single quote ' and replace it in the string with \' Ex: Bain's Deli to Bain\'s Deli $fieldcontents = strtr($fieldcontents, "'", "\\\'"); -or- $fieldcontents = strtr($fieldcontents, "'", "\\'"); doesn't work. I feel dumb, but my brain isn't going yet this morning. Thanks, ken -- 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] String Functions (replace)
I know this is completely stupid but how can i take something with a single quote ' and replace it in the string with \' Ex: Bain's Deli to Bain\'s Deli $fieldcontents = strtr($fieldcontents, "'", "\\\'"); -or- $fieldcontents = strtr($fieldcontents, "'", "\\'"); doesn't work. I feel dumb, but my brain isn't going yet this morning. Thanks, ken -- 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]