Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
D'Oh! You guys are absolutely right. I was trying to go for 6 months, which works now if I say time()+15552000 instead of 15552000. And the documentation shows that exactly - apparently I read right over it, even though I studied it minutely before posting. Oh well...my wife would have the

[PHP] mail() with port authentication

2005-10-05 Thread Brian Dunning
Do I need to use Pear to specify port 587 and authentication when sending mail? I could not find any way to do it using mail(). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [Off] How much time should this take?

2005-09-16 Thread Brian Dunning
I got a 12-hour invoice from a consultant who was tasked to do the following: - Install a Red Hat machine from absolute scratch for PHP/MySQL/Apache - Copy over some MySQL databases - Have mod_rewrite working via htaccess, and have wildcard DNS I realize there are a billion different

[PHP] Accessing images in a protected directory

2005-09-13 Thread Brian
I haven't used .htaccess before and am currently having an issue with it. I have a site that has photos from various events on it. Some of the events need to be password protected to view the photos. They enter a password, it gets checked in the MYSQL database and then the php page tries to

[PHP] Re: mktime

2005-09-12 Thread Brian P. O'Donnell
, $epoch); print($date); // here is the problem, I get 365 days, but the year is 2005, not 2006, same goes for any year I put in. What am I doing wrong? January 0th is December 31st last year Brian Thanks, Dan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] mktime

2005-09-12 Thread Brian P. O'Donnell
January $year); $isLeapYear = date('L', $time); if($isLeapYear == '1') { $days = 366; } else { $days = 365; } ? I'd shorten it up even more: ? $daysinyear = 365 + date(L, strtotime(jan 1 . $year)); ? Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Convert a timestamp to RFC822??

