[PHP] Re: using cookies

2004-05-09 Thread Aidan Lister
Hi, Richards email was kinda wierd, so I'll reply to your email directly Hi, all -- I guess I need a primer on cookie usage. I've read the manual regarding setcookie and have gone back to look at everything having to do with cookies on this list in the past few months (it seems that I'm

Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Aidan Lister
Richard, I think you need to read the questions more accurately - your last two replies have been somewhat incorrect Richard Harb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM

Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Aidan Lister
Ooops, actually he was pretty ambiguous, please disregard my previous comment :) Richard Harb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM Hello, I was just trying this

[PHP] Re: $myobject-$$varname doens't work ??

2004-05-09 Thread Aidan Lister
Greg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I was just trying this but it doesn't work : ?php class a { public $foo = hello world; } $obj = new a(); $varname = foo; echo $obj-$$varname; $$varname is turned into $foo, what is the value of $foo? If you're

[PHP] Re: $myobject-$$varname doens't work ??

2004-05-09 Thread greg
Good luck, welcome to oop :) PHP 5 is great ! :D My favorites are __get() and __set() It allows a very flexible programmation and a very simple programmation when using huge objects correctly implemented. Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Strange mails...

2004-05-09 Thread greg
Each time I post a message on p.general, i receive two strange mails from ADVANCE CREDIT SUISSE BANK. What's this spam ? It looks like an auto-responder is subscribed on the newsgroup. Spammers really s*x ! Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] preg_replace to delete all js code in string help needed

2004-05-09 Thread Dave Carrera
$text2 = preg_replace(/script[^]+.*?\/script/is,,$text2); Leaves output with language=javascript blah blah Dose anyone know of a pattern that will get rid of ALL javascript from a string. Thank you for any help Dave Carrera --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus

[PHP] icmp echo / ping

2004-05-09 Thread news.php.net
Hi, I was wondering if it's possible to issue a icmp echo / ping without actually using the ping program supplied with the operating system. Anyone has an idea? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: icmp echo / ping

2004-05-09 Thread Aidan Lister
Yep, check out: http://pear.php.net/net_ping News.Php.Net [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I was wondering if it's possible to issue a icmp echo / ping without actually using the ping program supplied with the operating system. Anyone has an idea? Thanks in

Re: [PHP] preg_replace to delete all js code in string help needed

2004-05-09 Thread Curt Zirzow
* Thus wrote Dave Carrera ([EMAIL PROTECTED]): $text2 = preg_replace(/script[^]+.*?\/script/is,,$text2); Leaves output with language=javascript blah blah I tested that and it strips the script tags with language too. I do know that it will not strip script tags that have no attributes:

[PHP] Putting a stop in a foreach

2004-05-09 Thread Verdon Vaillancourt
Hi :) I'm trying to put a stop in a foreach statement following the user suggestion here, php.net/manual/en/control-structures.foreach.php Not really knowing what I am doing, I am running into some synatx problems. I'm sure I'm doing something really stupid, can anybody point it out? This is

[PHP] Re: Putting a stop in a foreach

2004-05-09 Thread Torsten Roehr
Verdon Vaillancourt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi :) I'm trying to put a stop in a foreach statement following the user suggestion here, php.net/manual/en/control-structures.foreach.php Not really knowing what I am doing, I am running into some synatx problems.

[PHP] Re: Putting a stop in a foreach

