Re: [PHP] POST/GET - if there is a dot in the name it's changes to "_"

2003-08-14 Thread Analysis & Solutions
Arnau: On Tue, Aug 12, 2003 at 05:28:54PM +, Arnau Rebassa wrote: > I'm having the same problem as the bug report > http://bugs.php.net/bug.php?id=7987. They say that's not a bug it's a > feature... Anybody knows where I can find which characters are changed and > by which character? You

Re: [PHP] libxml in PHP 5

2003-08-14 Thread Analysis & Solutions
cabee Trachtenberg <[EMAIL PROTECTED]> To: NYPHP Talk <[EMAIL PROTECTED]> Date: Tue, 12 Aug 2003 14:46:15 -0400 (EDT) Subject: Re: [nyphp-talk] libxml in PHP 5 On Mon, 11 Aug 2003, Analysis & Solutions wrote: > I was thinking that the new XML parser would necessitate scripts use > di

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Analysis &amp; Solutions
Hey Dan: On Tue, Aug 12, 2003 at 09:12:45PM -0400, Dan Anderson wrote: > > But some web pages when I cut and paste the URLs don't work. Like when > I search for something on Ebay. Could this be because of cookies? That's a good guess! Yet further proof that cookies suck, except the ones made

Re: [PHP] Parsing problem with character '>'

2003-08-14 Thread Analysis &amp; Solutions
Marc: On Wed, Aug 13, 2003 at 06:32:50PM -0700, FMM Schillemans wrote: > > the problem is that the moment the '>' character is placed within the PHP > code (lets say withing a print-command), then the PHP mode is immideatly > ends. Making it impossible to create HTML code run-time Then your PHP

Re: [PHP] Document root

2003-08-14 Thread Analysis &amp; Solutions
Hey Mukta: On Tue, Aug 12, 2003 at 04:27:55PM +, Mukta Telang wrote: > Is there any constant in php like $DOCUMENT_ROOT which holds path to the > "Document root" of the server? 1) $_SERVER['DOCUMENT_ROOT'] 2) Check out phpinfo(). It will produce answers to this and MANY other questions

Re: [PHP] Display variable with spaces

2003-08-14 Thread Analysis &amp; Solutions
On Wed, Aug 13, 2003 at 11:56:43AM -0400, Pushpinder Singh Garcha wrote: > echo "$email_1"; > /// However when it comes to displaying it using the table all I get is > the "thisisa" . It simply avoids the spaces. Can anyone tell me why You need to write valid HTML. Put quotes around the va

Re: [PHP] Reading remote, script-generated files