2005-09-10 Thread Brian Dunning
I get my timestamp from the db in this format (I don't have control over this): 2004-05-14 13:24:48 I need to convert it to RFC822 to make it a valid RSS pubDate field like this: Wed, 02 Oct 2002 13:00:00 GMT How can I do that? I'm tearing my hair out here (what's left)... :) -- PHP

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
this code to see what it is on your platform: Brian ? // start with some number you are sure is an integer // make it a really high number to lessen the execution time $i = 21; // if you want to do it on the first try, allow it to run until finished // it will almost certainly take more than

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
M. Sokolewicz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip or, easier, simply make this script: ?php echo PHP_INT_MAX; ? and you're done :P The maximum integer value is stored in PHP_INT_MAX as of 4.4.0 and PHP 5.0.5 before that, you had to use a way as the one Brian

[PHP] Scary nonsense form submissions

2005-09-04 Thread Brian Dunning
something about it? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-03 Thread Brian A. Seklecki
{ RETURN_TRUE; } } /* }}} */ #endif On Fri, 2 Sep 2005, Rasmus Lerdorf wrote: Brian A. Seklecki wrote: Firstly, sorry if this is the wrong list. There are thousands of forums and PHP5 related MLs, but nothing FBSD specific. Second, I wouldn't post if this wasn't happening on two

Re: [PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-03 Thread Brian A. Seklecki
__cplusplus | } | #endif | | int | main () | { | return f != ldap_start_tls_s; | ; | return 0; | } ~BAS On Sat, 3 Sep 2005, Brian A. Seklecki wrote: Rasmus / all: I'll revert to that as path of last resort. The FreeBSD port mechanism for installing php extensions is administratively

Re: [PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-03 Thread Brian A. Seklecki
On Sat, 3 Sep 2005, Rasmus Lerdorf wrote: File a bug at http://bugs.php.net and someone will take a look. Brian A. Seklecki wrote: Done: http://bugs.php.net/34361 FreeBSD PR (CC'd maintainer): ports/85700 http://www.freebsd.org/cgi/query-pr.cgi?pr=85700 NetBSD PR (CC'd

[PHP] FreeBSD php{4,5} w/ LDAP + SSL/TLS ldap_start_tls()

2005-09-02 Thread Brian A. Seklecki
ldap_set_option ldap_parse_result ldap_first_reference ldap_next_reference ldap_rename ldap_set_rebind_proc -- ~ TIA, Brian A. Seklecki Collaborative Fusion, Inc. [EMAIL PROTECTED] 412-422-3463 x 4018 1710 Murray Avenue, Suite 320 Pittsburgh, PA 15217 l8* -lava x.25 - minix - bitnet - plan9

[PHP] Re: Saturdays and Sundays

2005-09-01 Thread Brian P. O'Donnell
Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Is it possible to get the number of saturdays and sundays for a given month / year? Thanks for your help. Here's another way to do it. Each function will return either 4 or 5. If you need both Saturdays and Sundays, just

[PHP] Re: Saturdays and Sundays

2005-09-01 Thread Brian P. O'Donnell
Sorry, I made a mistake. See below: Brian P. O'Donnell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Is it possible to get the number of saturdays and sundays for a given month / year? Thanks for your

Re: [PHP] kein Betreff

2005-08-29 Thread Brian P. O'Donnell
It's bad enough when somebody posts a blank email to the list, but when people start posting blank replies, it gets really frustrating. Please cease desist. Thanks Brian Andy Pieters [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net

[PHP] Weird results of ==

2005-08-23 Thread Brian P. O'Donnell
do I execute only the first block if indeed $a == ($b + $c) ? Thank you for your help. Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Weird results of ==

2005-08-23 Thread Brian P. O'Donnell
That did the trick. Thanks a million. Brian Jasper Bryant-Greene [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Brian P. O'Donnell wrote: ? $a = 252.73; $b = 252.73; $c = 0; if ($a == ($b + $c)) { // do the first thing } elseif ($a ($b + $c)) { // do

[PHP] Automated data upload for customers

2005-08-19 Thread Brian Dunning
there already that could give me a head start? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [Way OFF] Amazing picture of Helios Flight 522

2005-08-15 Thread Brian Dunning
http://www.briandunning.com/helios.shtml Sorry this is WAY OFF TOPIC, but it's a pretty darn scary picture. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
What is the best way to cloak a site - send search engines different content than real users? Yes, I know it's bad practice, and I know the domain will eventually be banned. I've found lots of different methods including huge tables of all the possible client types sent by various spiders.

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
On Aug 11, 2005, at 3:44 PM, Evert | Collab wrote: Use robots.txt 'evil' searchengines will spoof the user-agent string anyway Can you be more specific about what you mean by use robots.txt? I just want to cloak for Google, MSN, and Yahoo. I couldn't care less about what any other search

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
On Aug 11, 2005, at 4:06 PM, Evert | Collab wrote: First hit on google: http://www.searchengineworld.com/robots/robots_tutorial.htm Search engines check for a robots.txt on your site, in the robots.txt file you can specify that certain or all search engines shouldn't index your site I

[PHP] Possible to read JavaScript results into a string?

2005-08-08 Thread Brian Dunning
I have an external JavaScript that I use on several of my sites. It returns a web counter and does some other logging. It's accessed like this: script language=javascript src=http://www.mydomain.com/log.js;/ script No rocket science there, this is common and it works great. That call

[PHP] Timing out a remote call

2005-08-04 Thread Brian Dunning
For one project, I'm required to access a web service for every page. Basically it returns a little bit of random text. I have no control over the web service, and there is no possibility of cacheing or bringing it locally: the requirements are that it be accessed live across the Internet

[PHP] Setting up a new box from scratch?

2005-08-03 Thread Brian Dunning
Hey all - I have an unused Pentium box here, recent, well loaded with RAM and HD. I want to turn it into a LAMP box. Never done that before; is there a preferred one-stop-shop installer CD or anything (easy - knock on wood)? It would be nice to end up with some kind of decent web GUI for

[PHP] How to turn on session.trans.sid?

2005-07-28 Thread Brian Dunning
If an ISP does not give you access to php.ini, is there a way to turn on session.use_trans_sid in the code, maybe at the same time you say session_start()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Still not holding sessions when cookies off.

2005-07-28 Thread Brian Dunning
I'm starting my sessions like this: ini_set('session.use_trans_sid','1'); session_start(); Works fine when cookies are on. Sessions are not being preserved when cookies are off. Is there something else I need to do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I want to create a pixel that can be used to track certain activity on the site. I've got it working fine: I just mod_rewrite spacer.gif to a PHP app that does what I want it to do; but then I don't know how to actually return a blank pixel. Can anyone point me in the right direction? --

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
=imagecolorallocate($im,255,255,255); imagesetpixel($im,1,1,$white); header(content-type:image/jpg); imagejpeg($im); imagedestroy($im); ? I guess this begs the question, why not use session variables to track activity?? Matt Darby Brian Dunning wrote: I want to create a pixel that can be used

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I did some more STFW and came up with this - I'll try it to see if it works. Header( Content-type: image/gif); printf (%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c% c%c%c%c%c%c%c%c%c%c%c%c%c, 71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0

Re: [PHP] AJAX PHP

2005-07-23 Thread Brian V Bonini
On Thu, 2005-07-21 at 08:23, Marco Tabini wrote: We had a webcast on PHP and Ajax a while back--the recordings are still available for free at http://blogs.phparch.com/mt/index.php?p=49. Nice, totally crashes Firefox in Linux. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key

Re: [PHP] PHP 5 Object Inheritance

2005-07-15 Thread Brian V Bonini
On Fri, 2005-07-15 at 17:53, Chris wrote: Yeah, I understand... Is multiple inheritance something that true OOP languages can do? Yes. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] Dynamic Images and File Permissions

2005-07-14 Thread Brian V Bonini
On Thu, 2005-07-14 at 12:09, Adam Hubscher wrote: My questions are this: A) Is there any way to set the permissions on the file on creation of the image? Set umask 002 on the user php is running as. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] recompiling php