2004-05-09 Thread Torsten Roehr
This is my attempt to count items and put a stop in the foreach so it only returns 5 items. foreach ($this-_content as $n = $item) { if ($n==5) break; } else if ($this-_content[$n] = $item['type'] == 'item'){ $elements['ITEM_LINK'] =

[PHP] Re: Putting a stop in a foreach

2004-05-09 Thread Aidan Lister
Simple! $i = 0; foreach ($foos as $foo) { // do stuff $i++; if ($i 5) break; } Cheers Verdon Vaillancourt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi :) I'm trying to put a stop in a foreach statement following the user suggestion here,

Re: [PHP] Putting a stop in a foreach

2004-05-09 Thread Verdon Vaillancourt
Hmm, yes I see. Thank you. I guess what I should look at then is getting the key value (internal counter/pointer) in the array going to the foreach. Like this example... $a = array( 1,2,3,17 ); $i =0;/* for illustrative purposes only */ foreach ( $a as $v ) {    echo \$ a[$i ]= $v. \n ;    $i

[PHP] RE: preg_replace to delete all js code in string help needed

2004-05-09 Thread Dave Carrera
Thanks Greg, That sorted that out nicely :-) Dave Carrera -Original Message- From: greg [mailto:[EMAIL PROTECTED] Sent: 09 May 2004 14:17 To: Dave Carrera Subject: Re: preg_replace to delete all js code in string help needed Dave Carrera wrote: $text2 =

Re: [PHP] Re: protecting web page

2004-05-09 Thread Daniel Clark
I agree. Once the screen, text, or picture is on the clients machine they have a copy of it. Petr U. wrote: On Sat, 08 May 2004 21:00:43 -0500 Anguz [EMAIL PROTECTED] wrote: Do you know any solution that can help me. I've find an application named HTML guard but it only work for

php-general Digest 9 May 2004 16:11:30 -0000 Issue 2753

2004-05-09 Thread php-general-digest-help
php-general Digest 9 May 2004 16:11:30 - Issue 2753 Topics (messages 185727 through 185747): using cookies 185727 by: David T-G 185729 by: Richard Harb 185731 by: Aidan Lister $myobject-$$varname doens't work ?? 185728 by: greg 185730 by: Richard

Re: [PHP] Putting a stop in a foreach

2004-05-09 Thread Curt Zirzow
* Thus wrote Verdon Vaillancourt ([EMAIL PROTECTED]): Hi :) This is the original statement that works... foreach ($this-_content as $item) { if ($item['type'] == 'item'){ .. ok. good so far. This is my attempt to count items and put a stop in the foreach so it only returns 5

Re: [PHP] protecting web page

2004-05-09 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): Hi, i'm designing a web application and i want to protect my web page from printing and if possible want to protect source code too. You can prevent the average joe from printing by putting some css in your document: @media print { body {

Re: [PHP] Strange mails...

2004-05-09 Thread Daniel Clark
Yep. I'm getting it too. Each time I post a message on p.general, i receive two strange mails from ADVANCE CREDIT SUISSE BANK. What's this spam ? It looks like an auto-responder is subscribed on the newsgroup. Spammers really s*x ! Greg -- PHP General Mailing List (http://www.php.net/) To

[PHP] feof Question

2004-05-09 Thread Harish
Hi I am using Linux, Apache, MySql, PHP. In the below mentioned code example when the counter data that is displayed on the screen going to a indefinite loop. The file that is read has got sufficient permissions. What are the reasons and how do I tackle the

Re: [PHP] Re: Putting a stop in a foreach

2004-05-09 Thread Curt Zirzow
* Thus wrote Torsten Roehr ([EMAIL PROTECTED]): Sorry, I mixed up the for and the foreach syntaxes. Here my (hopefully correct) loop proposal: for ($i; $i 5; $i++) { for($i=0; ...) I wouldn't suggest this method, it is making the assumption that the indexes are numeric and sequenced from

Re: [PHP] feof Question

2004-05-09 Thread Petr U.
On Sun, 9 May 2004 22:00:53 +0530 Harish [EMAIL PROTECTED] wrote: ?php $fp = fopen( 't.txt', 'r' ); while( !feof( $fp ) ) { print fgets( $fp ); echo $counterval++; if($counterval%100==0) { flush(); } } fclose( $fp ); ? Modify your code

Re: [PHP] feof Question

2004-05-09 Thread Curt Zirzow
* Thus wrote Harish ([EMAIL PROTECTED]): Hi I am using Linux, Apache, MySql, PHP. In the below mentioned code example when the counter data that is displayed on the screen going to a indefinite loop. The file that is read has got sufficient permissions.

Re: [PHP] Re: Putting a stop in a foreach

2004-05-09 Thread Torsten Roehr
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr ([EMAIL PROTECTED]): Sorry, I mixed up the for and the foreach syntaxes. Here my (hopefully correct) loop proposal: for ($i; $i 5; $i++) { for($i=0; ...) I wouldn't suggest this method,

[PHP] Re: Putting a stop in a foreach - SOLVED

2004-05-09 Thread Verdon Vaillancourt
Hi Torsten, Aidan and Matt Both of Torsten's and Aidan's suggestions worked, though the number of returned results using Aidan's method isn't what I expected. This could be the result of something else and I'm trying to puzzle out why. Matt helped clarify my basic misunderstanding in what the

[PHP] Re: Graphical calendar

2004-05-09 Thread Manuel Lemos
Hello, On 05/08/2004 02:59 PM, Todd Cary wrote: Works like a champ! Question: has anyone extended the class so that when one clicks on a day, the year, month, day is returned? You can use the example sub-class and change it to change the cell data that is stored in $columndata[data] to be a

[PHP] hash with RIPEMD-160

2004-05-09 Thread Dennis Gearon
Please CC me as I am on digest. Anyone using RIPEMD-160 for hashing in PHP? Is it part of Apache or the underlying OS? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Clean Open Source PHP extranet app?

2004-05-09 Thread david david
Hello, I am looking to create a simple extranet type application similar to http://www.basecamphq.com/ written by 37signals. Basically I just need a way for users to share files/projects/messages. In fact, I would just go ahead and pay for Basecamp except that it's closed source and it's only

[PHP] Curl cookies

2004-05-09 Thread Jason Morehouse
Has anyone tried using curl to fetch a web page and cookies? ? $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,

Re: [PHP] Clean Open Source PHP extranet app?

2004-05-09 Thread John W. Holmes
david david wrote: I am looking to create a simple extranet type application similar to http://www.basecamphq.com/ written by 37signals. Basically I just need a way for users to share files/projects/messages. Maybe PHProjekt? http://www.phprojekt.com/ I'm sure hotscripts.com will have others.

[PHP] Does this directory detection script work for you?

2004-05-09 Thread John W. Holmes
Hello. I'm relying on the following code so that a script can automatically detect where it's installed and create paths and URLs from the information. This way absolute paths and URLs are always used. I've had a couple people report that the script wasn't finding the paths correctly, though,

Re: [PHP] Clean Open Source PHP extranet app?

2004-05-09 Thread Justin French
On 10/05/2004, at 9:11 AM, david david wrote: Hello, I am looking to create a simple extranet type application similar to http://www.basecamphq.com/ written by 37signals. Basically I just need a way for users to share files/projects/messages. In fact, I would just go ahead and pay for Basecamp

[PHP] PHP /\ UML

2004-05-09 Thread Matthias H. Risse
Hi, I wonder if anyone here is aware of UML Tools for PHP? I know of ArgoUML whichs PHP-codegenerator seems to be very beta. Maybe there are or are planned and well intergrated plugins for Zend Studio, PHPEd, TruStudio/Eclipse or alike? Basically I would be interrested in a solution that really

[PHP] exclude_once(); ?

2004-05-09 Thread Matthias H. Risse
Hi again! Question: Does anyone know of a possibility to exclude files which have been included _before_ my script starts on the fly (e.g. at the first lines after the entrypoint) ? Reasons: This ISP of my customer somehow includes a bunch of old PEAR files by default which I dont need or of

Re: [PHP] Re: using cookies

2004-05-09 Thread David T-G
Aidan (and Richard and others) -- ...and then Aidan Lister said... % % Hi, Hi! % % Richards email was kinda wierd, so I'll reply to your email directly Thanks :-) And, while I appreciated it, I didn't get a lot from it. Of course, this one basically says just read the manual, so I'm not

Re: [PHP] exclude_once(); ?

2004-05-09 Thread Justin French
On 10/05/2004, at 11:27 AM, Matthias H. Risse wrote: Hi again! Question: Does anyone know of a possibility to exclude files which have been included _before_ my script starts on the fly (e.g. at the first lines after the entrypoint) ? Reasons: This ISP of my customer somehow includes a bunch of

Re: [PHP] Does this directory detection script work for you?

2004-05-09 Thread Richard Harb
Hello, I see one potential problem with this detection in one special case. This will only occur if you use Apache's feature PATH_INFO. There $current_page will be inaccurate as the scriptname might be /index.php but the URL could be /index.php/path/to/mypage or just /index/path/to/mypage -

[PHP] thumbnail problems

2004-05-09 Thread Ninti Systems
I've searched the archives on this and, while I have turned up some tips, they don't seem to solve my problem. I an building a website for an indigenous organisation where jpg images are uploaded, resized to a standard format, and thumbnails also generated at the same time (so that is two resizes

Re: [PHP] Curl cookies

2004-05-09 Thread Curt Zirzow
* Thus wrote Jason Morehouse ([EMAIL PROTECTED]): Has anyone tried using curl to fetch a web page and cookies? ? $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, 'http://www.php.net'); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch,

Re: [PHP] Does this directory detection script work for you?

2004-05-09 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]): I've had a couple people report that the script wasn't finding the paths correctly, though, so I'm asking if people could test this out on their server and see if it detects the paths or not. works fine with freebsd/apache-1.3.x/php5rc1

Re: [PHP] thumbnail problems

2004-05-09 Thread Curt Zirzow
* Thus wrote Ninti Systems ([EMAIL PROTECTED]): I read somewhere that memory limitations could cause this, but still, it only happens sometimes and not others. We are on a crowded shared server I think. A quick sample of sizes of images does back this thoery up. Most pictures I sampled, the

[PHP] List() help

2004-05-09 Thread PHPDiscuss - PHP Newsgroups and mailing lists
I'm using list like list($a,$b,$c,$d) = $MyArray MyArray holds more than three items, 0-4 more, my problem is that $d only gets one and I lose the others if more tha one extra. I know I can just add more $e,f,g,h,i but how do I get the extras into an array? TIA RGauthier -- PHP General Mailing

[PHP] $_SESSION - Learning

2004-05-09 Thread Ross Bateman
Hi I am finally starting to try and use register_globals = off on my Servers. This means a lot of code that has to be checked and changed. Unfortunatly I am struggeling to come to grips with this new concept (new to me that is) and was wondering if anybody could give me some pointers. Getting

php-general Digest 10 May 2004 05:31:41 -0000 Issue 2754

2004-05-09 Thread php-general-digest-help
php-general Digest 10 May 2004 05:31:41 - Issue 2754 Topics (messages 185748 through 185774): Re: Putting a stop in a foreach 185748 by: Curt Zirzow 185752 by: Curt Zirzow 185755 by: Torsten Roehr Re: protecting web page 185749 by: Curt Zirzow Re: Strange

Re: [PHP] List() help

2004-05-09 Thread Adam Bregenzer
On Sun, 2004-05-09 at 21:13, PHPDiscuss - PHP Newsgroups and mailing lists wrote: I'm using list like list($a,$b,$c,$d) = $MyArray MyArray holds more than three items, 0-4 more, my problem is that $d only gets one and I lose the others if more tha one extra. I know I can just add more

[PHP] Re: Does this directory detection script work for you?

2004-05-09 Thread Aidan Lister
Hi, I use the following class to get Path information: http://ircphp.com/users/imho/?file=Path.php Let me know if this is helpful at all John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. I'm relying on the following code so that a script can automatically

[PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread greg
Hello, I was just trying this but it doesn't work : ?php class a { public $foo = hello world; } $obj = new a(); $varname = foo; echo $obj-$$varname; $bar = this is working; $varname = bar; echo $$varname; // display this is working as expected ? Is it a bug or is it normal ? I didn't find

Re: [PHP] using cookies

2004-05-09 Thread Richard Harb
-Original Message- From: David T-G Sent: Sunday, May 9, 2004, 6:09:06 AM Hi, all -- I guess I need a primer on cookie usage. I've read the manual regarding setcookie and have gone back to look at everything having to do with cookies on this list in the past few months (it seems that

Re: [PHP] $myobject-$$varname doens't work ??

2004-05-09 Thread Richard Harb
Try echo $obj-$varname; -Original Message- From: greg Sent: Sunday, May 9, 2004, 9:21:52 AM Hello, I was just trying this but it doesn't work : ?php class a { public $foo = hello world; } $obj = new a(); $varname = foo; echo $obj-$$varname; $bar = this is working;