2003-08-14 Thread Analysis &amp; Solutions
Hey Matt: On Tue, Aug 12, 2003 at 10:07:10AM -0700, Matt Daleo wrote: > I'm attempting to read a remote file and parse it for data. The problem I've > having is that the file seems to be generated by Perl > (http://alert.dot.pima.gov/scripts/1brpssd.pl) and when I read it the > script-generated po

Re: [PHP] Newbie Session Question

2003-08-14 Thread Analysis &amp; Solutions
On Thu, Aug 14, 2003 at 03:44:10PM -0400, CPT John W. Holmes wrote: > From: "Tim Winters" <[EMAIL PROTECTED]> > > No, and it's $HTTP_SESSION_VARS. PHP is case sensitive, remember? And, do note, use $_SESSION instead. It will continue to work in default configurations of PHP 5, plus it's already

Re: [PHP] Simple HTTP request, with "Range" header

2003-08-14 Thread Analysis &amp; Solutions
HEY KEN On Tue, Aug 12, 2003 at 09:30:21PM -0500, Ken wrote: > I imagine I would want to form a basic get header request, with URL, > whatever else I need, and a "Range:bytes=1000-2000" header. If I > understand correctly, the (HTTP/1.1) web server would return the > document I want, just b

Re: [PHP] Adding days to a date

2003-08-14 Thread Analysis &amp; Solutions
On Tue, Aug 12, 2003 at 03:37:25PM -0400, Donpro wrote: > > I am looking for a function that will add a variable number of days and > return a valid date, i.e., the array elements for "mday", "mon" and "year" > are reset as needed. Is this possible? Look at mktime(). It allows you to seamlessl

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Analysis &amp; Solutions
Hey Chris: On Wed, Aug 13, 2003 at 08:44:40AM -0700, Chris Shiflett wrote: > --- Analysis & Solutions <[EMAIL PROTECTED]> wrote: > > The difficulty with cookies is when a site doesn't work without > > them. > > Right, which is an example of developers that suc

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Analysis &amp; Solutions
Hey Dan: On Tue, Aug 12, 2003 at 08:13:32PM -0400, Dan Anderson wrote: > I have noticed that sometimes I cannot fopen($web_address,'r') or use > any similar files if the web address contains a form get in it. (i.e. > ends in a ?var1=xxx&var2=xxx...). It should work. You said sometimes. What ar

Re: [PHP] php conditional loop question

2003-08-14 Thread Analysis &amp; Solutions
On Wed, Aug 13, 2003 at 09:51:39PM -0400, Randy L Johnson Jr wrote: > > I have a function that makes a connection to a live datafeed website and > downloads data via a pfsockopen() statement. After awhile the data stops > feeding but the connection stays open. when the data stops I want to exi

Re: [PHP] string concatenation from array

2003-08-14 Thread Analysis &amp; Solutions
On Tue, Aug 12, 2003 at 01:58:21PM -0600, Micah Montoy wrote: > I'm having a bit of difficulty getting a string to attach to itself from an > array. Here is the bit of code I'm working on. > A bunch of simplifications, efficiency tweaks on this approach... > $wresult = ""; $wresult = ''; >

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Analysis &amp; Solutions
Hey Mike: On Tue, Aug 12, 2003 at 07:33:31PM -0700, Mike Migurski wrote: > > > >That's a good guess! Yet further proof that cookies suck, except the > >ones made with flour, shortening and sugar, of course. > > Huh? seems like further proof that cookies are working as intended: > serving up indi

Re: [PHP] what's going on with the hanmir.com guy?

2003-08-14 Thread Analysis &amp; Solutions
On Tue, Aug 12, 2003 at 03:58:19PM -0700, Chris W. Parker wrote: > > I'm surprised the email address hasn't been taken off the list yet. > [EMAIL PROTECTED] you are my arch-nemesis!! [EMAIL PROTECTED] is the place to kvetch about users like this. I already did. A subject of " bouncing" is cle

Re: [PHP] OPINIONS wanted - xml-DOM-xsl + php

2003-08-14 Thread Analysis &amp; Solutions
On Wed, Aug 13, 2003 at 11:44:18PM +0200, Thomas Hochstetter wrote: > > Are there plans to make the xml-DOM-xsl combination standard in future > releases of php (version 5)? The .dlls are there. A person involved with the development recently said that in PHP 5 "The DOM, SAX, XPath, Schema and any

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Analysis &amp; Solutions
On Wed, Aug 13, 2003 at 08:17:14AM -0700, Chris Shiflett wrote: > > why do sites such as Google, Amazon, TicketMaster, Yahoo!, and eBay use > them? The difficulty with cookies is when a site doesn't work without them. Fortunately, Google works fine when cookies are disabled. Amazon is a great e

[PHP] libxml in PHP 5

2003-08-12 Thread Analysis &amp; Solutions
Hey Folks: I'm starting to use PHP 5 on my development machine. The primary XML parser is changing from expat to libxml. I was curious about the change, so sought documentation of the new libxml stuff on the PHP site but haven't been able to find any. Perhaps someone can steer me toward such do

Re: [PHP] select distinct mysql

2002-08-16 Thread Analysis &amp; Solutions
On Thu, Aug 15, 2002 at 01:12:59PM +0300, kale wrote: > > SELECT *, DISTINCT name FROM history ORDER date DESC, time DESC LIMIT 10 > > but this not work. how can I do this? I use a mysql server. That's because your query string syntax is all messed up. Put a mysql_error() call in your script a

Re: [PHP] problem with mail()

2002-08-16 Thread Analysis &amp; Solutions
On Wed, Aug 14, 2002 at 10:04:46AM -0700, Gui Guy wrote: > > ...: SYSERR(nobody): Can't create transcript file ./xfg7E9Jlr03988: > Permission denied > : SYSERR(nobody): Cannot create ./dfg7E9Jlr03988: Permission denied > > Does it mean that php is trying to send mail from user nobody? Good

Re: [PHP] Credit Card Transactions and Micropayment

2002-08-16 Thread Analysis &amp; Solutions
Sascha: On Wed, Aug 14, 2002 at 04:06:39PM +0200, Sascha Braun wrote: > > Are there some ways of using a micropayment system together with PHP? What do you mean by "micropayment?" Paying for small fees? How small are you talking about? > Maybe something where Customers can see the Amount o

Re: [PHP] Variable

2002-08-16 Thread Analysis &amp; Solutions
On Wed, Aug 14, 2002 at 08:23:18AM +, Remon Redika wrote: > > > > > > $Namak = $namasa; > $Namak = $Namak.$namadu; > $Namak = $Namak.$namati; Is that REALLY what you want to do? There are no spaces between the names. Try: $Namak = "$namsa $namadu $namati"; But, t

Re: [PHP] upgrading

2002-08-15 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 02:58:02PM -0400, Alex Shi wrote: > > I am currently have PHP 4.0.4p11 and Apache 1.3.19 running > on RH Linux 7.1. Now I am thinking of upgrade my PHP to 4.1.2-7 If you're upgrading, don't waste your time installing very old versions with significant vulnerabilities in

Re: [PHP] [Followup] Exploding Zip Codes! (Using PHP's explode function)

2002-08-15 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 12:13:35PM -0700, Keith Posehn wrote: > > I have the code together now to put it all the zip codes into and array--but > now I need to add those zip codes to a sql statement for the WHERE clause. > > SELECT * FROM [table] > WHERE zip="[all the darn zips listed here]" $qu

Re: [PHP] Writing to a file that's not PHP_SELF

2002-08-15 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 04:02:51PM -0230, Kondwani Spike Mkandawire wrote: > > $file = fopen("Counter.txt", "r+"); > $counter = fread($file, filesize("Counter.txt")); > fwrite($file, "$counter", strlen($counter)); ... snip ... > // For some reason the updated value is not written > // to C

Re: [PHP] PHP and Memory...

2002-08-15 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 01:57:54PM +0200, MyBox wrote: > > function testfunc($var1,$var2) > { > ...many calculation and variables > return $result; > } > > then on call number 12 the script exits whith error-message: > Fatal error: Allowed memory size of 8388608 bytes exhausted Exhausting 8 megs

Re: [PHP] Removing session id from url when using session_set_save_handler

2002-08-15 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 10:47:13AM +0200, Per wrote: > > Does anybody know how to get rid of the session id in the url when using > session_set_save_handler. Perhaps session.use_trans_sid is the ticket you're looking for... --Dan -- PHP classes that make web design easier

Re: [PHP] Re: xml and php

2002-08-15 Thread Analysis &amp; Solutions
On Thu, Aug 15, 2002 at 11:28:51PM +0200, Pafo wrote: > > i cant get information from a deeper node... > > > 100 > > nisse > > Carefully examine the code at http://www.analysisandsolutions.com/code/phpxml.htm It provides you the basic concepts needed to parse any XML do

Re: [PHP] Two version of php in the same system

2002-08-15 Thread Analysis &amp; Solutions
On Wed, Aug 14, 2002 at 07:43:40PM -0300, Breno Cardoso Perucchi wrote: > >Action application/x-httpd-php403 "/ver403/php" >ScriptAlias /ver403/ "/usr/local/php/ver403/bin" >AddType application/x-httpd-php403 .php3 > > Not Found > The requested URL /ver403/php/index.php3 was not found

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-14 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 10:07:57AM -0700, Rasmus Lerdorf wrote: > > while ( list($Key, $Val) = each($_SESSION) ) { > > $$Key = $Val; > > } > > extract($_SESSION) is a better way to do that. Yeah. Old habits die hard! :) --Dan -- PHP classes that make web desi

Re: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Analysis &amp; Solutions
On Wed, Aug 14, 2002 at 02:20:07AM -0400, Robert Parker wrote: > > I don't remember where I read this but it only takes the crackers about 1 - 2 > seconds to crack your average MD5 encrypted password. This is quite logical > because all they had to do is make a database of all of the MD5 sums of

Re: [PHP] question concerning php parsing

2002-08-13 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 09:22:47AM -0400, Randy Johnson wrote: > if i have functions.php with 10 functions in it and include the file in my > main php file and call 1 of the 10 functions in my program does the whole > functions.php have to be parsed or does it just include the function that is >

Re: [PHP] PHP, XML and HTML-Tags

2002-08-13 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 03:22:03PM +0200, Bernard wrote: > > I am using successfully the PHP XML-parser. But I have one problem. > I like to include html tags into the texts and I don't want them to be > interpreted by the parser. Have you tried putting the XML in CDATA sections? That's really

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Analysis &amp; Solutions
Petre: On Tue, Aug 13, 2002 at 03:18:42PM +0200, Petre Agenbag wrote: > > I have register_golbals = on, BUT, I want to find a way to code that I > know will always work, regardless of register_globals or cookies, so > that I am only dependant on the trans-sid ( but If I could rule that out > too,

Re: [PHP] Credit Card suggestions

2002-08-12 Thread Analysis &amp; Solutions
On Mon, Aug 12, 2002 at 08:48:49PM -0400, Mike Mannakee wrote: > Does anyone have any suggested method of scrambling a user's credit card > number before I stick it in a mysql database? I want to make sure it's > useless to anyone that might manage to lift the database. It's best not to store fu

Re: [PHP] .htaccess and PHP

2002-08-12 Thread Analysis &amp; Solutions
On Tue, Aug 13, 2002 at 12:01:24AM +0300, Smad wrote: > > I am authenticating users on my website using .htaccess. > After they log in, I want to pass the user info (for ex: a unique nr. > identifiying the person) thruought all the pages which are affected by the > .htaccess file $_SERVER['PHP_A

Re: [PHP] Exploding Zip Codes! (Using PHP's explode function)

2002-08-12 Thread Analysis &amp; Solutions
On Mon, Aug 12, 2002 at 01:29:38PM -0700, Keith Posehn wrote: > > | 36310 ABBEVILLE | > | 35440 ABERNANT | > | 35005 ADAMSVILLE | Look at http://www.php.net/manual/en/function.fgetcsv.php. Use Example 1, substituting " " as your "delimiter" argument and your file name in lieu of "tes

Re: [PHP] SQL ?

2002-08-12 Thread Analysis &amp; Solutions
Hi Tyler: On Mon, Aug 12, 2002 at 02:32:57PM +, Tyler Durdin wrote: > > Why not just let such a simple question go then? I was being helpful by pointing you to the manual where you could find the answer to this particular question AND a means of figuring out answers to future questions. I w

Re: [PHP] SQL ?

2002-08-12 Thread Analysis &amp; Solutions
On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote: > SELECT *, IF (answer = 'a', TRUE, FALSE) AS Answer-A > What does the As Answer-A mean and what does it do? Why not examine the manual for the answer to such a basic question, especially one that is off topic for the list you posted

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Analysis &amp; Solutions
On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote: > > The .htaccess approach appears to fit my situation best; but, I've not > been able to get it to work. I wondered about the DirectoryIndex directive's ability to utilize files in other directories, so did a little test, which is what you i

Re: [PHP] records in db

2002-08-10 Thread Analysis &amp; Solutions
On Sat, Aug 10, 2002 at 05:52:42PM +, Tyler Durdin wrote: > If I have a field in my DB that can have 4 different answers, lets say > a,b,c and d. How can I count the number of each in that field. So if there > are 4 a's 1 b 0 c's and 12 d's how can I get php to count this? Us the database

Re: [PHP] PHPS on apache 2

2002-08-10 Thread Analysis &amp; Solutions
On Sat, Aug 10, 2002 at 07:38:05PM +0200, FileCop wrote: > > I have installed apache 2.0.39 and php 4.2.2 on a windows maschine (yes I > know that sucks). I have added the "AddType application/x-httpd-php-source > .phps" line to my httpd.conf file, but .phps does not work. Did you add the corres

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-10 Thread Analysis &amp; Solutions
On Sat, Aug 10, 2002 at 01:12:38PM -0400, Al wrote: > I'm on a virtual host without a shell account and need execute a UNIX > command. > > ln -s ../afile.php index.php In a PHP script, you can do this -- if permissions are favorable: exec('ln -s ../afile.php index.php'); > Is there some w

Re: [PHP] PHP form port

2002-08-10 Thread Analysis &amp; Solutions
On Sat, Aug 10, 2002 at 09:14:03AM -0700, Daniel Guerrier wrote: > How do i execute a form post with php? > I want to validate CCard info etc.. then perform the > post with no furtheraction from the user. > > Basically If not valid stay here and show whats wrong > ELSE post form to process.php D

Re: [PHP] Save ability... Duplicate DB entries

2002-08-10 Thread Analysis &amp; Solutions
Hi JJ: On Sun, Aug 11, 2002 at 01:44:53AM +1000, JJ Harrison wrote: > > Which has a save or a publish option. I only want to keep one copy of each > article in the DB. This adds a new one each time. I know about updates in > SQL but the file may or may not already be in the db. Does anyone have

Re: [PHP] Two version of php in the same system

2002-08-10 Thread Analysis &amp; Solutions
On Sat, Aug 10, 2002 at 02:34:30AM -0300, Breno Cardoso Perucchi wrote: > It have some order for installation of the versions of PHP? > First 4.03 > Second 4.22 > > or > > First install 4.22 > Second 4.03 Does not matter. > You showed as installing version of php for Windows ? > That go work

Re: [PHP] First Attempt to use DB failed.

2002-08-09 Thread Analysis &amp; Solutions
On Fri, Aug 09, 2002 at 04:27:56PM -0500, Jim Bailey wrote: > $die_msg = "Connection to Database Failed" Where's the terminating ";" on that prior line? > $connect = mysql_connect("localhost","UserName","UserPW") > or die("Connect Failed" ): You put a ":" rather than ";" on the prior line

Re: [PHP] Having an issue with a Directory Listing in the php Scripting

2002-08-09 Thread Analysis &amp; Solutions
Hi Duncan: On Fri, Aug 09, 2002 at 04:14:47PM -0500, §§ Duncan MacLeod §§ wrote: > it seems as though this wold work great if I had the script running in a > actual php.. the initial file is index.php but calls to indexcontent.inc > that calls to another inc file that has the actual content info

Re: [PHP] special characters

2002-08-09 Thread Analysis &amp; Solutions
On Fri, Aug 09, 2002 at 02:58:26PM -0400, Jeb A. Scarbrough (home) wrote: > > a) strip out any non-standard ascii characters (like the TM or > copyright symbol) preg_replace() or ereg_replace(). > b) have PHP encode all these symbols. > > I know about htmlentities, but it not catch everythi

Re: [PHP] Newbie question about SQL result formatting

2002-08-09 Thread Analysis &amp; Solutions
On Fri, Aug 09, 2002 at 10:55:52PM +0200, Kristoffer Strom wrote: > > How do I convert the result to HTML code, I especially want the linebreaks!! Two options. Put the output in between tags. Or if you want the regular font, in PHP use the nl2br() function. --Dan PS: For future reference.

Re: [PHP] Name of Include File breaking a Function - Strange!

2002-08-09 Thread Analysis &amp; Solutions
On Fri, Aug 09, 2002 at 01:59:09PM -0400, Monty wrote: > > function user_acess() { > if ( isset($_SESSION['valid_user']) ) { > return 1; > } > return 0; > } > > Most of the time it returns 0 (zero) even though I know the session variable > is set. However, if I rename the fun

Re: [PHP] PHP: problem with patterns

2002-08-09 Thread Analysis &amp; Solutions
Hi Alia: On Fri, Aug 09, 2002 at 02:50:32PM +0300, Alia Mikati wrote: > > I have to parse an html file and replace > src attribute of an img. I'm using 'preg_match_all' First off, if you're doing a search and replace, use preg_replace(). > having problem with patterns. This is the part of cod

Re: [PHP] Having an issue with a Directory Listing in the php Scripting

2002-08-09 Thread Analysis &amp; Solutions
On Fri, Aug 09, 2002 at 08:58:41AM -0500, §§ Duncan MacLeod §§ wrote: > I am only being able to list the first > file in each of the directories. Not the entire directory. ... snip ... > Although, the only files I really need out of the > directory are going to be '.JPG', '.jpg', '.GIF', '.gif

Re: [PHP] $http_host use case

2002-08-09 Thread Analysis &amp; Solutions
David: On Thu, Aug 08, 2002 at 10:30:15PM +0200, David D wrote: > > I make 2 sites with 2 domain names that use same scripts, > Each has got its html templates in a special dir selected judgging from > $HTTP_HOST values. ... snip ... > search engine works, did they affect this var correctly ? I

Re: [PHP] Help with multiple select

2002-08-09 Thread Analysis &amp; Solutions
Untested... $row = mysql_fetch_array($result, MYSQL_ASSOC); # Assuming items are comma separated in the field... $mins = explode(',', $row['mins']); echo "\n"; echo " \n"; for ($i=0; $i<12; $i++) { echo " $i\n" } echo " \n\n"; echo "\n"; echo "

Re: [PHP] Checking Var's passed via URL

2002-08-09 Thread Analysis &amp; Solutions
On Thu, Aug 08, 2002 at 03:01:15PM -0300, Saci wrote: > Parse error: parse error, unexpected T_ISSET, expecting '(' in > http://mydomain/Cliente.php on line 2 > > if (isset($_GET['modo'])){ Your error message is complaining about line 2. Well, that right there is line 2. I bet you retyped t

Re: [PHP] RegEx (back referencing)

2002-08-04 Thread Analysis &amp; Solutions
On Sat, Aug 03, 2002 at 05:03:36PM +0100, Phil Ewington wrote: > Hi, > > I am am writing a function to color code and indent JavaScript source using > regular expressions and cannot seem to get back referencing working. What you're using isn't "back referencing," it's utilizing "substrings." B

Re: [PHP] Parsing XML into PHP array.

2002-08-02 Thread Analysis &amp; Solutions
> I send the XML request in a string to the > credit bureau through cURL and vice versa. Most of the PHP scripting I > found everywhere spoke about breaking up the xml tag into the array only > when they come from the file and is use for parsing. The example on my page you looked at does get the

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Analysis &amp; Solutions
Folks: On Fri, Aug 02, 2002 at 07:01:38PM +0200, Jürgen wrote: > > Why would i ever want to use isset() then? Because sometimes you just want to check if something is set due to null, '' and 0 being important. $var = ''; empty($var); // evaluates to true isset($var); // evaluates t

Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Analysis &amp; Solutions
On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote: > > function issne($var) > { >return isset($var) && !empty($var) ? true : false; > } > > is there is any builtin function that does that? (one function call). Yes. Just use empty(). It automatically checks if the variable is: not

Re: [PHP] Problem of characters with xml_parse

2002-07-30 Thread Analysis &amp; Solutions
On Tue, Jul 30, 2002 at 05:12:25PM +0200, Sebastien Mole wrote: > but when I try to parse characters such as chr(#x0001) or chr(#x001F) (or others) the parser returns me an error Line wrapping... "What a concept." In my PHP XML parsing tutorial, http://www.analysisandsolutions.com/code/phpxm

[PHP] Credit Card Validation Solution updated

2002-07-29 Thread Analysis &amp; Solutions
Hi Folks: I'm happy to announce the latest versions of my Credit Card Validation Solution. This includes a new JSP Edition and reworking the PHP and Perl Editions into an Object Oriented paradigm. If you're using a version prior to the following, please upgrade: Ed. Ver URI --- -

Re: [PHP] Disturbing parsing problems

2002-07-29 Thread Analysis &amp; Solutions
On Mon, Jul 29, 2002 at 12:19:50PM -0400, [EMAIL PROTECTED] wrote: > > if (){ > do { > if (){ > while () {} > if () ; > else if (); > else ; > } I don't like one line if statements. Perhaps there's a problem in there. Makes t

Re: [PHP] ENCRYPT() in MySQL

2002-07-29 Thread Analysis &amp; Solutions
On Mon, Jul 29, 2002 at 10:06:29PM +1000, Justin French wrote: > > I'm on a shared server which does not have mcrypt... not good, since i want > to temporarily store credit card numbers in an encrypted manner, either in a > MySQL database, or in a text file. Uh, what are you going to do with the

Re: [PHP] Dates and Date()

2002-07-29 Thread Analysis &amp; Solutions
On Mon, Jul 29, 2002 at 10:51:39AM -0400, Christopher J. Crane wrote: > I believethisto be one way to find out yesterday's date: > $tomorrow = mktime (0,0,0,date("m") ,date("d")-1,date("Y")); > > However, I would like to have a snippet of code to tell me how to get the > date of today - 10 days

Re: [PHP] Picking up Data of Previous Date from Table

2002-07-29 Thread Analysis &amp; Solutions
On Mon, Jul 29, 2002 at 01:03:55AM -0700, Thomas Edison Jr. wrote: > > SELECT * FROM transactions,holdings where > transactions.isinno=holdings.isinno AND > transactions.clientid='$clientid' AND > holdings.clbal!=0 GROUP BY holdings.isinno ORDER BY > shares > > Now for this purpose i'm facing a s

Re: [PHP] Re: REGEX for phone #

2002-07-29 Thread Analysis &amp; Solutions
Hi Richard: On Mon, Jul 29, 2002 at 05:02:49AM -0500, Richard Lynch wrote: > > For starters, if Perl wants \ PHP needs \\ since \ is special in both > languages. I'm curiuos what you're talking about. The manual says nothing about this in the PCRE section: Example 1. Examples of valid patte

Re: [PHP] Create a link where http://

2002-07-29 Thread Analysis &amp; Solutions
On Mon, Jul 29, 2002 at 08:12:33AM -0400, Jesse Lawrence wrote: > would like to automatically turn any instance of > http://whatever into a link, without requiring the > viewers to enter html. The mailing list archive: http://groups.google.com/groups?group=php.general Good search terms: hyperlin

Re: [PHP] REGEX for credit card number

2002-07-28 Thread Analysis &amp; Solutions
On Sun, Jul 28, 2002 at 04:02:32PM -0400, Mike Mannakee wrote: > Does anyone have a regular expression that works to validate credit card > numbers? http://www.analysisandsolutions.com/code/ccvs-ph.htm I just updated it to Version 4.3 LATE Friday night. So, anyone using anything earlier than t

Re: [PHP] Help invoking a regexp

2002-07-26 Thread Analysis &amp; Solutions
Hi Niklas: On Fri, Jul 26, 2002 at 01:54:25AM +0200, Nicklas af Ekenstam wrote: > Hi > > I have this regular expression: > > (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|www\.[-a-z0-9.]+)[^ .,;\t<">\):] > > Which is supposed to match hyperlinks. I would like to use this > from php to grab

Re: [PHP] Reg exp to remove line feeds before lines starting with white space

2002-07-25 Thread Analysis &amp; Solutions
> On Thu, Jul 25, 2002 at 12:36:27PM +0200, Nicklas af Ekenstam wrote: > > > > In order to read the headers into an array of header key/value fields > > i would like a reg exp to remove all new lines/line feeds before a > > line starting with one or more white spaces or tabs. Pardon my prior pos

Re: [PHP] unset array here?

2002-07-25 Thread Analysis &amp; Solutions
On Thu, Jul 25, 2002 at 10:26:03PM +0200, Bas Jobsen wrote: > Hello, > > I have this example code: > function doprint($a){foreach($a as $value)echo $value;} > doprint(array('1','test','hello','and')); > > Question, is the array in memory after the function call? > So, should it be better to use

Re: [PHP] Parse error - new set of eyes?

2002-07-25 Thread Analysis &amp; Solutions
Hi: On Thu, Jul 25, 2002 at 02:40:28PM -0600, Jas wrote: > I am getting a parse error on line 14, I am trying to make sure session vars > are being set before rendering the page. This is lines 12,13,14 & 15. The way you posted it here, it's hard to tell which line is which. Layout your script

Re: [PHP] mySQL Queries using PHP's SESSION variables

2002-07-25 Thread Analysis &amp; Solutions
On Thu, Jul 25, 2002 at 02:51:13PM -0400, Anup wrote: > Hello, I am stuck here. In the name of efficiency I want to lower the number > of callls to the database. So I am trying to give the most stringent query > possible. This is the problem: I have stored the surfers shopping cart, > where each i

Re: [PHP] Reg exp to remove line feeds before lines starting with white space

2002-07-25 Thread Analysis &amp; Solutions
On Thu, Jul 25, 2002 at 12:36:27PM +0200, Nicklas af Ekenstam wrote: > > In order to read the headers into an array of header key/value fields > i would like a reg exp to remove all new lines/line feeds before a > line starting with one or more white spaces or tabs. In ereg_replace() you can use

Re: [PHP] Traversing an appendable file

2002-07-25 Thread Analysis &amp; Solutions
On Sun, Jul 21, 2002 at 08:50:15PM -0400, Chris Earle wrote: > Is there any way to fseek (or something to the exact same effect) a file > opened with "a" or "a+"? > > I've tried rewinding and fseeking appendable files, but neither work. > > Opening up in "r+" gives me part of the desired result,

Re: [PHP] web-based survey form design : PHP & MySQL

2002-07-25 Thread Analysis &amp; Solutions
On Sun, Jul 21, 2002 at 11:57:25AM -0700, Dipendra Raj Subedi wrote: > > first goal of doing one project "Design web-based > survey" using PHP and MySQL. I would appreciate if > anybody give me some links that help to develope such > skills. Try the various script archives. Good one is php.res

Re: [PHP] Re: newbie form problem

2002-07-25 Thread Analysis &amp; Solutions
On Sun, Jul 21, 2002 at 03:50:15PM -0500, Richard Lynch wrote: > >if (!$MailFromAddress) { > > This should probably be: > > if (!isset($MailFromAddress) || !$MailFromAddress)){ Or better: if ( empty($MailFromAddress) ) { --Dan -- PHP classes that make web design easier

Re: [PHP] CRLF Injection in mail()

2002-07-24 Thread Analysis &amp; Solutions
John: On Fri, Jul 19, 2002 at 11:19:59PM -0400, John Holmes wrote: > Maybe I'm behind the times, but I just found out about this one today. > Basically if a user can take your form that sends an email, and send a > value like "This is my subject\nBcc: [EMAIL PROTECTED]" for the subject, > then th

Re: [PHP] POST question

2002-07-24 Thread Analysis &amp; Solutions
Jadiel: On Sat, Jul 20, 2002 at 12:58:25AM -0500, Jadiel Flores wrote: > header("Location: computer.php"); Do note, proper syntax uses complete URI's, not just the page name. Also, you can do this with single quotes. header('Location: http://www.foo.org/computer.php'); Enjoy, --D

Re: [PHP] vertical word match SOLUTION

2002-07-24 Thread Analysis &amp; Solutions
Hi Joe: On Fri, Jul 19, 2002 at 12:50:53PM -0500, 'Joe Rice' wrote: > > $answer = "hello\na\np\np\nl\ne\n"; /*from textarea in form*/ > /* replace all whitespace and newlines with nothing */ > $tempanswer = preg_replace("/\s*|\n*/","",$answer); Easier: $tempanswer = preg_replace('/\s/', '', $

Re: [PHP] modify an element of a HTML tag within a string

2002-07-24 Thread Analysis &amp; Solutions
Hi Justin: On Fri, Jul 19, 2002 at 01:50:08PM +1000, Justin French wrote: > > 1. look for a given tag eg DIV > 2. capture the tag (everything from '') > 3. look for a given attribute (eg ID="foo", ID=foo, ID='foo' -- all valid > ways) > 4. capture it > 5. be given the opportunity to manipulate t

Re: [PHP] Credit card checks?

2002-07-23 Thread Analysis &amp; Solutions
On Tue, Jul 23, 2002 at 11:17:19AM -0700, Richard Baskett wrote: > > http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm Rick, thanks for the plug. Allow me to plug it further... I updated that page just this minute. So, whomever looked at it in the past (prior to 12:00 am 24 July 2002 EST)

Re: [PHP] XML vs. PHP manual???

2002-07-23 Thread Analysis &amp; Solutions
On Tue, Jul 23, 2002 at 12:33:19PM -0400, Scott Fletcher wrote: > I read the useful document about XML in PHP on > http://www.analysisandsolutions.com/code/phpxml.html. Thanks. But, you mean: http://www.analysisandsolutions.com/code/phpxml.htm > I had to write XML > stuffs on the client-sid

Re: [PHP] ARRAY_PUSH with $key

2002-07-18 Thread Analysis &amp; Solutions
On Fri, Jul 19, 2002 at 01:58:42AM +0300, Pekka Saarinen wrote: > > I think array_push gets you cleaner lookin code (subjective). It also > ensures you always add to end of the array - good for novices like > me. Array_push is also TWO times faster (academic difference in the speeds > of mode

Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 04:28:57PM -0400, Monty wrote: > > Look 4 implode() in the function list > > Implode isn't really what I need, I just want to load an entire file into a > single string variable. Yes, it IS what you need. Plus, to work around your other problems mentioned in later posts.

Re: [PHP] Arrays and Regs

2002-07-18 Thread Analysis &amp; Solutions
Martin: On Thu, Jul 18, 2002 at 03:55:13PM -0400, Martin Clifford wrote: > > Just a performance question, if anyone knows for sure. Within a large > array, would using numerical indices be quicker than associative? I'm > talking about a *noticeable* difference in performance, here. The diff

Re: [PHP] Question about using if elseif ...

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 02:28:23PM -0700, Fargo Lee wrote: > When viewing examples of using if and elseif I often see the example ending > with an else like ... > > if($a == '1'){ > echo '1'; > } elseif ($a == '2'){ > echo '2'; > } else { > echo '0'; > } On a side note, switch would be more effi

Re: [PHP] ARRAY_PUSH with $key

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 03:40:58PM -0400, Joshua E Minnie wrote: > Hey all, > Does anybody know of a way to push an element onto an array with a > specific key? What I am trying to do is create a dynamically created > associative array. Here is a sample print_r of what an array would look >

Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 08:47:45PM +0300, Alberto Serra wrote: > > It's a customer's choice, obviously. Most customers do not give a damn > about minorities (and so do not want to increase budgets to develop an > alternate solution that will address a minor community). What increased cost? If

Re: [PHP] php.ini problem

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 12:55:34PM -0300, Andre wrote: > > The configuration in php.ini seems not to be used by httpd. Make a script with phpinfo() in it and examine which php.ini file is being used. Sounds like you may be accessing the wrong file, even though you're saying you're not. > I'v

Re: [PHP] Code errors

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 11:35:55AM -0400, Chris Crane wrote: > Hey thank Dan, I will try this. > Does List waste lots of time and memory? It does if you don't need to do it. Just put the data you really need into memory. Forget about the rest. If you already have something in memory, don't dup

Re: [PHP] Someone Help please

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 11:06:11AM -0400, Chris Crane wrote: > Well, I posted it the first time and no one responded so I figured the > subject did not interest anyone. I changed it. I am not sure how the third > one started. We're all here volunteering, trying to help each other out. If you wan

Re: [PHP] Code errors

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 10:14:25AM -0400, Chris Crane wrote: > Warning: Undefined offset: 5 in Means your array doesn't have that key in it. I bet you're running into blank lines in your file. > $Results = implode('', file("$LookupURL")); > $Data = explode("\n", $Results); Uh, you do realiz

Re: [PHP] XML with PHP & cURL.

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 11:03:10AM -0400, Scott Fletcher wrote: > Hi! I find it to be mind-boggling to try to make xml work with php and > curl. What do anyone here think of it? Well, I can offer help on the XML: http://www.analysisandsolutions.com/code/phpxml.htm --Dan --

Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Analysis &amp; Solutions
On Thu, Jul 18, 2002 at 03:38:51PM +0200, PHPCoder wrote: > What are the general feeling out there amongst developers about the use > of cookies? Cookies rely on client side. I never rely on the client for anything. When it comes to examples of how to do things "The Right Way," I say go take

Re: [PHP] Importing CSV File : 100000 Rows!

2002-07-17 Thread Analysis &amp; Solutions
On Wed, Jul 17, 2002 at 10:33:50PM -0700, Thomas Edison Jr. wrote: > > Basically the problem is that i have to connect from > my localhost to my MySQL database on the > server/internet. I don't have command prompt access to > the internet database... But, if you have the mysql terminal software

Re: [PHP] Restart process from code?

2002-07-17 Thread Analysis &amp; Solutions
On Wed, Jul 17, 2002 at 02:21:27PM -0400, Noah Spitzer-Williams wrote: > How do I end the process using exec? Is there an equivalent to NET STOP? Inside the exec(), issue whatever commands you'd type into a command line... exec('NET STOP foo'); --Dan -- PHP classes that make w

Re: [PHP] Someone Help please

2002-07-17 Thread Analysis &amp; Solutions
Chris: Geez, this is your third thread on this today... Lame. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L

  1   2   3   4   5   >