2005-07-06 Thread Brian V Bonini
On Wed, 6 Jul 2005, blackwater dev wrote: I have a linux box which I use periodically. I built php 5.0.3 on it and it runs fine. I just came across a situation where I need to compile in the zlib extension so I got into my php folder and did ./configure with my options, then make and make

[PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: select count(*) as `count` from terms; My MySQL account was disabled by my ISP because this

Re: [PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
... On Wed, 6 Jul 2005, Brian Dunning wrote: I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: select count(*) as `count` from terms; My MySQL

Re: [PHP] Help - need to quickly optimize a record count!

2005-07-06 Thread Brian Dunning
, 2005, at 5:51 PM, Richard Lynch wrote: On Wed, July 6, 2005 1:43 pm, Brian Dunning said: I am cross-posting this to the PHP and the MySQL lists because I'm not sure in which technology my solution will lie. I have a pretty busy PHP/MySQL site that executes the following query a lot: Define

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-07-01 Thread Brian V Bonini
On Thu, 2005-06-30 at 10:47, Bob Winter wrote: Brian, Is /www/files/services/ the correct relative path?? You could try using the absolute path to see if it fixes the problem. Also, and maybe more significant, I use tcsh . . . if you use bash this could be the conflict. I see

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-30 Thread Brian V Bonini
On Wed, 29 Jun 2005, Bob Winter wrote: Brian, The script works for me, I should have included the screen input/output, which now follows: Hmmm, this simply does not work for me. Maybe something with my version of php or ssh.. I'm at a loss.. $ php -v PHP 4.3.5 (cli) (built: Apr 30 2004 14

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-29 Thread Brian V Bonini
On Tue, 28 Jun 2005, Bob Winter wrote: Brian, The format of your string that works for me is : $cmd = scp [EMAIL PROTECTED]:$directory/\{$files\} $tmp_dir; $files must be a comma separated string with NO SPACES. Here is my complete test script for your review: START

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-28 Thread Brian V Bonini
On Mon, 2005-06-27 at 20:51, Jasper Bryant-Greene wrote: Brian V Bonini wrote: I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally. Try

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-28 Thread Brian V Bonini
On Mon, 2005-06-27 at 22:04, Bob Winter wrote: Brian, Can you post more of the script? Sure. I also tried {{$files}} and tried calling a shell exclusively like: sh -s 'scp [EMAIL PROTECTED]' Anyway, here's more for the code surrounding the area in question, it's a little hacked up ATM

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-27 Thread Brian V Bonini
On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote: $cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can not make this work inside a php script. Have tried

Re: [PHP] including the result of one query in another query

2005-06-26 Thread Brian V Bonini
On Sun, 2005-06-26 at 06:38, Pedro Quaresma de Almeida wrote: Hi I have two databases, on for aeromodelistas (aeromodelling) and another for Códigos Postais (Postal Codes). I whant to do the following query SELECT CódigoPostal FROM Aeromodelistas WHERE CódigoPostal IN (SELECT

Re: [PHP] a basic array question!

2005-06-25 Thread Brian V Bonini
On Sat, 2005-06-25 at 17:01, bruce wrote: feel kind of foolish posting this.. but i can't seem to figure it out for now.. i have an array, i can do a print_r($foo) and get the following: Array ( [bookmark] = 1 [facets] = Array ( [0] = Array (

[PHP] Can't even make a simple test RSS feed

2005-06-24 Thread Brian Dunning
What am I doing wrong? This doesn't work. The browser does not even load the page, no error or anything: ?php echo '?xml version=1.0?rss version=2.0channel'; echo 'item'; echo 'titlehdfghdf/title'; echo 'descriptiondfghdfh/description'; echo 'linkhttp://somelink/link'; echo '/item'; echo

Re: [PHP] Can't even make a simple test RSS feed

2005-06-24 Thread Brian Dunning
I'm ahead of you there - that's not the problem. IE6 just acts like I didn't request a page. Safari returns a “unknown error” (NSURLErrorDomain:-1). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help recognizing bots?

2005-06-22 Thread Brian Dunning
I'm using the following code in an effort to identify bots: $client = $_SERVER['HTTP_USER_AGENT']; if(!strpos($client, 'ooglebot') !strpos($client, 'ahoo') !strpos ($client, 'lurp') !strpos($client, 'msnbot')) { (Stuff that I do if it's not a bot) } But it doesn't seem to be catching a

[PHP] Sessions

2005-06-15 Thread Brian D. McGrew
Greetings from San Diego! I call session_start() on all my pages and then ? echo session_id(); ? and everything is the same from all the pages. However if I stuff a variable into $_SESSION it's never transferred between pages. So if I do a ? $_SESSION[Username] = Brian; ? and then go

[PHP] Anyone ever upgraded PHP at GoDaddy?

2005-06-15 Thread Brian Dunning
GoDaddy's Virtual Dedicated Servers come with PHP 4.2 - anyone ever upgraded this to 4.3 or later? I've never done any command line stuff or anything like that - is there an easier way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Anyone ever upgraded PHP at GoDaddy?

2005-06-15 Thread Brian Dunning
On Jun 15, 2005, at 2:28 PM, Greg Donald wrote: Make yourself a phpinfo() page. Your PHP configuration will be at the top of the page. You can use that configure line to build/upgrade to a newer PHP. I see that, thanks - but if you'll forgive an ignorant question, what do I do with that

Re: [PHP] Is there a big speed difference...

2005-06-12 Thread Brian Dunning
On Jun 11, 2005, at 6:24 PM, Richard Lynch wrote: Have you actually tried it yet, either way? Cuz I suspect you are worrying over a lot of nothing... I did post the results a couple of days ago. Switching to a function made an enormous difference. It went from an average of 45 seconds to

[PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
I have an include file with about 6 lines of code, just text parsing. If I have to loop through 5000 records, is there a big difference between (a) calling this include file 5000 times, and (b) defining a function and just calling the function 5000 times? -- PHP General Mailing List

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 9:48 AM, bruce wrote: bian... giave a psuedocode example of what you're trying to compare.. i think i know what you're asking, but i want to be sure.. OK, this is *pseudocode* remember... :) Is either of these SIGNIFICANTLY slower: === Example 1 === while(loops

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 9:44 AM, Jochem Maas wrote: or (c) just placing the code inside the loop - no function call , no include, just wash and go ;-) - whichever is faster of (a) and (b), my (c) will be faster still. :-) I agree (c) would be swell but this is a function that I call from many

