[PHP] Object Oriented Programming in PHP

2004-06-24 Thread Eric Marden
I'm interested in getting up to speed on OOP in PHP can anyone recommend some good titles for me to pick up? Thanks! --- eric marden http://xentek.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Object Oriented Programming in PHP

2004-06-24 Thread Chris Shiflett
--- Eric Marden [EMAIL PROTECTED] wrote: I'm interested in getting up to speed on OOP in PHP can anyone recommend some good titles for me to pick up? George Schlossnagle gave a good talk on this last night at NYPHP. His slides aren't up yet, but they should appear here soon:

Re: [PHP] SQL Case sensitivity

2004-06-24 Thread Evan Nemerson
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html should do the trick, provided you're using MySQL. On Wednesday 23 Jun 2004 20:14, Gabe wrote: I hope I don't get too chastised for a double post ( posted in .db first ), but I'm hoping someone can help me. I'm using PHP with ADOdb ( and

Re: [PHP] Sort a text string by last word before separator

2004-06-24 Thread Evan Nemerson
If I were you I'd use preg_match_all() so you get the first and last name as separate elements, then use usort() to create a custom sorting function based on strnatcasecmp() Be careful about middle names and the such. On Thursday 24 Jun 2004 04:38, Andre Dubuc wrote: Given a text string:

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-24 Thread Marek Kilimajer
Curt Zirzow wrote --- napsal:: * Thus wrote Marek Kilimajer: Chris wrote --- nap?sal:: if anyone can, would you please explain why the below code does what it does? I would expect $this-test in TestInstance to refer to the inherited $test from Test. Using php5RC3. Thanks. ?php abstract class

[PHP] Holding links in a database

2004-06-24 Thread Shaun
Hi, I have created a site that is begining to accumulate a large number of pages. I have been considering holding links to all pages in a database so that the sub menus alter dynamically rather than being hand coded. Has anyone else done this... Many thanks for your thoughts/comments -- PHP

Re: [PHP] TIFF display problem...

2004-06-24 Thread Richard Harb
Are you certain there are no other characters being sent (introduced by the addition) in the 'body' beside the image? Will you get any output (characters and all) if you request the image file directly - without embedding it into a page using img src or whatever? While I have used only the

Re: [PHP] TIFF display problem...

2004-06-24 Thread Richard Harb
Argh, I see your problem was already solved (answers haven't been listed as one thread, so I missed em). Oh well. -Original Message- Sent: Thursday, June 24, 2004, 11:58:15 AM Are you certain there are no other characters being sent (introduced by the addition) in the 'body' beside the

[PHP] Site changes

2004-06-24 Thread Thies
attachment: vbpireiyph.bmp-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Optimize simple file XOR code

2004-06-24 Thread Marcus Johansson
Hi! I'm using a very simple algorithm to encrypt files sent from the server On Demand. The algorithm uses XOR for the encryption. My problem is that the code is very slow, it can only process about 40 KB per second on my system, so my question is, is there any more speed optimized way to write

[PHP] Multipart Email Problem

2004-06-24 Thread Matt MacLeod
I have a script that sends a multipart email from a php page. The script appears to work fine on my mail client (Mail on Mac OSX) and on an online email reader (mail2web.com). However a colleague using Outlook on Windows 2003 views the whole email (ie the raw code - both the text only and the

Re: [PHP] Multipart Email Problem

2004-06-24 Thread Alister Bulman
On Thu, 24 Jun 2004 12:27:17 +0100, Matt MacLeod [EMAIL PROTECTED] wrote: I have a script that sends a multipart email from a php page. The script appears to work fine on my mail client (Mail on Mac OSX) and on an online email reader (mail2web.com). However a colleague using Outlook on

Re: [PHP] Optimize simple file XOR code

2004-06-24 Thread Marcel Tschopp
Hi Marcus Try this: function CryptFile($hash, $filename) { // The key used is generated using another function. // Since this function is only called once it has // nothing to do with the performance of this function $key = GenerateKey($hash); $keylen = strlen($key =

[PHP] ibill.com

2004-06-24 Thread Syed Ghouse
Hi All Any body tell me how to use ibill.com payment site for my project

RE: [PHP] PHP+GD on FreeBSD 5.1

2004-06-24 Thread Jay Blanchard
[snip] I have been having an extremely difficult getting PHP installed with GD support on a FreeBSD 5.1 system. While I can get the default GD package installed, I can't seem to get it installed with JPEG support. Does anyone know of any good tutorials or instructions for people with basic

RE: [PHP] Holding links in a database

2004-06-24 Thread Jay Blanchard
[snip] I have created a site that is begining to accumulate a large number of pages. I have been considering holding links to all pages in a database so that the sub menus alter dynamically rather than being hand coded. Has anyone else done this... [/snip] Yes. -- PHP General Mailing List

RE: [PHP] Holding links in a database

2004-06-24 Thread webmaster
Quoting Jay Blanchard [EMAIL PROTECTED]: [snip] I have created a site that is begining to accumulate a large number of pages. I have been considering holding links to all pages in a database so that the sub menus alter dynamically rather than being hand coded. Has anyone else done this...

RE: [PHP] Optimize simple file XOR code

2004-06-24 Thread Marcus Johansson
Wow! That REALLY did make a great difference! Encoding a file of 2MB took 50 seconds before, now it is done in 1 (ONE) second! My Key is 8192 bytes long, is that the reason for why it so much faster for me? I don't really get how it works, but I guess I will figure it out. Thank you very much!

RE: [PHP] Holding links in a database

2004-06-24 Thread Jay Blanchard
[snip] Quoting Jay Blanchard [EMAIL PROTECTED]: [snip] I have created a site that is begining to accumulate a large number of pages. I have been considering holding links to all pages in a database so that the sub menus alter dynamically rather than being hand coded. Has anyone else done

[PHP] max upload size

2004-06-24 Thread me2resh
hi there i am trying to make a script to upload files to a specific directory on my server i already made it but there is a problem with max file size, i want to upload files with sizes up to 500 MB i know that the only solution for this is to use FTP client embeded on the page can anyone

[PHP] R: [PHP] Holding links in a database

2004-06-24 Thread Alessandro Vitale
I'd like to apply! A. -Messaggio originale- Da: Jay Blanchard [mailto:[EMAIL PROTECTED] Inviato: giovedi 24 giugno 2004 14.00 A: [EMAIL PROTECTED]; Shaun Cc: [EMAIL PROTECTED] Oggetto: RE: [PHP] Holding links in a database [snip] Quoting Jay Blanchard [EMAIL PROTECTED]: [snip] I

[PHP] Posting Data to MySQL

2004-06-24 Thread Tom Chubb
I am trying to design a form that posts the data to a DB, but being new to PHP/MySQL, it takes me ages to hand write the code and I'm sure there must be an easier way to do it? My form has 100 fields using 20 rows and 5 columns and it's taking me ages to write the code for it. Can anyone advise

Re: [PHP] max upload size

2004-06-24 Thread raditha dissanayake
Please do not send html email to any mailing list. max upload is not the only setting, for a complete list of settings that you have to edit please see http://www.radinks.com/upload/config.php FTP with PHP is not a solution either because the file still has to be uploaded. You might want to

Re: [PHP] R: [PHP] Holding links in a database

2004-06-24 Thread Jason Wong
On Thursday 24 June 2004 21:14, Alessandro Vitale wrote: I'd like to apply! Jeez. Can we kill this thread now? If you want to make what you think is a witty comment then at least trim your post! -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators

[PHP] Hidden message

2004-06-24 Thread Hatchman
attachment: vkpowpuwei.bmp-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] R: [PHP] Holding links in a database

2004-06-24 Thread Steve Douville
People with 10+ line sig's shouldn't talk about trimming posts... ;-) (or did I misunderstand what you meant about trimming posts? lol) - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 24, 2004 9:36 AM Subject: Re: [PHP] R: [PHP]

RE: [PHP] Posting Data to MySQL

2004-06-24 Thread Robert Sossomon
I actually found the perfect answer to this task in Google Answers. First you will need to know how your database tables are set up, secondly you need to figure out field names and such, thirdly you grab the data from the form and dump it into an insert statement (or update if the information was

Re: [PHP] Object Oriented Programming in PHP

2004-06-24 Thread Eric Marden
Awesome. I was looking at the Advanced PHP Programming book on amazon, and so far it looked to be about the only title that covered that. Thanks for the links to his site / talks, as i'm sure there's some great info to be gleaned from them too. I will take a look at picking up his book shortly.

RE: [PHP] Posting Data to MySQL

2004-06-24 Thread Tom Chubb
I have had quite a lot of response from this, so I felt I should elaborate. Basically, I am a DJ and every week I submit a chart of the Top 20 records I am playing. I want a form with 5 columns (Position, Artist, Title, Label, Misc) And then obviously I am entering that for all 20 tracks. The

Re: [PHP] ibill.com

2004-06-24 Thread Eric Marden
Any body tell me how to use ibill.com payment site for my project iBill is similar to 2checkout, in the fact that the forms are hosted on their secure server. Basically, the user launches their purchase into the iBill site by clicking out of yours usually I use a form button that says

Re: [PHP] Determine whether $_GET has a value

2004-06-24 Thread Brent Baisley
This is a thorny topic for some people to grasp. The way I finally figured it out is that there are three answers to a yes and no question: yes, no and no answer. Or, to put it in boolean terms 1,0,NULL. It's that third option in a two option multiple choice question that throws things. What

Re: [PHP] Posting Data to MySQL

2004-06-24 Thread Eric Marden
From: Tom Chubb [mailto:[EMAIL PROTECTED] I am trying to design a form that posts the data to a DB, but being new to PHP/MySQL, it takes me ages to hand write the code and I'm sure there must be an easier way to do it? A couple things you can try: Dreamweaver MX 2004 is very capable of

Re: [PHP] Posting Data to MySQL

2004-06-24 Thread Eric Marden
I got it. So yeah, try dreamweaver, as that might speed up / automate your production. The other thing to try is condensing your code, depending on how your DB is set up. That is, you can use a simple loop to build the form (you code for one row of the form, and loop it out 20 times)... name

[PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Anguz
Terence wrote: Hi, Say you have a querystring - index.php?myname=joe To determine whether myname has a value I have come to the following conclusions / shortcomings when using one of the following: ISSET = as long as the variable myname exists it's set, but there's no guarantee of a value

Re: [PHP] Optimize simple file XOR code

2004-06-24 Thread Curt Zirzow
Just to speed things up a little more... * Thus wrote Marcel Tschopp: ... $key = GenerateKey($hash); $keylen = strlen($key = implode('', $key)); $handle = fopen($filename, 'r'); while (!feof($handle)) { // Set the time limit or the script will time out //

Re: [PHP] Optimize simple file XOR code

2004-06-24 Thread Curt Zirzow
* Thus wrote Marcus Johansson: Wow! That REALLY did make a great difference! Encoding a file of 2MB took 50 seconds before, now it is done in 1 (ONE) second! My Key is 8192 bytes long, is that the reason for why it so much faster for me? Most likely because the number crunching is

[PHP] CMS for a Intranet

2004-06-24 Thread WebMaster. Radio ECCA
Hi! Im developing a new intranet for my company and I wonder if there is any CMS package that fulfil my needs. Ive used PHP Nuke but I think it isnt very safe. I would need a package where creating new modules wew easy. Which one would you recommend it? Which one do you use? Thanks in advance.

[PHP] Re: here

2004-06-24 Thread kris
See the file. Norton AntiVirus eliminato1.txt Description: plain/text -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CMS for a Intranet

2004-06-24 Thread Jason Wong
On Thursday 24 June 2004 23:44, WebMaster. Radio ECCA wrote: Hi! Im developing a new intranet for my company and I wonder if there is any CMS package that fulfil my needs. http://marc.theaimsgroup.com/?l=php-generalm=108691840605127w=2 -- Jason Wong - Gremlins Associates - www.gremlins.biz

[PHP] sceen grab

2004-06-24 Thread Matthew Holmen
I am looking for a way to retrieve data from another website, parse through it and then display it as I would like to. Basically a screen grab from say espn.com, then I take the data that is there and form it to fit on my site. The catch here is that my target is an asp page that requires a

RE: [PHP] sceen grab

2004-06-24 Thread Jay Blanchard
[snip] I am looking for a way to retrieve data from another website, parse through it and then display it as I would like to. Basically a screen grab from say espn.com, then I take the data that is there and form it to fit on my site. The catch here is that my target is an asp page that

RE: [PHP] sceen grab

2004-06-24 Thread Matt Matijevich
[snip] The catch here is that my target is an asp page that requires a login to get to the page I would like to get to. They do allow for the check here so i will be remembered next time, but will that work with a php screen grab. [/snip] http://pear.php.net/package/HTTP_Client -- PHP

Re: [PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Chris Shiflett
--- Anguz [EMAIL PROTECTED] wrote: Wouldn't this work? if(isset($_GET['var']) !empty($_GET['var'])){ // do something... } No, he mentioned that he considers 0 to be acceptable, and this will fail the empty() test. Chris = Chris Shiflett - http://shiflett.org/ PHP

[PHP] Search and replace a String in a file.

2004-06-24 Thread Eric L. Sammons
Being new to PHP this task seems to be little out of my reach right now. I wonder if anyone could tell me how, as I read a file, line by line, search for and then replace a given string? The lines in the file will appear as such: Summary: Some Summary Name: Some-Name Version: x.x . . .

Re: [PHP] Re: MHTML in email

2004-06-24 Thread Juan Pablo Herrera
Thank you, really i need incluided in email body a image (jpg or gif), too see html. The MHTML file is a idea, but i think that not function with dinamic content.How can i do this? Thank you! Juan Hello, On 06/23/2004 06:15 PM, Juan Pablo Herrera wrote: I need to attach a file extension

RE: [PHP] Search and replace a String in a file.

2004-06-24 Thread Jay Blanchard
[snip] Being new to PHP this task seems to be little out of my reach right now. I wonder if anyone could tell me how, as I read a file, line by line, search for and then replace a given string? Basically I will open the file, read its lines one by one and I want to replace Some-Name with

[PHP] substr_count

2004-06-24 Thread Gabe
Does anyone know of a way to have this function run case insensitive? E.g. $strHaystack = this iS a tEsT.; $strNeedle = is; $intCount = substr_count( $strHaystack, $strNeedle ); Anyway, to get this to return a count of two? The haystack that I'm searching in could be just about anything, so I

Re: [PHP] substr_count

2004-06-24 Thread Matt Matijevich
[snip] Anyway, to get this to return a count of two? [/snip] just strtolower or strtoupper both $strHaystack and $strNeedle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Search and replace a String in a file.

2004-06-24 Thread Justin Patrin
There's a PEAR package for just this. :-) http://pear.php.net/package/File_SearchReplace On Thu, 24 Jun 2004 12:58:08 -0400, Eric L. Sammons [EMAIL PROTECTED] wrote: Being new to PHP this task seems to be little out of my reach right now. I wonder if anyone could tell me how, as I read a

[PHP] a 4 days diary

2004-06-24 Thread Pierre
Hi all, I have to code a 4 days diary for a client, schedule every 30 mn and with a system of rdv accepted by mail. I really don't know how to start to draw a cool diary and to code it correctly to be the most reusable as possible. POO or not? If you have there any examples of this style of coding

RE: [PHP] a 4 days diary

2004-06-24 Thread Chris W. Parker
Pierre mailto:[EMAIL PROTECTED] on Thursday, June 24, 2004 10:38 AM said: I have to code a 4 days diary for a client, schedule every 30 mn and with a system of rdv accepted by mail. what is a 4 days diary? why does it need to be scheduled every 30 mins? what is rdv? I really don't know

[PHP] malloc() failure - single function document

2004-06-24 Thread Joe Lewis
Hello, all. I've got a problem, and this is the best place I know of to find the solution. I have three PHP programs I'm trying to run. One functions just fine (located in the home directory, this is a simple mileage tracker for a couple of my automobiles). One is a feedback form (SMTP), and

RE: [PHP] Search and replace a String in a file.

2004-06-24 Thread Eric L. Sammons
First let me thank you for pointing me to PEAR. Now for the problem. Here is my code: ?php require_once 'File/SearchReplace.php'; $serverName = pxt010; $dir = /home/ossadmin/; $file = server-info.temp; $nfile = server-$serverName.spec;

FW: [PHP] a 4 days diary

2004-06-24 Thread Chris W. Parker
Pierre mailto:[EMAIL PROTECTED] on Thursday, June 24, 2004 10:54 AM said: Right it's OOP sorry for the mistake, I have to do a diary for only 4 days (the web site is for an exhibition, that's why) by rdv I mean a rendez-vous an appointment if you prefer. So if I resume I need to make a

FWD: RE: [PHP] Search and replace a String in a file.

2004-06-24 Thread Eric L. Sammons
One last thing, I know someone will ask... Yes I have installed the PEAR package: pear info File_SearchReplace About File_SearchReplace-1.0.1 == Provides Package File_SearchReplace Summary Performs search and replace routines Description Provides

TR: [PHP] a 4 days diary

2004-06-24 Thread Pierre
Pierre ROUWENS [EMAIL PROTECTED] www.web-lance.com WEB-LANCE Cration intra-internet, CD-ROM etc Hbergement WEB et DATA Solution anti-SPAM et anti-VIRUS pour mails -Message d'origine- De: Pierre [mailto:[EMAIL PROTECTED] Envoy: jeudi 24 juin 2004 19:15 : 'Chris W. Parker'

Re: [PHP] Search and replace a String in a file.

2004-06-24 Thread Justin Patrin
You need to do: $snr = new File_SearchReplace(...); On Thu, 24 Jun 2004 13:52:55 -0400, Eric L. Sammons [EMAIL PROTECTED] wrote: First let me thank you for pointing me to PEAR. Now for the problem. Here is my code: ?php require_once 'File/SearchReplace.php';

Re: [PHP] substr_count

2004-06-24 Thread Gabe
Matt Matijevich wrote: [snip] Anyway, to get this to return a count of two? [/snip] just strtolower or strtoupper both $strHaystack and $strNeedle I think I've been looking at the same code for so long, I'm missing the blatantly obvious stuff now... I can't believe I didn't think of that.

[PHP] Finding duplicates in arrays

2004-06-24 Thread Chris Lott
Given two arrays, I want to find the records which are duplicates. What is the simplest approach? And should I use a different approach to compare three or more arrays to find only duplicates that occur in all of them? c -- Chris Lott -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] a 4 days diary

2004-06-24 Thread Chris W. Parker
Pierre mailto:[EMAIL PROTECTED] on Thursday, June 24, 2004 11:24 AM said: So... all datas will be in a mysql base. Many users are gonna use this system (check the list of exhibitors, ask appointment by mail) and if the exhibitor accept the appointment I have to insert it my table. My

RE: [PHP] Finding duplicates in arrays

2004-06-24 Thread Jay Blanchard
[snip] Given two arrays, I want to find the records which are duplicates. What is the simplest approach? And should I use a different approach to compare three or more arrays to find only duplicates that occur in all of them? [/snip] http://us2.php.net/manual/en/function.array-diff.php The

RE: [PHP] Finding duplicates in arrays

2004-06-24 Thread Jay Blanchard
[snip] [snip] Given two arrays, I want to find the records which are duplicates. What is the simplest approach? And should I use a different approach to compare three or more arrays to find only duplicates that occur in all of them? [/snip] http://us2.php.net/manual/en/function.array-diff.php

Re: [PHP] Finding duplicates in arrays

2004-06-24 Thread Geethanandh Kandasamy
use array_unique http://us4.php.net/manual/en/function.array-unique.php On Thu, 24 Jun 2004 10:33:04 -0800, Chris Lott [EMAIL PROTECTED] wrote: Given two arrays, I want to find the records which are duplicates. What is the simplest approach? And should I use a different approach to compare

Re: [PHP] malloc() failure - single function document

2004-06-24 Thread Curt Zirzow
* Thus wrote Joe Lewis: Hello, all. I've got a problem, and this is the best place I know of to find the solution. Those log messages are not what I call good. On the phpinfo.php script, the memory usage on the server goes through the roof before the messages get printed to the log

RE: [PHP] a 4 days diary

2004-06-24 Thread Pierre
OK thx for all But in fact I'm not really a beginner in php but this is the first time i have to code this sort of thing so i search the best way to code it. Mysql tables are ready so this is only how I can handle all by the simplest way that's all thx Pierre -Message d'origine- De:

[PHP] MYSQL Query results in pages

2004-06-24 Thread Gus
Hi. I want to query some data in MYSQL and show the results in page order in some fashion (ORDER BY ...) I've been using the LIMIT sentence like this LIMIT offset, max_per_page so if max_per_page = 5 then the first time the sentence will be LIMIT 0, 5, in page 2 LIMIT 5,5 and so no. My

Re: [PHP] MYSQL Query results in pages

2004-06-24 Thread Matt Matijevich
[snip] Is this right? Is there other efficent way to do it? What about if data changes (i.e. new records are added) while the user browses through pages? [/snip] on each page do a: SELECT count(*) FROM table WHERE your_condition this will give you your total number of results -- PHP General

Re: [PHP] Multipart Email Problem

2004-06-24 Thread Paul Bissex
I had the same problem a few months ago. I switched to Mail::mime thinking that the problem was my homebrew code, but still the same thing -- Outlook didn't recognize the message as multipart. The fix was changing the newline sequence from \r\n to \n. The Mail::mime constructor allows you to

Re: [PHP] Parsing entities in XML attributes

2004-06-24 Thread Decapode Azur
Hi, The problem I had has not exactly the same, but quite close, it was to make a pure xml template system both data and template, anyway it was due to the same expat design problem, which is the entities that are located in attribute values inside tags. The solution I have used was just to

Re: [PHP] malloc() failure - single function document

2004-06-24 Thread Joe Lewis
The script works perfectly from the command line. It turns out to be related directly to Apache 2.0 and the handling of buckets. gdb gave me a great deal of information. It told me that I have another module trying to read from an apr_bucket of type POOL which is supplied by the PHP module.

[PHP] Streaming

2004-06-24 Thread Stephen Craton
I was browsing the net and I found a PHP chat script that claimed that it does not refresh, rather it has streaming text. This got my interest and was wondering how the script did it. I downloaded it's source code but couldn't find anything useful in it, very hard to read in my opinion. I did a

Re: [PHP] Streaming

2004-06-24 Thread svk
On Thu, 2004-06-24 at 16:41, Stephenpp To use streaming, you have to : Turn off output buffering: ob_end_clean() and flush the output has it comes : flush() It is useful to note that : Some versions of Microsoft Internet Explorer will only start to display the page after they have received 256

RE: [PHP] Streaming

2004-06-24 Thread Stephen Craton
Thanks for this, but how do I use it? Do I just put the ob_end_clean() at the opening the page I want to stream and then put flush() at the end? Thanks, Stephen Craton http://www.melchior.us -Original Message- From: svk [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 4:25 PM

[PHP] a stupid question

2004-06-24 Thread Blake Schroeder
Hey I cant figureout the syntax please help echo Some text.aFunction().some more text; The function is not working. Thanks -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Streaming

2004-06-24 Thread Justin Patrin
ob_end_clean() goes at the top. flush() goes after *every* pice of info you want to show real-time. Basically, after every echo or group of echos. On Thu, 24 Jun 2004 16:43:39 -0500, Stephen Craton [EMAIL PROTECTED] wrote: Thanks for this, but how do I use it? Do I just put the ob_end_clean()

Re: [PHP] a stupid question

2004-06-24 Thread Ashwin Purohit
Maybe it has to be Some text.aFunction();.sometext; with the semicolon after the function. I don't really know, just guessing. On Thu, 24 Jun 2004 16:44:53 -0500, Blake Schroeder [EMAIL PROTECTED] wrote: Hey I cant figureout the syntax please help echo Some text.aFunction().some more

Re: [PHP] a stupid question

2004-06-24 Thread Matt Matijevich
[snip] echo Some text.aFunction().some more text; [/snip] Have you checked to see if aFunction() is returning anything? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] a stupid question

2004-06-24 Thread Blake Schroeder
The following code works: echo Some text; aFunction(); echo Some more text; -B Matt Matijevich wrote: [snip] echo Some text.aFunction().some more text; [/snip] Have you checked to see if aFunction() is returning anything? . -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] a stupid question

2004-06-24 Thread David Goodlad
Perhaps using: $ret = aFunction(); var_dump($ret); Then you'll see if aFunction() is returning anything. Dave On Thu, 24 Jun 2004 16:48:18 -0500, Matt Matijevich [EMAIL PROTECTED] wrote: [snip] echo Some text.aFunction().some more text; [/snip] Have you checked to see if aFunction() is

RE: [PHP] Streaming

2004-06-24 Thread Stephen Craton
I just put it into my script, and it doesn't seem to be working. I put ob_end_clean(); at the top of the script, but here's the while loop I have: while($db-next_record()): echo 'b'.$db-Record[user].':/bnbsp;nbsp;'; $sql = SELECT emote, image FROM c_emotes; $result

Re: [PHP] a stupid question

2004-06-24 Thread Matt Matijevich
[snip] echo Some text; aFunction(); echo Some more text; [/snip] What is printed out? if aFunction() is returning the string test then this code: echo Some text.aFunction().some more text; should print out: Some texttestsome more text -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Streaming

2004-06-24 Thread Justin Patrin
Your script is ending, so the page ends. PHP (HTTP) isn't really supposed to do streaming. If you want it to stream you have to keep the script running. Add something like this: while(true) { while($db-next_record()) { echo 'b'.$db-Record[user].':/bnbsp;nbsp;'; $sql = SELECT

RE: [PHP] a stupid question

2004-06-24 Thread Vail, Warren
Your test that works suggests that the function is echoing its results, and not actually returning its results. To return its results the function needs to end with Function aFunction() { do something; Return $resultstring; // very last statement executed in function. } This should allow

RE: [PHP] Streaming

2004-06-24 Thread Stephen Craton
Thanks for all the help here. The only question I have left is bandwidth. Would a while(true) { } loop hog up enormous ammounts of bandwidth or just sit there quietly bugging noone? The only other option I have going for me is the iframe hack, which I'm getting annoyed of... Thanks, Stephen

Re: [PHP] Streaming

2004-06-24 Thread Justin Patrin
It will use up CPU time and bandwidth, yes. It should take less bandwidth than the refresh constantly version, but only if you code it right. You could also write a little JS to pull some content from the server (get messages after a certain time / message id) and inject them into the page. This

[PHP] About the post Streaming

2004-06-24 Thread Pierre
Thanks to all for the explanation, but in fact in what kind of script can it be useful? For a progress download bar? I think so but I don't see how I can do this ... Can you please explain quickly in which case it can be useful ? Thx a lot Pierre -- PHP General Mailing List

Re: [PHP] a stupid question

2004-06-24 Thread Michal Migurski
Maybe it has to be Some text.aFunction();.sometext; with the semicolon after the function. I don't really know, just guessing. Yeesh, that's not even remotely valid PHP. Why would that have been posted as advice? - michal

RE: [PHP] About the post Streaming

2004-06-24 Thread Stephen Craton
What I saw it applied in was a chat script, and that's what I'm planning on using it for should I ever finish figuring it out... Thanks, Stephen Craton http://www.melchior.us -Original Message- From: Pierre [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 6:05 PM To: php-general

Re: [PHP] Re: MHTML in email

2004-06-24 Thread Manuel Lemos
Hello, On 06/24/2004 01:59 PM, Juan Pablo Herrera wrote: Thank you, really i need incluided in email body a image (jpg or gif), too see html. The MHTML file is a idea, but i think that not function with dinamic content.How can i do this? Yes, this class can do exactly that using multipart/relative

[PHP] Re: Multipart Email Problem

2004-06-24 Thread Manuel Lemos
Hello, On 06/24/2004 08:27 AM, Matt Macleod wrote: I have a script that sends a multipart email from a php page. The script appears to work fine on my mail client (Mail on Mac OSX) and on an online email reader (mail2web.com). However a colleague using Outlook on Windows 2003 views the whole

[PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Al
You need to be specific about what you consider to be a legitimate value for your application. consider: $var= $_GET['myname']; if((preg_match(/([0-9]|[a-z]|[A-Z]/, $var) { Do something } No spaces and watch the | between the ] and the [ If $myname has at least one number or character, there

Re: [PHP] a stupid question

2004-06-24 Thread Curt Zirzow
* Thus wrote Blake Schroeder: Hey I cant figureout the syntax please help echo Some text.aFunction().some more text; The function is not working. For future reference, to make you're post not a stupid question it would look more like: snip Subject: Calling a function between strings I

Re: [PHP] Re: MHTML in email

2004-06-24 Thread Juan Pablo Herrera
Thank you Manuel, Tomorrow i work on this class. My idea is make a app that send newsletters with html + image included. It app shows tracert when the email is open.Know you some app that make this?. Regards, Juan Hello, On 06/24/2004 01:59 PM, Juan Pablo Herrera wrote: Thank you, really

[PHP] Re: Sort a text string by last word before separator

2004-06-24 Thread Lars Torben Wilson
Andre Dubuc wrote: Given a text string: $OK = Joe Blow, William Howard Anser, Hannie Jansen, etc, etc,; [snip] How would I get this 'before_last' function to iterate through the initial string, so I could build a sorted list with both first and last names, sorted by last name? I can't seem to

[PHP] Re: Sort a text string by last word before separator

2004-06-24 Thread Lars Torben Wilson
Lars Torben Wilson wrote: Sorry about following up to myself, but I was really really hungry when I wrote the first one: [snip] This code returns the names in the format in which they are given. You can speed it up a bit by having it return the names in 'lastname, firstname' format. For this,

Re: [PHP] Re: Sort a text string by last word before separator

2004-06-24 Thread Andre Dubuc
Thanks Torben, I've been messing about with code all afternoon, and my mind is blitzed. Didn't think it was possible since there was no way I could access the first name part (after I accessed the surname) since it had no delimiter except spaces. Managed to get the surname in a sorted array,

RE: [PHP] Streaming

2004-06-24 Thread Stephen Craton
I've been wracking my brains for the past few hours trying to figure out this streaming business and the ways to avoid refreshing and polling the server for data. I spent a few hours playing Sherlock Holmes in the phpOpenChat software which is where I first found this technique, but I didn't

Re: [PHP] Streaming

2004-06-24 Thread His Dudeness
[snip] I was also thinking of Javascript like you said, but again, I came back to refreshing and then I can to XML HTTP Request but it's not supported well with browsers. Any help here would be appreciated... [/snip] As far as javascript and XML HTTP Requests, you could try the hidden iframe

RE: [PHP] Streaming

2004-06-24 Thread Stephen Craton
Thanks for the information. I've been using the little iframe trick right now, but this link you sent me may be different. I'm going to read here soon, but just wanted to reply for the heck of it. The iframe trick, the way I'm doing it, still requires a refresh and everything, so it's not exactly

Re: [PHP] Streaming

2004-06-24 Thread His Dudeness
Thanks for the information. I've been using the little iframe trick right now, but this link you sent me may be different. I'm going to read here soon, but just wanted to reply for the heck of it. The iframe trick, the way I'm doing it, still requires a refresh and everything, so it's not

  1   2   >