php-general Digest 10 Feb 2001 05:31:24 -0000 Issue 503 Topics (messages 38970 through 39053): shows up in IE but not Netscape 38970 by: Erik Boles 38971 by: Matt McClanahan 38972 by: Angerer, Chad 38973 by: Jesse Swensen 38975 by: Robin Vickery 38976 by: Matt Williams 38981 by: Philip Olson 38986 by: John Vanderbeck 39001 by: John McCreesh Re: good free/cheap IDE for PHP 38974 by: Charles Mulford 38978 by: Jeff Oien 38980 by: Charles Mulford 38984 by: Christian Reiniger Viewing Memo fields 38977 by: Todd Cary Re: echo vs print 38979 by: Ben Peter problem with classes 38982 by: Siim Einfeldt aka Itpunk 38985 by: Christian Reiniger 38989 by: James Moore Re: Files only available via HTTPS 38983 by: Chris HOWTO handle sessions ? 38987 by: Evelio Martinez 38992 by: JB 39000 by: Philip Olson 39013 by: Rob Root Re: [Newbie] PHP Variables 38988 by: Steve Haemelinck 38993 by: Steve Haemelinck 38994 by: Steve Edberg 38995 by: John Vanderbeck 38997 by: Steve Haemelinck 39007 by: Christian Reiniger XML problems? 38990 by: Mailing List Mailbox Re: Mail-Encryption 38991 by: Lic. Rodolfo Gonzalez Gonzalez 39006 by: Lic. Rodolfo Gonzalez Gonzalez Re: How does one build a big chat system? 38996 by: Jens Kisters Credit Cards 38998 by: Jerry Lake 38999 by: Michael Stearne 39002 by: JB anyway to make mail() function use port 25 39003 by: ewiz Re: Events in HTML with PHP 39004 by: Sitkei Pál Re: Converting CFML to PHP 39005 by: Thor M. Steindorsson 39010 by: Kevin Queen Fetching Local Weather 39008 by: JB 39009 by: Maciek Uhlig 39018 by: Anna Using PHP for CGI 39011 by: Don Re: FDF Toolkit uncompression error 39012 by: Tim Frank tfrank.registrar.uoguelph.ca Re: To The Hacker: CodeBoy 39014 by: Sefton 39045 by: Dallas Kropka PHP & SOAP? 39015 by: Chris Boothe URL Encode 39016 by: David Smith 39017 by: Boget, Chris Telnet with php? 39019 by: Brandon Orther 39025 by: Julia A . Case 39026 by: Matt Friedman 39049 by: Jeff Lacy Unexpected character in input: '\' 39020 by: CDitty 39037 by: CC Zona Class method reference 39021 by: Nathan Cassano Re: Spider script in PHP. 39022 by: Anna Perl 39023 by: Eugene Yi (InfoSpace Inc) Storing and getting variables between php functions? 39024 by: Kato Strandjord 39038 by: CC Zona Form submision probs with Javascript and PHP 39027 by: Patrick Brown 39043 by: Gobins, Debbie 39050 by: Markus Fischer Hi, new guy here! 39028 by: Brian Potter Web Design Re: mysql not reporting errors 39029 by: Anna 39042 by: Dominick Vansevenant A php-xml mailing list? 39030 by: Michael Dearman 39031 by: Matt McClanahan 39032 by: Chris Boothe 39044 by: Benjamin Munoz Connecting to MsSql2000 39033 by: Brandon Orther 39039 by: Michael Kimsal tracking the current url 39034 by: McShen 39036 by: Anna mssql70.dll 39035 by: Brandon Orther Imagecolorallocate 39040 by: Dan Harrington Unexpected character in input: '\' (ASCII=92) state=1 39041 by: Gobins, Debbie 39051 by: CDitty Re: Super SQL problem! Please advise! 39046 by: Sandeep Hundal Re: version'ng problem with php4 and apache 1.3.17 ... 39047 by: Tiger Quimpo MySQL 3.23 39048 by: Jon Rosenberg Zend Debugger problems 39052 by: Steven Holloway Asking Sth about PHP 39053 by: kn4279 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] ----------------------------------------------------------------------
We are running a webform, that asks for user ID and pass, then passes it on to a .php3 file that shows them a page to continue (not a security thing, just a tracking thing). This .php3 file, called login.php3 works just fine in IE but when viewed in netscape it simply shows a white screen. We did a "view source" and all of the php file is there, and it doesn't show any errors (HTML errors blink in the 'view source' with Netscape). Any ideas why the code below is not working right in Netscape?? ----------------------login.php3------------------------------- <HTML><BODY> <?php switch ($position) { case "process": require('logon.inc'); $query = "select userid, company, active from registration where userid='$userid' and password='$password'"; $result = mysql_query($query); $row = @mysql_fetch_array($result); //test section start //print ("Id entered by user is $userid<br>"); //print ("Id retrieved from database is"); //print $row["userid"]; //print ("<br>"); //test section end if ($row["userid"] == $userid) { if ($row["active"] =="YES") { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <table valign=top nowrap> <tr> <td> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0 ,0" ID=ptac WIDTH=393 HEIGHT=272 ALIGN=top> <PARAM NAME=movie VALUE="ptacwebsite.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="ptacwebsite.swf" quality=high bgcolor=#FFFFFF loop=false WIDTH=393 HEIGHT=272 ALIGN=top TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_ Version=ShockwaveFlash"> </EMBED> </OBJECT> </td> <td> <Center> Welcome back to the ColoradoPTAC website, <?PHP print $row['company']; ?>.<br><br> Please click <a href="registered/registered.html" target="_top">here</a> to complete the login process and begin using the site. </center> </td> </tr> <table> <?php } else { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <B> Your account has temporarily been disabled by the system administrator. If you feel this was done by mistake, please send an email to <a href="mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED]</a> to resolve the issue.<BR><BR> We apologize for any inconvenience this has caused. </B> </center> <?php } } else { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <B> Either you do not currently have a membership with us or you have entered an invalid Member ID/Password combination.<br><br> Please click <a href="register/register.htm" target="_top">here</a> to join<br><br>-OR-<br><br>Click <a href="index.htm">here</a> to try again. </B> </center> <?php } } ?> </BODY></HTML> -------------------login.php3-------------------------------------- Erik
On Fri, Feb 09, 2001 at 10:09:02AM -0700, Erik Boles wrote: > We are running a webform, that asks for user ID and pass, then passes it on > to a .php3 file that shows them a page to continue (not a security thing, > just a tracking thing). > > This .php3 file, called login.php3 works just fine in IE but when viewed in > netscape it simply shows a white screen. We did a "view source" and all of > the php file is there, and it doesn't show any errors (HTML errors blink in > the 'view source' with Netscape). > > Any ideas why the code below is not working right in Netscape?? I don't see any closing table tags. IE allows people to get away with a vast number of errors in their HTML, which is why you can see it in IE. As per the HTML spec, closing table tags are required. Good web design rule of thumb: Always check against Netscape. If it renders in Netscape, odds are it'll render in IE. The reverse is not true. Matt
Try closing your table here... or putting the new table in a <td>. Netscape is very picky with tables. complete the login process and begin using the site. </center> </td> >>>> </tr> >>>> <table> <?php } else { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <B> Your account has temporarily been disabled by the system administrator. If you -----Original Message----- From: Erik Boles [mailto:[EMAIL PROTECTED]] Sent: Friday, February 09, 2001 11:09 AM To: PHP3 List Subject: [PHP] shows up in IE but not Netscape We are running a webform, that asks for user ID and pass, then passes it on to a .php3 file that shows them a page to continue (not a security thing, just a tracking thing). This .php3 file, called login.php3 works just fine in IE but when viewed in netscape it simply shows a white screen. We did a "view source" and all of the php file is there, and it doesn't show any errors (HTML errors blink in the 'view source' with Netscape). Any ideas why the code below is not working right in Netscape?? ----------------------login.php3------------------------------- <HTML><BODY> <?php switch ($position) { case "process": require('logon.inc'); $query = "select userid, company, active from registration where userid='$userid' and password='$password'"; $result = mysql_query($query); $row = @mysql_fetch_array($result); //test section start //print ("Id entered by user is $userid<br>"); //print ("Id retrieved from database is"); //print $row["userid"]; //print ("<br>"); //test section end if ($row["userid"] == $userid) { if ($row["active"] =="YES") { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <table valign=top nowrap> <tr> <td> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0 ,0" ID=ptac WIDTH=393 HEIGHT=272 ALIGN=top> <PARAM NAME=movie VALUE="ptacwebsite.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="ptacwebsite.swf" quality=high bgcolor=#FFFFFF loop=false WIDTH=393 HEIGHT=272 ALIGN=top TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_ Version=ShockwaveFlash"> </EMBED> </OBJECT> </td> <td> <Center> Welcome back to the ColoradoPTAC website, <?PHP print $row['company']; ?>.<br><br> Please click <a href="registered/registered.html" target="_top">here</a> to complete the login process and begin using the site. </center> </td> </tr> <table> <?php } else { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <B> Your account has temporarily been disabled by the system administrator. If you feel this was done by mistake, please send an email to <a href="mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED]</a> to resolve the issue.<BR><BR> We apologize for any inconvenience this has caused. </B> </center> <?php } } else { ?> <html><head></head><body bgcolor="#FFFFFF"> <center> <B> Either you do not currently have a membership with us or you have entered an invalid Member ID/Password combination.<br><br> Please click <a href="register/register.htm" target="_top">here</a> to join<br><br>-OR-<br><br>Click <a href="index.htm">here</a> to try again. </B> </center> <?php } } ?> </BODY></HTML> -------------------login.php3-------------------------------------- Erik -- 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]
Sounds like you may be missing a piece of a table. Make sure all your table, tr, td type tags have a closing tag. IE is more forgiving... -- Jesse Swensen [EMAIL PROTECTED] > From: "Erik Boles" <[EMAIL PROTECTED]> > Organization: rocky Mountain Web Tech > Reply-To: "Erik Boles" <[EMAIL PROTECTED]> > Date: Fri, 9 Feb 2001 10:09:02 -0700 > To: "PHP3 List" <[EMAIL PROTECTED]> > Subject: [PHP] shows up in IE but not Netscape > > We are running a webform, that asks for user ID and pass, then passes it on > to a .php3 file that shows them a page to continue (not a security thing, > just a tracking thing). > > This .php3 file, called login.php3 works just fine in IE but when viewed in > netscape it simply shows a white screen. We did a "view source" and all of > the php file is there, and it doesn't show any errors (HTML errors blink in > the 'view source' with Netscape). > > Any ideas why the code below is not working right in Netscape?? > > ----------------------login.php3------------------------------- > > <HTML><BODY> > > <?php > switch ($position) > { > case "process": > require('logon.inc'); > $query = "select userid, company, active from registration where > userid='$userid' and password='$password'"; > $result = mysql_query($query); > $row = @mysql_fetch_array($result); > > //test section start > > //print ("Id entered by user is $userid<br>"); > //print ("Id retrieved from database is"); > //print $row["userid"]; > //print ("<br>"); > > //test section end > > if ($row["userid"] == $userid) > { > if ($row["active"] =="YES") > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <table valign=top nowrap> > <tr> > <td> > > > <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > > codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0 > ,0" > ID=ptac WIDTH=393 HEIGHT=272 ALIGN=top> > <PARAM NAME=movie VALUE="ptacwebsite.swf"> > <PARAM NAME=loop VALUE=false> > <PARAM NAME=quality VALUE=high> > <PARAM NAME=bgcolor VALUE=#FFFFFF> > <EMBED src="ptacwebsite.swf" quality=high bgcolor=#FFFFFF > loop=false > WIDTH=393 HEIGHT=272 ALIGN=top TYPE="application/x-shockwave-flash" > > PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_ > Version=ShockwaveFlash"> > </EMBED> > </OBJECT> > </td> > > <td> > <Center> > Welcome back to the ColoradoPTAC website, <?PHP print > $row['company']; ?>.<br><br> > Please click <a href="registered/registered.html" > target="_top">here</a> to > complete the login process and begin using the site. > </center> > </td> > </tr> > <table> > <?php > } > else > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <B> > Your account has temporarily been disabled by the system > administrator. If you > feel this was done by mistake, please send an email to > <a href="mailto:[EMAIL PROTECTED]"> > [EMAIL PROTECTED]</a> > to resolve the issue.<BR><BR> > We apologize for any inconvenience this has caused. > </B> > </center> > <?php > } > } > else > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <B> > Either you do not currently have a membership with us or you have entered > an invalid Member ID/Password combination.<br><br> > Please click <a href="register/register.htm" target="_top">here</a> to > join<br><br>-OR-<br><br>Click <a href="index.htm">here</a> to try again. > </B> > </center> > <?php > } > } > ?> > </BODY></HTML> > > -------------------login.php3-------------------------------------- > > > > > > Erik > > > -- > 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] > >
>>>>> "EB" == "Erik Boles" <[EMAIL PROTECTED]> writes: > We are running a webform, that asks for user ID and pass, then > passes it on to a .php3 file that shows them a page to continue > (not a security thing, just a tracking thing). > This .php3 file, called login.php3 works just fine in IE but when > viewed in netscape it simply shows a white screen. We did a "view > source" and all of the php file is there, and it doesn't show any > errors (HTML errors blink in the 'view source' with Netscape). > Any ideas why the code below is not working right in Netscape?? Mainly because your closing 'table' tag is missing its slash. The duplicated 'head' and 'body' tags probably aren't helping either. -robin -- Robin Vickery................................................. BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
> </EMBED> > </OBJECT> > </td> > > <td> No </tr> > <Center> > Welcome back to the ColoradoPTAC website, <?PHP print > $row['company']; ?>.<br><br> > Please click <a href="registered/registered.html" > target="_top">here</a> to > complete the login process and begin using the site. > </center> > </td> > </tr> > <table> > <?php should be </table> HTH M@
Also : Whenever this problem exists, run your site through here : http://validator.w3.org/ Actually, always run sites through there, it's useful (sometimes a bit picky.) For things like missing table tags, it's very helpful. Regards, Philip
> Good web design rule of thumb: Always check against Netscape. If it > renders in Netscape, odds are it'll render in IE. The reverse is not > true. > > Matt I find dealing with Netscape browsers a pain. So many people complain that IE doesn't follow the standards, but I find it the other way around. Especially when it comes to Stylesheets, even using CSS Level 1, which is like 5 years old. Netscape just plain ignores alot of attributes, or handles them different from the spec, that it makes it such a pain getting a page to look the same in both. Arg /Rant off - John Vanderbeck - Admin, GameDesign > > -- > 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] > >
In article <Pine.BSF.4.10.10102091810160.57269-100000@localhost>, Philip Olson <[EMAIL PROTECTED]> writes >Whenever this problem exists, run your site through here : > > http://validator.w3.org/ > >Actually, always run sites through there, it's useful (sometimes a bit >picky.) For things like missing table tags, it's very helpful. Better still, download the 'tidy' utility from the same site - or even better, use a free editor like HTML-Kit (www.chami.com) that embeds 'tidy' John
I use HTML-Kit, it's a good solid editor and there are bunches of plugins for it (PHP, ASP, PERL, etc) and it's freeware to boot. http://www.chami.com/html-kit/ Charles Mulford Developer- McLeodUSA -----Original Message----- From: Dennis von Ferenczy [mailto:[EMAIL PROTECTED]] Sent: Friday, February 09, 2001 7:08 AM To: Php-General Subject: [PHP] good free/cheap IDE for PHP can anybody please tell me which good IDEs are theee, that are optimized for PHP? It acztually doesn't need to do much more, than just code highlighting and line numbering for me purposes, althoug i would of course appreciate additionla features. thx 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]
What does IDE stand for? Thanks for HTML-Kit, I'll try it out. As an alternative to the resource hogging HomeSite (which has color coding for PHP) I also use ConTEXT (for Windows). http://www.fixedsys.com/context/ Jeff Oien > > I use HTML-Kit, it's a good solid editor and there are bunches of plugins > for it (PHP, ASP, PERL, etc) > and it's freeware to boot. > > http://www.chami.com/html-kit/ > > Charles Mulford > Developer- McLeodUSA > > > can anybody please tell me which good IDEs are theee, that are optimized for > PHP? > It acztually doesn't need to do much more, than just code highlighting and > line numbering for me purposes, althoug i would of course appreciate > additionla features. > thx in advance >
Integrated Development Environment (I believe) -----Original Message----- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Friday, February 09, 2001 12:04 PM To: Php-General Subject: RE: [PHP] good free/cheap IDE for PHP What does IDE stand for? Thanks for HTML-Kit, I'll try it out. As an alternative to the resource hogging HomeSite (which has color coding for PHP) I also use ConTEXT (for Windows). http://www.fixedsys.com/context/ Jeff Oien > > I use HTML-Kit, it's a good solid editor and there are bunches of plugins > for it (PHP, ASP, PERL, etc) > and it's freeware to boot. > > http://www.chami.com/html-kit/ > > Charles Mulford > Developer- McLeodUSA > > > can anybody please tell me which good IDEs are theee, that are optimized for > PHP? > It acztually doesn't need to do much more, than just code highlighting and > line numbering for me purposes, althoug i would of course appreciate > additionla features. > thx 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]
On Friday 09 February 2001 19:04, Jeff Oien wrote: > What does IDE stand for? Integrated Development Environment -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds. - http://www.google.com/search?q=e
I have a memo field in an Interbase DB and I am not sure how to display it. The line below produces garbage. print($row->STM_MEMO_TOP); Thanks for the help........ Todd -- Todd Cary Ariste Software [EMAIL PROTECTED]
Maxim Maletsky wrote: > Anyway, "<?php" , "<?" are quite same too, except that php3 used to have > "<?php" while older versions use mainly "<?", this is just about > compatibility. I believe <?php is needed if you want your scripts to be valid XML. Ben
I`m writing one html class for my own usage, but I`ve got some problems. Take a look at the example: $ht -> row(2,'','first,second'); This works fine ('first,second' represents an array). But now, when I want to do something like that: $ht -> row(2,'','$something,second'); then it displays $something and second, but I don´t want $something, rather the value of it. When I write just $ht -> row(1,'',$something); it works as expected. Note: Don`t ask about the other atributes, they are not important. How could I get it to work? If I do something like this: $ht -> row(2,'','".$something.",second'); Then still, it echos me ".$something." and second, but not the $somethings value (and the second). I hope you understand what I need. Thanks in advance, Siim Einfeldt PS: Give a copy to my personal email as well.
On Friday 09 February 2001 19:15, Siim Einfeldt aka Itpunk wrote: > row(2,'','$something,second'); then it displays $something and second, In single quotes (') variables are not evaluated. Use double quotes (") instead. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds. - http://www.google.com/search?q=e
> I`m writing one html class for my own usage, but I`ve got some > problems. Take a look at the example: $ht -> > row(2,'','first,second'); This works fine ('first,second' represents an > array). But now, when I want to do something like that: $ht -> > row(2,'','$something,second'); then it displays $something and second, but > I don´t want $something, rather the value of it. When I write just $ht -> > row(1,'',$something); it works as expected. > > Note: Don`t ask about the other atributes, they are not important. How > could I get it to work? If I do something like this: $ht -> > row(2,'','".$something.",second'); Then still, it echos me > ".$something." and second, but not the $somethings value (and the second). Use " not ' James
And if you can't seperate the root directorys of the secure and not secure servers, you can setup and aliases directory under the secure server and it will be the only one that can see that dir. > On Fri, 9 Feb 2001, Daniel Tryba wrote: > > >On Thu, Feb 01, 2001 at 04:29:09PM -0800, Michael Conley wrote: > >> I have several PHP files that I only want users to be able to access via > >> HTTPS. How can I control that on an Apache 1.3.14 server running on RedHat > >> 7? I have openssl and mod_ssl working fine. Currently, I can access all of > >> the files on my site via either http or https. I want to keep certain files > >> (with interesting information) from being accessed via http. I realize this > >> isn't really a PHP question, but I have no idea how to do this. > > > >You could check on which port the request was made for the php file. > >https is usually port 443 > > > >if ($SERVER_PORT!=443) > > header("Location: https://server/$PHP_SELF"); > > While that will usually (99.9% of the time) work, this is closer to 100%: > if(preg_match("!/^https/i", REQUEST_URL)) { > ... > } > > But the other answer about seperating the server root of the SSL server and > standard server is really, truely, a 100%-of-the-time solution since the files > cannot be accessed any other way, and it doesn't require every page to be > parsed by PHP, so you can isolate PDF, plain text, and graphic files as well > as HTML. > > -- > ____________________________________________________________________________ > Adam Knight <[EMAIL PROTECTED]> > AIM: AdamKnight ICQ: 3848971 > ______________________________Codito, ergo sum______________________________ > I'm not expendable, I'm not stupid, and I'm not going. > > > -- > 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]
Hi! Does anyone know of some good examples of sessions? -- Evelio Martínez
this is as simple and complex as it gets. session_start; session_register("my_var"); now say we do: $my_var = 5; any script, page, whatever you serve that calls $my_var will return 5. Once you change the variable, $my_var will now be that new value in every bit of code. All you have to do is call session_start; on every script that will use your session variable. ONLY call session_register() ONCE for each of your variables. If you call it once on one script and the variable it set to 5. And then you register is again it will lose the value and will be reset. So, usually you test for it in an include (which contains you session_start;). if (!isset($my_var)) session_register("my_var"); Easy cheesey. ----- Original Message ----- From: Evelio Martinez <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 09, 2001 10:57 AM Subject: [PHP] HOWTO handle sessions ? > > Hi! > Does anyone know of some good examples of sessions? > > > -- > Evelio Martínez > > > -- > 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] > >
Hi Evelio, This may be a good start : Sessions in Manual : -------------------------------------------------- http://www.php.net/manual/ref.session.php Title: Session Handling with PHP 4 : -------------------------------------------------- http://zend.com/zend/tut/session.php Title: Couch Sessions : -------------------------------------------------- http://www.devshed.com/Server_Side/PHP/Sessions/ Regards, Philip Olson http://www.cornado.com/ On Fri, 9 Feb 2001, Evelio Martinez wrote: > > Hi! > Does anyone know of some good examples of sessions? > > > -- > Evelio Martínez > > > -- > 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] >
HI, Pick up a copy of the "PHP Developer's Cookbook". They devoted a whole chapter to sessions. Regards, Rob Root Evelio Martinez wrote: > Hi! > Does anyone know of some good examples of sessions? > > -- > Evelio Martínez > > -- > 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]
I just wanted to try this: I take a link : http//www.xy.com/index.php?contents=HOME There I echo contents <?php echo $contents?> <div align="center"><?php echo $contents; ?></div> It should display HOME? But it does not ! -----Original Message----- From: Brian V Bonini [mailto:[EMAIL PROTECTED]] Sent: donderdag 8 februari 2001 23:55 To: Steve Haemelinck Subject: RE: [PHP] [Newbie] PHP Variables you can, what's the rest of your script look like. > -----Original Message----- > From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 08, 2001 3:49 PM > To: PHP Mailing Listl (E-mail) > Subject: [PHP] [Newbie] PHP Variables > > > I thought you can pass variables in PHP as in CGI. > > http://www.xy.com/index.php?contents=HOME > > contents should be available as variable, but it does not seem to > work. Doe > anyone has an idea why not? > > > -- > 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] > >
Nothing at all Go tho following page a see for yourself http://213.224.136.110:8080/test.php?a=HOME -----Original Message----- From: Dustin Vannatter [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 februari 2001 20:23 To: 'Steve Haemelinck' Subject: RE: [PHP] [Newbie] PHP Variables Importance: High what does it echo? > -----Original Message----- > From: Steve Haemelinck [ mailto:[EMAIL PROTECTED]] > Sent: Friday, February 09, 2001 2:07 PM > To: [EMAIL PROTECTED] > Cc: PHP Mailing Listl (E-mail) > Subject: RE: [PHP] [Newbie] PHP Variables > > > I just wanted to try this: > > I take a link : http//www.xy.com/index.php?contents=HOME > > There I echo contents > > <?php echo $contents?> > <div align="center"><?php echo $contents; ?></div> > > It should display HOME? But it does not ! > > > -----Original Message----- > From: Brian V Bonini [ mailto:[EMAIL PROTECTED]] > Sent: donderdag 8 februari 2001 23:55 > To: Steve Haemelinck > Subject: RE: [PHP] [Newbie] PHP Variables > > you can, what's the rest of your script look like. > > > -----Original Message----- > > From: Steve Haemelinck [ mailto:[EMAIL PROTECTED]] > > Sent: Thursday, February 08, 2001 3:49 PM > > To: PHP Mailing Listl (E-mail) > > Subject: [PHP] [Newbie] PHP Variables > > > > > > I thought you can pass variables in PHP as in CGI. > > > > http://www.xy.com/index.php?contents=HOME > > > > contents should be available as variable, but it does not seem to > > work. Doe > > anyone has an idea why not? > > > > > > -- > > 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] >
At 8:06 PM +0100 2/9/01, Steve Haemelinck wrote: >I just wanted to try this: > >I take a link : http//www.xy.com/index.php?contents=HOME > >There I echo contents > ><?php echo $contents?> ><div align="center"><?php echo $contents; ?></div> > >It should display HOME? But it does not ! Two possibilities I can think of: (1) Is your echo statement above within a function? If so, you have to globalize it, or pass it as a function parameter: function zaphod($beeblebrox) { return '<div align="center">'. $beeblebrox. '</div>'; } echo zaphod($contents); or function zaphod() { global $contents; return '<div align="center">'. $contents. '</div>'; } echo zaphod(); See http://www.php.net/manual/en/language.variables.scope.php for more info. (2) The register_globals parameter is not set. This must be on if you want GET/POST/COOKIE etc. parameters to be automagically converted to variables. This can be set in php.ini, .htaccess, or httpd.conf, and can also be programmatically set and checked via ini_set() and ini_get(), respectively. If this is NOT set, you'll have to refer to your GET parameter as $HTTP_GET_VARS['contents'] See http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/language.variables.external.php http://www.php.net/manual/en/function.ini-set.php http://www.php.net/manual/en/function.ini-get.php for more info. - steve > > -----Original Message----- >From: Brian V Bonini [mailto:[EMAIL PROTECTED]] >Sent: donderdag 8 februari 2001 23:55 >To: Steve Haemelinck >Subject: RE: [PHP] [Newbie] PHP Variables > >you can, what's the rest of your script look like. > >> -----Original Message----- >> From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, February 08, 2001 3:49 PM >> To: PHP Mailing Listl (E-mail) >> Subject: [PHP] [Newbie] PHP Variables >> >> >> I thought you can pass variables in PHP as in CGI. >> >> http://www.xy.com/index.php?contents=HOME >> >> contents should be available as variable, but it does not seem to >> work. Doe > > anyone has an idea why not? >> -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+
> I just wanted to try this: > > I take a link : http//www.xy.com/index.php?contents=HOME > > There I echo contents > > <?php echo $contents?> > <div align="center"><?php echo $contents; ?></div> I'm still learning PHP, but... Why are you echoing it twice? Also, the first line, shouldn't it be: <?php echo $contents; ?> Looks liek you dropped the semi colon - John Vanderbeck - Admin, GameDesign > > It should display HOME? But it does not ! > > > -----Original Message----- > From: Brian V Bonini [mailto:[EMAIL PROTECTED]] > Sent: donderdag 8 februari 2001 23:55 > To: Steve Haemelinck > Subject: RE: [PHP] [Newbie] PHP Variables > > you can, what's the rest of your script look like. > > > -----Original Message----- > > From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, February 08, 2001 3:49 PM > > To: PHP Mailing Listl (E-mail) > > Subject: [PHP] [Newbie] PHP Variables > > > > > > I thought you can pass variables in PHP as in CGI. > > > > http://www.xy.com/index.php?contents=HOME > > > > contents should be available as variable, but it does not seem to > > work. Doe > > anyone has an idea why not? > > > > > > -- > > 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] > >
Thx, I forgot to set the register_globals to On !!! -----Original Message----- From: Steve Edberg [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 februari 2001 20:41 To: Steve Haemelinck Cc: PHP Mailing Listl (E-mail) Subject: RE: [PHP] [Newbie] PHP Variables At 8:06 PM +0100 2/9/01, Steve Haemelinck wrote: >I just wanted to try this: > >I take a link : http//www.xy.com/index.php?contents=HOME > >There I echo contents > ><?php echo $contents?> ><div align="center"><?php echo $contents; ?></div> > >It should display HOME? But it does not ! Two possibilities I can think of: (1) Is your echo statement above within a function? If so, you have to globalize it, or pass it as a function parameter: function zaphod($beeblebrox) { return '<div align="center">'. $beeblebrox. '</div>'; } echo zaphod($contents); or function zaphod() { global $contents; return '<div align="center">'. $contents. '</div>'; } echo zaphod(); See http://www.php.net/manual/en/language.variables.scope.php for more info. (2) The register_globals parameter is not set. This must be on if you want GET/POST/COOKIE etc. parameters to be automagically converted to variables. This can be set in php.ini, .htaccess, or httpd.conf, and can also be programmatically set and checked via ini_set() and ini_get(), respectively. If this is NOT set, you'll have to refer to your GET parameter as $HTTP_GET_VARS['contents'] See http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/language.variables.external.php http://www.php.net/manual/en/function.ini-set.php http://www.php.net/manual/en/function.ini-get.php for more info. - steve > > -----Original Message----- >From: Brian V Bonini [mailto:[EMAIL PROTECTED]] >Sent: donderdag 8 februari 2001 23:55 >To: Steve Haemelinck >Subject: RE: [PHP] [Newbie] PHP Variables > >you can, what's the rest of your script look like. > >> -----Original Message----- >> From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, February 08, 2001 3:49 PM >> To: PHP Mailing Listl (E-mail) >> Subject: [PHP] [Newbie] PHP Variables >> >> >> I thought you can pass variables in PHP as in CGI. >> >> http://www.xy.com/index.php?contents=HOME >> >> contents should be available as variable, but it does not seem to >> work. Doe > > anyone has an idea why not? >> -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+
On Friday 09 February 2001 20:39, John Vanderbeck wrote: > Why are you echoing it twice? Also, the first line, shouldn't it be: > <?php echo $contents; ?> > > Looks liek you dropped the semi colon The semicolon is optional if a closing PHP tag ("?>") follows. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds. - http://www.google.com/search?q=e
I've put together a fairly simple XML parser that outputs embeded objects as a DOM. You can see that the XML files get parsed correctly (print "Open: $tag" etc for the proper functions..) and built the DOM correctly (print_r ( $this->dom ) at the last close_tag () call) but even after displaying the variable that holds the dom it for some reason resets that variable to the previous value ( example set $this->dom = 'goatpoo' ) as soon as it leaves that function although the other variables accessed all keep their proper values.. this happens even if i change the name of the dom variable. i checked and no where i can see does it rewrite that variable. i am using an object for the parsing xml_object() or whatever it's called sets it.. i was wondering if there might be a bug in PHP or am I just doing something wrong? I can supply my source if you like. Thanks.
On Thu, 8 Feb 2001, Richard Lynch wrote: > Maybe you can create a custome keyring for just the web-usage of public keys > only... Hum... I wouldn't like it, anyway. Hmmm, is there any other way to pass "stdin" to an external program, other than using echo and a pipe?. I've also tried by placing echo and gpg in the php "exec dir" and chown'ing them to the uid.gid of the php script, and it didn't work. Thanks.
On Fri, 9 Feb 2001, Christian Reiniger wrote: > > This returns echoes the part after the | in safe-mode. > echo only outputs something. it doesn't return anything. Yup, grammar error, I meant "prints to stdout" :) > Write > $comm = "$data | " . $this->gpg_command; Didn't work that way :( > and: > $this->gpg-kommand is an illegal (no minus in identifiers!) Certainly, my typo in the post :) Thank you. Rodolfo.
> Grab one of the many java IRC applets from http://freshmeat.net and run > an irc server on your box. http wasn't designed for this type of thing. I've seen a lot of Chatsites that run without Clientside Java, it can't be such a weird approach, I don't think the admins of the System the chat is going to be run on would like an irc server on their machines. -- Grüße aus dem schönen Kleve Jens Kisters +++++++ neue Anschrift +++++++ rosomm et partner Agentur für neue Medien GmbH Dienstleistungszentrum am Weißen Tor - Eingang B Gocher Landstrasse 2 47551 Kleve / Bedburg-Hau Telefon: 02821 - 97856-20 Telefax: 02821 - 97856-77 [EMAIL PROTECTED] www.rosomm-partner.de
I have a basic shopping cart setup and I am curious as to how I go about being able to handle real-time credit card transactions. I realize there are card services like cybercash and such, but how do I go about hooking cybercash up to the existing cart? (the host already has a merchant connection kit) Jerry Lake - [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com
Read the Verisign (Under the Ps) or Cybercash section of the PHP manual. Michael Jerry Lake wrote: > I have a basic shopping cart setup > and I am curious as to how I go about > being able to handle real-time credit > card transactions. I realize there are > card services like cybercash and such, > but how do I go about hooking cybercash > up to the existing cart? (the host already > has a merchant connection kit) > > Jerry Lake - [EMAIL PROTECTED] > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.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]
on standard transaction servers where you post a string containing the transaction info (card, name, amount, login, password, etc) do the following: get a merchant account sign up for authorize.net, ccnow, ibill, etc. use an application called cURL to post the info to the server from php. dump the returned message into any array. look at the array and dependent on what is returned, either mark the purchase as successful, forward them to a thank you page, update the db, whatever and ship it. otherwise forward to a page that says what went wrong. this is a concise overview, as writing the actual code is beyond the scope of this thread, especially considering you did not post the actual code it will work with. if you're hacking code from another app, you may just want to consider writing a cart form scratch. it ain't hard. if you're decent with php, any cart you write will be better than any pre-existing one. because you can code it to fit your needs to a TEE. ----- Original Message ----- From: Jerry Lake <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 09, 2001 11:47 AM Subject: [PHP] Credit Cards > I have a basic shopping cart setup > and I am curious as to how I go about > being able to handle real-time credit > card transactions. I realize there are > card services like cybercash and such, > but how do I go about hooking cybercash > up to the existing cart? (the host already > has a merchant connection kit) > > Jerry Lake - [EMAIL PROTECTED] > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.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] > >
anyway to make mail() function to use port 25 on a defined SMTP host instead of the raw/direct spooling as by default as it uses sendmail on local system, what happens when SMTP server is a different box alltogether ? tia ewiz
for example: echo('<SCRIPT language="JavaScript"> function Done() {alert("Changed!")}</SCRIPT>') echo('<select name="myname" size="1" onchange="javascript:Done()">') -----Original Message----- From: Foley, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 6:41 PM To: 'Francesco Rossi'; [EMAIL PROTECTED] Subject: [PHP] RE: Events in HTML with PHP Javascript to call another page (or at least URL) that is a php file . . . I have JavaScript OnChange examples, if you need it. > -----Original Message----- > From: Francesco Rossi [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, February 08, 2001 5:17 AM > To: [EMAIL PROTECTED] > Subject: Events in HTML with PHP > > Hi, > How i can use the event OnChange of a tag <Select> for run a php script ? > Es. <select name="myname" size="1" onchange="HOW?"> > Thank. > >
I've done this. Once I did everything in CF. Today, I do everything in PHP and have not looked back. PHP is faster, easier and far less taxing on the server than CF. Basically, once you know the syntax and functions of PHP, converting is pretty easy, although time consuming. What you need to do is create the same functionality in PHP, then you take whatever HTML you had in the CFM files, and use that either as an include file or you can include it directly in the PHP. Just remember to change all those #variables# to $variables. As long as you keep the same names, porting the sites is not that hard. Although I feel for you since you have 500 pages to do. Unfortunately I don't know of any utility that can do this automatically; perhaps it's time we who know both languages make one... -----Original Message----- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 6:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Converting CFML to PHP I didn't see the original post before, but this is interesting. It's not often we hear of people switching FROM CF to PHP. It must happen, but I can't think of too many companies that I know using CF who would "throw away" that investment, so to speak. Kevin, could you shed some light on why the change is being made? Was it financial? Or something deeper than that? Dean Hall wrote: > Seeing as how CFML is just more markup and PHP is an embedded language, your > task will be interesting. IMHO, CFML is the worst thing out; it's not a real > scripting language, and it blurs the distinction between markup and logic. > > Sorry I couldn't help. (Just wanted to voice my opinion -- no flamebait > intended.) > > Dean. > > ""Kevin Queen"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > List, > > I have been given the task of converting all of our current ColdFusion > pages > > to PHP, I am wondering if there is some kind of converting tool out there > > for this. I don't need 100% accuracy as I can/will fix any errors, I am > > just looking for the easiest way to convert 500+ files. > > > > TIA, > > > > Kevin Queen ____ > > Software Developer ||""|| > > AnyDevice ||__|| > > Atlanta, Ga [ -=.] > > http://www.anydevice.com =======:0~ > > > > (w) (404)260.4155 > > (p) (888)645.2815 > > (e) [EMAIL PROTECTED] > > > > "Ah, I see!", said the blind man to the deaf mute. -Unknown > > > > > > -- > > 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]
The push for a change from CF to PHP was not a monetary consideration but the ways that PHP and CF differ. For example, while not an 'officially' supported product (meaning there is no 800 number to call and have your hand held) it is MUCH easier to get help from a mailing list (such as this one) than it is to get an answer from Allaire. Also, either it was our configuration (doubtful) or CF but it does not seem to be very stable on *NIX platforms which is all that our servers run. PHP is also more powerful with the ability to do more in the way of functions without having to worry about writing custom tags and then worry about somebody using them in a malicious manner, you simply write a function and then user server side security to lock it down in a directory that is unreachable by the public. There were more reasons, but most of these were personal. <back on topic> I have been trying to think of a way to use XSLT to transform CFML in to PHP, but since HTML and CFML are not necessarily valid XML I am not to sure if this would work. It would seem to me though that if you could write an XSLT template for each CFML tag then you could do this relatively easily. If anybody has any ideas as how to make XSLT ignore the fact that every HTML tag does not necessarily have a closing tag I would be happy to _try_ to write an XSLT stylesheet. -----Original Message----- From: Thor M. Steindorsson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 09, 2001 3:22 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Converting CFML to PHP I've done this. Once I did everything in CF. Today, I do everything in PHP and have not looked back. PHP is faster, easier and far less taxing on the server than CF. Basically, once you know the syntax and functions of PHP, converting is pretty easy, although time consuming. What you need to do is create the same functionality in PHP, then you take whatever HTML you had in the CFM files, and use that either as an include file or you can include it directly in the PHP. Just remember to change all those #variables# to $variables. As long as you keep the same names, porting the sites is not that hard. Although I feel for you since you have 500 pages to do. Unfortunately I don't know of any utility that can do this automatically; perhaps it's time we who know both languages make one... -----Original Message----- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 6:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Converting CFML to PHP I didn't see the original post before, but this is interesting. It's not often we hear of people switching FROM CF to PHP. It must happen, but I can't think of too many companies that I know using CF who would "throw away" that investment, so to speak. Kevin, could you shed some light on why the change is being made? Was it financial? Or something deeper than that? Dean Hall wrote: > Seeing as how CFML is just more markup and PHP is an embedded language, your > task will be interesting. IMHO, CFML is the worst thing out; it's not a real > scripting language, and it blurs the distinction between markup and logic. > > Sorry I couldn't help. (Just wanted to voice my opinion -- no flamebait > intended.) > > Dean. > > ""Kevin Queen"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > List, > > I have been given the task of converting all of our current ColdFusion > pages > > to PHP, I am wondering if there is some kind of converting tool out there > > for this. I don't need 100% accuracy as I can/will fix any errors, I am > > just looking for the easiest way to convert 500+ files. > > > > TIA, > > > > Kevin Queen ____ > > Software Developer ||""|| > > AnyDevice ||__|| > > Atlanta, Ga [ -=.] > > http://www.anydevice.com =======:0~ > > > > (w) (404)260.4155 > > (p) (888)645.2815 > > (e) [EMAIL PROTECTED] > > > > "Ah, I see!", said the blind man to the deaf mute. -Unknown > > > > > > -- > > 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]
Hey Coders, I know there's a couple premade scripts to grab weather on hotscripts.com. I wanted to know if anyone has a simple method to fetch the day's local weather from something like yahoo. All I really need is the temperature, condition (rainy, sunny)and maybe windspeed. If I could include the icon for the condition that would be good too. Anyone have a simple solution for this that I can dump into my code? Thanks.
try http://www.gimpster.com/php/phpweather/index.php it's not simple solution though... Maciek > -----Original Message----- > From: JB [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 09, 2001 10:50 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Fetching Local Weather > > > Hey Coders, > > I know there's a couple premade scripts to grab weather on > hotscripts.com. I wanted to know if anyone has a simple method to > fetch the day's local weather from something like yahoo. All I > really need is the temperature, condition (rainy, sunny)and maybe > windspeed. If I could include the icon for the condition that > would be good too. Anyone have a simple solution for this that I > can dump into my code? > > Thanks. >
----- Original Message ----- >From: "JB" <[EMAIL PROTECTED]> >Hey Coders, >I know there's a couple premade scripts to grab weather on hotscripts.com. I wanted to know if anyone has a simple method to fetch the day's local weather from something like yahoo. All I really need is the temperature, condition (rainy, sunny)and maybe windspeed. If I could include the icon for the condition that would be good too. Anyone have a simple solution for this that I can dump into my code? >Thanks. Using combinations of: $string=implode(file("http address"), ""); $array=explode("<some starter tag>", $string); $array=explode("<some end tag>", $array[1]); $endString=$array[0]; With the odd ereg_replace() to tweak the data you can grab info from wherever you want. However, you should get permission from the site, since this would count as a hit/page view on their site. Anna
Hello, I'm interested in a comparison study for using PHP vs. Perl for CGI programming. Specifically, I'm looking for information comparing the two in terms of speed, memory usage and efficiency. Any information or url's would be appreciated. Thanks, Don
Kurt, I fought with this same problem for about an hour today. For me there was something changed when the file was downloaded that made it corrupt... I think it was a LF to a CR + LF or something. I tried Dling the file with Lynx on a linux machine and it was still corrupt. My fix was to DL the file on a windows machine and then FTP the file to my unix box in ASCII mode (NOT BINARY). I don't know why or what was causing the problem, but that is how I fixed it. Now I'm trying to install it ;) Hope that helps Tim Frank >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 05/02/01, 8:10:18 AM, [EMAIL PROTECTED] ("Kurt R. Hoehn") wrote regarding [PHP] FDF Toolkit uncompression error: > Hello, > I've downloaded the FDF toolkit from adobe (fdftk4_05_C.tar.Z) and it > doesn't uncompress. I've noticed that other people are using it. Has > anyone else experianced this same problem and if so what was your work > around. > Thank You > Kurt > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
What does that do? ""Jonathan Sharp"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : P.S. in your phpMyAdmin config.inc.php file line 13 set: : $cfgServers[1]['adv_auth'] = true; : then you won't have any problems... : : -codeboy : : > -----Original Message----- : > From: rswfire [mailto:[EMAIL PROTECTED]] : > Sent: Thursday, February 08, 2001 3:20 PM : > To: [EMAIL PROTECTED] : > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] : > Subject: RE: [PHP] To The Hacker: CodeBoy : > : > : > Whatever, James. : > : > The hackers name is Jonathan Sharp. He is a : > regular member of this mailing list. I do : > believe that people here would like to know they : > have a hacker on their hands, don't you think? : > It would appear the friendly Jonathan has another : > side to himself... : > : > Codeboy: : > Jonathan Sharp : > Director of Technology - Imprev Inc. : > Renwick Development Group - Flyerware : > [EMAIL PROTECTED] : > : > : > : > --- James Moore <[EMAIL PROTECTED]> wrote: : > > : > > > : > > > Today I noticed an entry in my database with : > > the : > > > username "codeboy" and the password "hacked" : > > in : > > > one of the authorization tables I have : > > created. : > > > I am shocked that someone could be so : > > malicious : > > > and insensitive! I am programming locally; I : > > > realize there may be some security : > > > vulnerabilities during this time, but when I : > > go : > > > live with my network this will not be the : > > case. : > > > If any further attempts are made to hack into : > > my : > > > system I will clearly take the time to : > > retaliate : > > > against you. Let this be your only warning. : > > > : > > : > > This is not the place to take these issues up. : > > Please email privatly and : > > complain to the appropriate authrities, the : > > PHP-General list is not the : > > place for this. : > > : > > James : > > -- : > > James Moore : > > PHP QA Team : > > [EMAIL PROTECTED] : > > : > : > : > ===== : > ===================================== : > [ rswfire ] : > : > http://rswfire.swifte.net/ : > http://profiles.yahoo.com/rswfire : > : > ===================================== : > : > __________________________________________________ : > Do You Yahoo!? : > Get personalized email addresses from Yahoo! Mail - only $35 : > a year! 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] :
LOLOL Ya know, I get half of my business this way... they think they don't want me to fix there site... until I send them their database dump and passwords retrieved from invalid form checks or unsecured image directories... Jonathan actually did this guy a favor, an embarrassing favor, but it wouldn't have been if he had gone the right path with his complaint. Wait, isn't that 2 lessons? -----Original Message----- From: Jonathan Sharp [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 7:15 PM To: Philip Olson; James, Yz Cc: [EMAIL PROTECTED] Subject: RE: [PHP] To The Hacker: CodeBoy Ok, I just checked my mail and found this thread... to clear this up... In one of your posts you posed a url to a script you were working on...and I backed up a directory and it gave me a directory listing...one folder was /admin/ it gave another listing...then showed phpMyAdmin and then it gave your full db schema...no passwords or anything...i was able to insert a record...and a user to your mysql server... password is (abc123) that's all i did...nothing else...and i'd hardly consider that a hack...more of a "browse" Cheers, -Jonathan aka: "Codeboy the *dangerous* hacker" > -----Original Message----- > From: Philip Olson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 08, 2001 4:24 PM > To: James, Yz > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] To The Hacker: CodeBoy > > > > True, but none of which are applicable to me, as I've not > slandered, defamed > > or spoofed anything or anyone. As far as hacking is concerned, > I wouldn't > > know my arse from my elbow :) > > just a fyi, my post had nothing to do with you. or the other james (which > that line you're referring too had to do with) but rather, that of the > person in question ("hacker"). but anyway, let's let this thread die. > it's time. > > Philip > > > -- > 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]
Hi, I have been looking for a PHP implementation of SOAP. I have noticed PHP SOAP on sourceforge but it seems that it is still in early stages. Could someone lead me in the right direction? Thanks, Chris Boothe [EMAIL PROTECTED]
I know this have been covered before but I can't find it in my thousands of emails... How would I URL Encode the following... I am retrieving a variable like <? echo "$SearchCity"; ?> but for example if it is Hilton Head Island I need it to add the + signs as Hilton+Head+Island so Netscape won't crash. Thanks...
> I know this have been covered before but I can't find it in > my thousands of emails... How would I URL Encode the following... > I am retrieving a variable like <? echo "$SearchCity"; ?> but > for example if it is Hilton Head Island I need it to add the > + signs as Hilton+Head+Island so Netscape won't crash. Funny enough, the function you are looking for is: urlencode(); The docs are your friend. Chris
Hello, Is there a way to telnet with php? If so does anyone know a good place to find a tutorial on it? Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
I've been messing with popen and telnet recently and I can see the machine connect and show a response but I never get to a login prompt. I'll be fiddling with this some more, maybe we can work on it together? Julia Quoting Brandon Orther ([EMAIL PROTECTED]): > Hello, > > Is there a way to telnet with php? If so does anyone know a good place to > find a tutorial on it? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.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] -- [ Julia Anne Case ] [ Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for. ] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
there's fsockopen from which you might make a telnet client, methinks, but you'd have to know the protocol etc... look for it at the manual. Matt Friedman Spry New Media http://www.sprynewmedia.com Lead Programmer/Partner email: [EMAIL PROTECTED] phone: 250 744 3655 fax: 250 370 0436 ----- Original Message ----- From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Friday, February 09, 2001 2:12 PM Subject: [PHP] Telnet with php? > Hello, > > Is there a way to telnet with php? If so does anyone know a good place to > find a tutorial on it? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.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] > > >
If you are just looking for something better than the ms telnet program, look at http://www.chiark.greenend.org.uk/~sgtatham/putty/. it is so much better than telnet. I don't know if that is what you mean, though. Jeff ""Brandon Orther"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > Is there a way to telnet with php? If so does anyone know a good place to > find a tutorial on it? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.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] >
I am trying to write a text file on my server, but I am getting the following error. Unexpected character in input: '\' (ASCII=92) state=1 Here is my code for the text file. $file = "/path/to/my/server/$userid.win"; $text = "\n"; $fp = fopen($file, "w"); fwrite($fp, $text); fclose($fp); I am getting this error BEFORE it tries to write the file. Can anyone offer any ideas or solutions? Thanks CDitty
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (CDitty) wrote: > Unexpected character in input: '\' (ASCII=92) state=1 > > Here is my code for the text file. > $file = "/path/to/my/server/$userid.win"; > $text = "\n"; > $fp = fopen($file, "w"); > fwrite($fp, $text); > fclose($fp); > > I am getting this error BEFORE it tries to write the file. What's in $userid? -- CC
Does anyone know how to pull a function reference from a class method? Here's why, class myclass(){ var $myarray; function mysort() { /* User sort fails */ usort($this->myarray, $this->mycompfunction); /* Or */ usort($this->myarray, "mycompfunction"); } function mycompfunction() { } } The sort fails because the member function mycompfunction() is not referencable. Any ideas?
----- Original Message ----- From: "Angerer, Chad" <[EMAIL PROTECTED]> > I am not sure if this is the correct wording. But I am wondering about a > good tutorial about writing a PHP script that will spider a directory > structure and extract the file names and insert them into a database. Also > this spidering would be done on a directory and its child with mp3 files and > I would like to extract the ID3 tag from it. Any pointers to a good > starting point/reference point would be greatly appreciated. > > Thanks. > > Chad > The manual. Use combinations of opendir(), readdir(), is_file(), etc. Anna
Sorry to post this but I'm stuck. Anyone knows a good (DBI) Perl mailinglist? It seems so many Perl mailinglists have closed down. Thanks!
HI is it possible to do what i have shown with the 3 php files under? I want that a variable stored in a another php file like this, and then i want to get the stored variable from a 3rd php file. How can i do this, i have tried it but it does not work. When i get the variable in the 3rd php file it is empty. It seems like i cant store variable outside the function, and then use it in other functions in the same php file. Is that true! In JAVA and C++ this was a piece of cake... Thanks in advance from a frustrated student from Norway. -------------- php file called setget.php <?php $temp;// I want to use this as a storing variable until i need this value by calling the getvariable function function setvariable($subject)// storing the variable temp { $temp=$subject; } function getvariable()//getting the variable temp with its stored value which was set by function setvariable { return $temp; } ?> ---------------------------------------------- php file called set.php <?php require("setget.php"); $setvariable="subject";//seting the variable setvariable($setvariable);//storing a value to the variable in setget.php ?> ------------------------------------------------------- php file called get.php <?php require("setget.php"); $data=getvariable(); print "$data";//gettin what i stored in set.php by calling the function in setget.php, but it comes out empty ?> ----------------------------------------------------------
In article <961qbm$hbj$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Kato Strandjord") wrote: > HI is it possible to do what i have shown with the 3 php files under? I want > that a variable stored in a another php file like this, and then i want to > get the stored variable from a 3rd php file. How can i do this, i have > tried it but it does not work. When i get the variable in the 3rd php file > it is empty. It seems like i cant store variable outside the function, and > then use it in other functions in the same php file. Is that true! In JAVA > and C++ this was a piece of cake... You'll want to read the section of the manual dealing with variable scope, especially as it relates to functions. The section on passing by reference may also be of interest at this point... <http://php.net/manual/en/language.variables.scope.php> <http://php.net/manual/en/language.references.php> -- CC
Here's my script. This is a known working script when I use ASP. Why won't is wotj with PHP. function submitForm(f, strPage) { errormsg = ""; if (f.login.value.length == 0) { errormsg = errormsg + "Please enter a login name.\n"; } if (f.email.value.search("@") == -1 || f.email.value.search("[.*]") == -1) { errormsg = errormsg + "Please enter a valid email address."; } if (errormsg != ""){ alert(errormsg); } else { f.action = strPage; f.method = "post"; f.submit(); } } Here's the button. <input type="button" name="submit" value="Add User" onClick="submitForm(this.form, 'adduser-do.php')" style="width=150;"> Any help would be great. Thanks, Pat
Pat, Try using the escape char like this: <input type=\"button\" name=\"submit\" value=\"Add User\" onClick=\"submitForm(this.form, 'adduser-do.php')\" style=\"width=150\"> **************************************************************************** ******************** Here's my script. This is a known working script when I use ASP. Why won't is wotj with PHP. function submitForm(f, strPage) { errormsg = ""; if (f.login.value.length == 0) { errormsg = errormsg + "Please enter a login name.\n"; } if (f.email.value.search("@") == -1 || f.email.value.search("[.*]") == -1) { errormsg = errormsg + "Please enter a valid email address."; } if (errormsg != ""){ alert(errormsg); } else { f.action = strPage; f.method = "post"; f.submit(); } } Here's the button. <input type="button" name="submit" value="Add User" onClick="submitForm(this.form, 'adduser-do.php')" style="width=150;"> Any help would be great. Thanks, Pat
How about telling us 'what' does not work ? m. -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
Hello! My name is Brian Potter and I just finished the PHP Fast and Easy Web Development book. A friend of mine suggested I subscribe to this list. I am eager to interact with all of you! I do a webpage for my youth group as well as various professional web pages. I appreciate all of your help in advance! -BRiAN
----- Original Message ----- From: "Christian Dechery" > WHy PHP is not showing SQL syntax (or any) errors? > > I'm using Win98Me with Apache 1.3.12 and PHP 4.x. > > it works... if I run a correct query it runs normally, but if I go like: > > $query="selct nonexistingfield from nonexistingtable with all crazy syntax"; > mysql_query($query); > > it doesn't tell me there's an error... in fact it doesn't show anything... > why is that? Because it's a pain to have error messages popping up all the time? Here is what I do with every query I every write: $query="yada yada"; $result=mysql_query($query, $connection); if($result=="" || $result=="0") { //if it is a page for my use, I print the error // if it is a page for the general public, I email the //error to myself, and print "There was a problem //completing your request", or something like that. print "Error : ".mysql_error($connection)."<br>\n"; } else { while($row=mysql_fetch_row($result)) { //do whatever you want to do with the data. } } I greatly prefer this to display "0 is not a mysql result index" for everyone to see, if/when something goes wrong. Anna
Try to put this immediately after the mysql_query: echo mysql_errno().": ".mysql_error()."<BR>"; I think this outputs your error. D. -----Original Message----- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 februari 2001 15:38 To: [EMAIL PROTECTED] Subject: [PHP] mysql not reporting errors WHy PHP is not showing SQL syntax (or any) errors? I'm using Win98Me with Apache 1.3.12 and PHP 4.x. it works... if I run a correct query it runs normally, but if I go like: $query="selct nonexistingfield from nonexistingtable with all crazy syntax"; mysql_query($query); it doesn't tell me there's an error... in fact it doesn't show anything... why is that? _________________________________ . Christian Dechery - Webdeveloper .. Diretor de Tecnologia @ Webstyle! .. http://www.webstyle.com.br .. http://www.tanamesa.com.br -- 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]
I think it would be helpful. What do you folks think? MD
On Fri, Feb 09, 2001 at 05:37:04PM -0700, Michael Dearman wrote: > I think it would be helpful. > What do you folks think? You'd think it would be a popular thing, but the one O'Reilly hosts is more or less silent. http://www.oreillynet.com/pub/a/php/php-xml-ml.html Matt
I agree with you! I am also looking for an xml, soap and php implementation. Chris ----- Original Message ----- From: "Michael Dearman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, February 09, 2001 7:37 PM Subject: [PHP] A php-xml mailing list? > I think it would be helpful. > What do you folks think? > MD > > -- > 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] > >
Yes, I subscribe to this PHP-XML mailing list, but it is very low volume. I'd encourage anyone considering using XML/XSL/SOAP/RSS to join this list, so that XML and SOAP can be easily used with a PHP web app environment. I've used ASP/COM when I really wanted to use PHP, but the Microsoft SOAP servers/listeners made XML communication much easier, especially since I'm new to SOAP. -Ben -----Original Message----- From: Matt McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, February 09, 2001 3:24 PM To: Michael Dearman Cc: [EMAIL PROTECTED] Subject: Re: [PHP] A php-xml mailing list? On Fri, Feb 09, 2001 at 05:37:04PM -0700, Michael Dearman wrote: > I think it would be helpful. > What do you folks think? You'd think it would be a popular thing, but the one O'Reilly hosts is more or less silent. http://www.oreillynet.com/pub/a/php/php-xml-ml.html Matt -- 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]
Hello, Does anyone know how I can get PHP4 to connect to Microsoft SQL server 2000? Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
Set up an ODBC DSN in your control panel and use PHP odbc functions. Brandon Orther wrote: > Hello, > > Does anyone know how I can get PHP4 to connect to Microsoft SQL server 2000? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.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]
hi Can you tell me how to track the current url by using PHP? for example, Mike is visiting http://www.celebritieszones.com/showthumb/britney_spears/1/ and i wanna make a PHP script so it tells Mike that he is currently browing http://www.celebritieszones.com/showthumb/britney_spears/1/ I tried to use $url_array=explode("\",$REQUEST_URI); But it didn't work. It showed Array instead of the URL when i tried to display it. Please help. Thanks ------- free celebritieszones email: http://www.celebrititeszones.com/login.php
----- Original Message ----- From: "McShen" <[EMAIL PROTECTED]> > > hi > > Can you tell me how to track the current url by using PHP? for example, > Mike is visiting http://www.celebritieszones.com/showthumb/britney_spears/1/ > and i wanna make a PHP script so it tells Mike that he is currently browing > http://www.celebritieszones.com/showthumb/britney_spears/1/ > > I tried to use > > $url_array=explode("\",$REQUEST_URI); > > But it didn't work. It showed Array instead of the URL when i tried to > display it. > Of course, trying to print $url_array will print "Array". You just turned the $REQUEST_URI string into an array (that being what explode does). If you want Mike to know the name of the file he's on, print $PHP_SELF. The info the location bar (not counting the root domain name)? print $REQUEST_URI. The domain name? $HTTP_HOST http://www.php.net/manual/en/html/language.variables.predefined.html Anna
Hello Does anyone know where I can get mssql70.dll for php to connect with MsSql 2000? Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
Hello everyone, Alright, what's wrong with this script? I just get one big blank image. I want the script to sequentially pull up each pixel off the template image, and copy them pixel by pixel to the second image. Actually, what I want to do is to process the pixels BEFORE I write them, but this is just a test to make sure I can write them. I don't understand why it doesn't work. But it has something to do with my imagecolorallocate function, I just know it. Mr Lynch? Anyone? :-) Thanks Dan ============================================================================ ===================== <? $template = "images/alpha-shadow.jpg"; $alpha = imagecreatefromjpeg($template); $alphasize = getimagesize($template); $alphawidth = $alphasize[0]; $alphaheight = $alphasize[1]; $x=0; $y=0; $im = imagecreate (500,500); imagecolorallocate($im,255,255,255); while ($y <= $alphaheight){ while ($x <= $alphawidth){ $alphacolor = imagecolorat($alpha, $x, $y); $alphaindex = imagecolorsforindex($alpha, $alphacolor); $red = $alphaindex["red"]; $green = $alphaindex["green"]; $blue = $alphaindex["blue"]; $pixel = ImageColorAllocate($im,$red,$green,$blue); imagesetpixel($im, $x, $y, $pixel); imagecolordeallocate($im,$pixel); if ($HTTP_GET_VARS["debug"] == 1){ print("($x,$y) $red $green $blue <br>"); } ++$x; } ++$y; $x=0; } if ($HTTP_GET_VARS["debug"] != 1){ Header("Content-type: image/jpeg"); imagejpeg($im); imagedestroy($im); }
You might try this, putting the escape character around the userid.> $file = "/path/to/my/server/\"$userid.win\""; Unexpected character in input: '\' (ASCII=92) state=1 > > Here is my code for the text file. > $file = "/path/to/my/server/$userid.win"; > $text = "\n"; > $fp = fopen($file, "w"); > fwrite($fp, $text); > fclose($fp); > > I am getting this error BEFORE it tries to write the file. What's in $userid?
My apologies. I should have said what line the error was on. The problem lines was $text = "\n";. I tried an experiment and put a space before the \ and that got rid of the error. Go figure. Chris At 06:53 PM 2/9/01, Gobins, Debbie wrote: >You might try this, putting the escape character around the userid.> > >$file = "/path/to/my/server/\"$userid.win\""; > > > Unexpected character in input: '\' (ASCII=92) state=1 > > > > Here is my code for the text file. > > $file = "/path/to/my/server/$userid.win"; > > $text = "\n"; > > $fp = fopen($file, "w"); > > fwrite($fp, $text); > > fclose($fp); > > > > I am getting this error BEFORE it tries to write the file. > >What's in $userid? > > >-- >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]
Thanks a lot for your help everyone!!! It worked!! Woohoo!! Not only that, I learned about joins! :) /sunny --- Steve Werby <[EMAIL PROTECTED]> wrote: > "Sandeep Hundal" <[EMAIL PROTECTED]> wrote: > > thanks for the tip steve. i read up on left joins, and got this: > > SELECT diary.id, diary.thedate, diary.topic, diary.entry > > FROM diary > > LEFT JOIN comments > > ON diary.id = comments.id; > > > > but it only joins the two tables. > > Right. It took care of your main problem though. > > > What I need is only 1 column from > > the second table, counted. Something like this, but that doesn't > work > > :( > > SELECT diary.id, diary.thedate, diary.topic, diary.entry > > FROM diary > > LEFT JOIN comments.id > > ON diary.id = comments.id > > COUNT(comments.id) > > GROUP BY comments.id; > > The order of your statement is a little off. Try this: > > SELECT diary.id, diary.thedate, diary.topic, diary.entry, > COUNT(comments.id) > FROM diary > LEFT JOIN comments.id > ON diary.id = comments.id > GROUP BY comments.id; > > If that doesn't work you might want to look at running two queries > and > saving their results as temporary tables and then running a query > to join > the two temporary tables to get what you want. > > Also, for SQL questions like this you'll get better [or more or > quicker] > responses on the mysql mailing list. Sign up at www.mysql.com. > > -- > Steve Werby > COO > 24-7 Computer Services, LLC > Tel: 804.817.2470 > http://www.247computing.com/ __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
On Fri, 09 Feb 2001, The Hermit Hacker wrote: >I've gotten into a habit of upgrading my apache > with a simple 'make install-program', but, of course, php needs 'make > install-include' to happen as well ... thanks for pointing that out. i've not had showstoppers with make install-program yet. but i've had minor problems with apache, php and packages that i need in php (gd, snmp, etc, on FreeBSD, Linux, etc) and i'm sure i'll be needing make install-include (or similar/other make targets) sometime very soon. tiger -- Gerald Timothy Quimpo [EMAIL PROTECTED] http://members.xoom.com/TigerQuimpo entia non sunt multiplicanda veritas liberabit vos praetere necessitatem mene sakhet ur-seveh
I'm about to upgrade to mysql 3.23 on a production installation on linux with PHP 4.0.4pl1, has anyone had any problems with this combination, as compared to 4.0.4pl1 with 3.22.xx? Thanks! Jon
Hi All, Anyone wrestled with the Zend Debugger Setup. Having downloaded the test drive of the IDE and Debugger and the test drive license file followed the docs to the letter. It still isnt running. once i include zend_extention="/usr/local/Zend/ZendDebugger.so" in the php.ini file apache wont restart. Using Apache 1.3.14 & PHP 4.03pl1 debug mode is not enabled as the docs say so this should all work fine also its not exactly clear where that line should be in php.ini I have sent the query to Zend as well but maybe the list will be quicker Cheers Steven ******************************* Steven Michael Holloway Web Programmer Port Douglas Internet Services Cairns Australia [EMAIL PROTECTED] ******************************* --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.228 / Virus Database: 109 - Release Date: 01/17/2001
Dear Sir, I have two problems in using PHP. Could you help me? I am using Red-Hat to build up my System. Could I use Perl to control some PHP program? Also, could I run my PHP program in Linux Console? Sorry to disturb you THx! Kevin Ng =================================================================== ·s®ö§K¶O¹q¤l¶l½c http://sinamail.sina.com.hk