Re: [PHP] Is there a big speed difference...

2005-06-09 Thread Brian Dunning
On Jun 9, 2005, at 10:54 AM, Jochem Maas wrote: unless you intend to make a call to your function from inside the include file, No, the question is which of the two to use, not both. :) I've built a version that uses a function, will test, and will post the results. -- PHP General

Re: [PHP] looping through an array problem

2005-06-05 Thread Brian V Bonini
: The New York Times: Sunday Styles The New York Sun Metro NY The New York Sun I'd like to stop the NY Sun from appearing twice! What have i missed here? SELECT DISTINCT publisher.publisher_name etc... ?? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC

Re: [PHP] Re: stripping html tags

2005-06-05 Thread Brian V Bonini
. The prototype says you cam specify exceptions to the function. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux

Re: [PHP] Re: stripping html tags

2005-06-05 Thread Brian V Bonini
On Sun, 2005-06-05 at 18:13, Dotan Cohen wrote: On 6/6/05, Brian V Bonini [EMAIL PROTECTED] wrote: On Sun, 2005-06-05 at 16:05, Dotan Cohen wrote: I don't want to strip out all the tags, just certain ones. But the problem turned out not to be in this peice of code- the script simply

Re: [PHP] How to find random records in a subset?

2005-06-03 Thread Brian Dunning
On Jun 3, 2005, at 6:48 AM, Marek Kilimajer wrote: Brian Dunning wrote: I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, why can't you use the where condition in the above query

[PHP] What are these weird variables??

2005-06-03 Thread Brian Dunning
I'm using a class that I downloaded, and to access the database it uses variable names in all caps, like this: if(!defined(MAGPIE_DBUSER)) define(MAGPIE_DBUSER, brian); ... $dbuser = MAGPIE_DBUSER; ... $dbh = mysql_connect($dbhost,$dbuser,$dbpass); And it works fine. But I already

[PHP] How to find random records in a subset?

2005-06-02 Thread Brian Dunning
I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, and then use MySQL's in command to find them. I can't use order by rand() due to its performance hit. But I have to take it one more step: I

RE: [PHP] Replacing 2 strings

2005-05-30 Thread Brian V Bonini
at it a million times.. I knew there had to be something to do that -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http

RE: [PHP] Replacing 2 strings

2005-05-30 Thread Brian V Bonini
usually work through the logic but am not familiar enough with PHP to know what's available to work with -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu

RE: [PHP] Replacing 2 strings

2005-05-30 Thread Brian V Bonini
On Mon, 2005-05-30 at 15:24, Murray @ PlanetThoughtful wrote: This is a great help, thanks to both. One question I have though. How do I just leave the formatting as is? In the loop you gave me, Brian...: [snippage] I can't see how I can disregard strtolower without disrupting

Re: [PHP] Replacing 2 strings

2005-05-30 Thread Brian V Bonini
On Mon, 2005-05-30 at 16:24, W Luke wrote: On 30/05/05, Brian V Bonini [EMAIL PROTECTED] wrote: [...] Again, an example that is as close to your real-world needs as possible would be very helpful. The original request was: the text-to-replace is just in a var named $text1

Re: [PHP] Replacing 2 strings

2005-05-29 Thread Brian V Bonini
$string; } $text1 = '^JIM_JONES'; echo replace($text1); ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] include file and problems with headers

2005-05-27 Thread Brian V Bonini
include 'status.php'; ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825

Re: [PHP] how to convert char into number

2005-05-27 Thread Brian V Bonini
On Wed, 2005-05-25 at 16:11, Jeremy Reynolds wrote: What function do I use to convert an ASCII character into it's equivalent number? -- Sorry, I think my spam filters got any responses. If you replied, could you please resend it to me? ord() -- PHP General Mailing List

Re: [PHP] how to convert char into number

2005-05-27 Thread Brian V Bonini
On Wed, 2005-05-25 at 16:01, Jeremy Reynolds wrote: What function do I use to convert an ASCII character into it's equivalent number? ord() -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

[PHP] Rusty's Magpie mod to cache to database

2005-05-27 Thread Brian Dunning
Has anyone ever used Russ Johnston's modified Mapgpie RSS to cache to a database? I'm trying to, but no records are being written to the database - just wondering if anyone's had success. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] update blues

2005-05-21 Thread Brian V Bonini
of member.php look like? And what's at line 212 +/- in db_fns.php -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx

Re: [PHP] Getting parameters from a URL coming from outside the site

2005-05-20 Thread Brian V Bonini
($fp, $content); fclose($fp); header(Location: http://foobar.com/test.txt;); ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info

[PHP] Dwonloading a file

2005-05-18 Thread Brian Dunning
I need to write a cron job that retrieves a zipped XML file via FTP, unzips it, and then imports the XML into MySQL. I haven't done any of these three specific functions yet. Before I tear my hair out on each of these functions, can anyone point me to a simple example of any or all three?

Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Brian V Bonini
(); header(Cache-control: private); $_SESSION['test'] = testing; echo 'pre'; print_r($_SESSION); echo \nSession Id: . session_id(); echo \n . strip_tags(SID); echo '/pre'; ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] Re: Sending a string with $_POST/$_GET

2005-05-18 Thread Brian V Bonini
/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP

Re: [PHP] Building array ?

2005-05-18 Thread Brian V Bonini
On Wed, 2005-05-18 at 12:00, Paul Nowosielski wrote: HI All, I'm trying to build an array of user id's. This is the code I've written that does not work. while($row=mysql_fetch_array($result)){ // put user ID's into an array; $uidToAdmin .= array ($row[user_id]); // for

Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
that... Then start Apache, and triple check ?php phpinfo();? shows the php.ini file being read from the same directory you edited php.ini Yup Still no go... Other changes in php.ini DO take effect, just not this I'm at a loss -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC

Re: [PHP] counting ocuring words in a string

2005-05-17 Thread Brian V Bonini
array contains for example 'air' which will match both 'air' and 'fair', -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx

[PHP] PHP Applications?

2005-05-17 Thread Brian Dunning
Hi all - My background is mostly with Lasso. One cool feature is the ability to make LassoApps - single file applications that are secure and can be sold distributed without providing access to the source. Does PHP offer any such capability? - Brian -- PHP General Mailing List (http

Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
On Tue, 2005-05-17 at 09:53, Jason Barnett wrote: Brian V Bonini wrote: ... Still no go... Other changes in php.ini DO take effect, just not this I'm at a loss By any chance are you changing PHP values through Apache's conf file? I am, in ANOTHER virtual hosts container

Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
On Tue, 2005-05-17 at 15:58, Richard Lynch wrote: On Tuesday 17 May 2005 21:01, Brian V Bonini wrote: Still no go... Other changes in php.ini DO take effect, just not this I'm at a loss Does phpinfo() show trans_sid as on or off? Shows it as 0 or 1 depending on how I set

Re: [PHP] Re: why are session only working with cookies?

2005-05-16 Thread Brian V Bonini
= htmlentities($quote_result[$user_quotes]); $name = $author_result[$user_quotes]; } $proc-setParameter('', 'quote', $quote); $proc-setParameter('', 'name', $name); $output = $proc-transformToXML($xml); ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] Special characters

2005-05-16 Thread Brian V Bonini
On Mon, 2005-05-16 at 12:23, Carlos Palomino wrote: Hi everyone, I have just begun writing PHP web-pages and I have come across an interesting issue. Whenever I use special characters within my code such as: a ©, the character displays as a ?. Because that's not valid HTML... See:

[PHP] Including SSI in your PHP scripts

2005-05-16 Thread Brian
Is there any possible way to use my sitewide include files which have SSI in them in a PHP script, such as phpBB, with PHP installed as a cgi? I see there is a virtual() function which is intended to mimick apache's virtual include, however it does not work as a CGI. Thanks in advance, Brian

Re: [PHP] DOMDocument and html doctype

2005-05-14 Thread Brian V Bonini
($pattern, $doc-saveHTML(), $matches); echo 'lt;' . $matches[0] . 'gt;'; ? -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx

Re: [PHP] Re: why are session only working with cookies?

2005-05-14 Thread Brian V Bonini
On Fri, 2005-05-13 at 23:31, Jason Wong wrote: On Saturday 14 May 2005 09:42, Brian V Bonini wrote: Yeah, I know session support is there and I DO NOT have it set to use ONLY cookies. But if I disable cookies in the browser stuff relying on sessions stops working. I'm using 5.0.3

RE: [PHP] DOMDocument and html doctype

2005-05-14 Thread Brian V Bonini
On Sat, 2005-05-14 at 07:57, Jared Williams wrote: Hi, I've used loadHTML() to read a HTML file to DOM. This file starts with a string like !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN Do someone know how I can access this string? By reading the doctype back from

Re: [PHP] DOMDocument and html doctype

2005-05-14 Thread Brian V Bonini
On Sat, 2005-05-14 at 16:08, Johannes Findeisen wrote: On Saturday 14 May 2005 16:25, Brian V Bonini wrote: ?php $html = EOS !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN htmlbodyTestbr/body/html EOS; $pattern = '!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01

RE: [PHP] DOMDocument and html doctype

2005-05-14 Thread Brian V Bonini
On Sat, 2005-05-14 at 13:03, Jared Williams wrote: On Sat, 2005-05-14 at 07:57, Jared Williams wrote: Hi, I've used loadHTML() to read a HTML file to DOM. This file starts with a string like !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN Do someone

Re: [PHP] Hello, I'm new...

2005-05-13 Thread Brian V Bonini
, David Lane. I would like to create a 'community' website and was wondering if there was a framework available to get me started? Google for mambo or php nuke -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] Re: Strange comparison behaviour

2005-05-13 Thread Brian V Bonini
; for($i=0; $i$len; $i++) { $ord_value = ord($string[$i]); echo chr($ord_value) . = . $ord_value . \n; } echo '/pre'; ? Anyway, I suspect using ($string === 0) will give you the expected results. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID

[PHP] session wierd in Konqueror

2005-05-13 Thread Brian V Bonini
session_start(); header(Cache-control: private); // IE 6 Fix $user_quotes = $_SESSION['user_quotes']; if (!isset($user_quotes) || $user_quotes = count($quote_result) - 1) { $user_quotes = 0; } else { $user_quotes++; } echo pre; echo $_SESSION['user_quotes'] . \n; print_r($_SESSION); echo

Re: [PHP] domxml problem

2005-05-13 Thread Brian V Bonini
On Fri, 2005-05-13 at 10:31, Georgi Ivanov wrote: But it gives me error on this line : $DomDocument = domxml_open_file($file); What's the error? Try: $dom = dom_xml_file($file); -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu

Re: [PHP] php works in IE not Firefox?

2005-05-13 Thread Brian V Bonini
;; Query time: 139 msec ;; SERVER: 192.168.15.1#53(192.168.15.1) ;; WHEN: Fri May 13 16:34:42 2005 ;; MSG SIZE rcvd: 137 /snip -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver

[PHP] why are session only working with cookies?

2005-05-13 Thread Brian V Bonini
Everything in php.ini seems to be correct. Is there soem thign I'm supposed to pass to 'configure' at compile time? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] solved::session wierd in Konqueror

2005-05-13 Thread Brian V Bonini
This is solved... --original-- session_start(); header(Cache-control: private); // IE 6 Fix $user_quotes = $_SESSION['user_quotes']; if (!isset($user_quotes) || $user_quotes = count($quote_result) - 1) { $user_quotes = 0; } else { $user_quotes++; } echo pre; echo

Re: [PHP] Hello, I'm new...

2005-05-13 Thread Brian A Anderson
Think he means a CMS || Forumpackage || Portal package? www.opensourcecms.com -brian - Original Message - From: Jason Barnett [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Friday, May 13, 2005 3:20 PM Subject: Re: [PHP] Hello, I'm new... [EMAIL PROTECTED] wrote: I would

<    1   2   3   4   5   6   7   8   9   10   >