Re: [PHP] Re: Creating a PHP5 RPM
The easiest thing to do is to take the existing Redhat EL3 php source rpm, install and get the php spec file. Edit that spec file and modify it for php5. Then copy the php 5.0 tar.gz file over to /usr/src/redhat/SOURCES and then run rpmbuild -bb php.spec or whatever you named your php spec file. If you don't have a clue about the RPM build system, you may want to look at the Maximum RPM online book available at redhat. Or search google for it. -Brent - Original Message - From: "Chris Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 27, 2004 11:55 AM Subject: [PHP] Re: Creating a PHP5 RPM > Marcus Bointon wrote: > > I normally compile PHP straight from the regular source, however, this means > > that RPM loses track of what PHP version is installed on RedHat Linux (EL3), > > causing dependency and version mismatch problems. So it appears that I need > > to build an RPM from the normal source, then install it with RPM. However, I > > have no idea how to do this - can anyone give me some pointers? Is it as > > simple as adding a configure switch like --build-rpm? > > > > Thanks, > > > > Marcus > > I haven't done it myself yet, but I've been thinking about the same > thing. I had bookmarked these "how to's" while searching google. > > http://user.cs.tu-berlin.de/~ccorn/software/rpm/build-rpm.html > http://www3.sympatico.ca/sarrazip/dev/rpm-building-crash-course.html > http://www-106.ibm.com/developerworks/library/l-rpm2/ > > -- > Chris Martin > Web Developer > Open Source & Web Standards Advocate > http://www.chriscodes.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anyone use japha?
I found a cool project called Japha which is a port of the main java classes to php. It's at www.japha.net I haven't used it yet, but have read through the site and the classes a bit. Anyone using these classes/libraries in their applications. -Brent
[PHP] Splitting a string by the number of characters in the string?
In PHP 5 there is a awesome function called str_split, is there an equivalent in PHP 4.x? I need to do the following: Split a 60 character string into 3 20 character array chunks. using str_split I could easily do it, but how do I do it in PHP 4.x? Thanks, Brent
Re: [PHP] Changing MySQL Date Format
Why not just write a simple function in php to change your date around for you? A function in a utility class perhaps? -Brent - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Harlequin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 12, 2004 7:39 AM Subject: RE: [PHP] Changing MySQL Date Format [snip] I'm using a hell of a lot of dates in my databases and wondered if it was possible to change the date format in my databases from -00-00 to: 00-00-...? Has anyone else managed to do this or use any workarounds I could use perhaps...? I'm just getting a little hacked of having to explode the damn things every time I use them. [/snip] The date time format is pretty standard, start here http://www.mysql.com/date You could write a date function that does your explosions for you. Or you could query the MySQL list for other solutions. (pun intended) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] String compare of 7 text strings
I wanted to see if anyone has an easier way to do this. The end result is this: I need to compare 7 different text strings(which are in an array). They should all be the same, if they are not the same, a message should be outputted saying they weren't. How would one do this outside of using a huge if/then statement? Thanks, Brent
Re: [PHP] String compare of 7 text strings
Let me rephase my question in my previous email: I'd like to compare 7 strings(which are in an array). Each string should be the same, if they are not, a message should be outputted. How would one do this outside of using a huge if/then statement? Thanks, Brent - Original Message - From: "Brent Clements" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 13, 2004 9:07 PM Subject: [PHP] String compare of 7 text strings I wanted to see if anyone has an easier way to do this. The end result is this: I need to compare 7 different text strings(which are in an array). They should all be the same, if they are not the same, a message should be outputted saying they weren't. How would one do this outside of using a huge if/then statement? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting the size of a mysql table using php
How does one get the size of a mysql table using php? I tried taking a look at how phpmyadmin does it but got lost in the code. Anyone have any simple or elegant ways of doing this? -Thanks Brent
[PHP] Need help with some logic and how to do it in PHP
I have the following problem. I have 7 string values, if any number of them are the same, I need to ouput that value, if they are all different, I need to output a blank string "". How would I do this in php outside of writing a huge if/then statement? This is a variation of my "String compare of 7 text strings" question yesterday. All of the 7 string values are values in an array, ie $strings = array($string1, $string2, $string3, $string4, $string5, $string6, $string7); Thanks, Brent
Re: [PHP] Need help with some logic and how to do it in PHP
Sweet, that solves my problem. Thanks for the help. -Brent - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 9:53 AM Subject: Re: [PHP] Need help with some logic and how to do it in PHP > On Sunday 15 August 2004 22:44, Brent Clements wrote: > > > I have 7 string values, if any number of them are the same, I need to ouput > > that value, if they are all different, I need to output a blank string "". > > How would I do this in php outside of writing a huge if/then statement? > > This is a variation of my "String compare of 7 text strings" question > > yesterday. All of the 7 string values are values in an array, ie $strings > > = array($string1, $string2, $string3, $string4, $string5, $string6, > > $string7); > > array_count_values() > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > An infallible method of conciliating a tiger is to allow oneself to be > devoured. > -- Konrad Adenauer > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I find out if a string will fit in an area of an image?
Hi All, Let's say I have a string of text. $foo = "I WANT ALot of Text to be diSPLAYed!" I have an area on my image that is around 386 pixels wide. How do I find out if my text will fit in that area using any size font? Thanks, Brent
Re: [PHP] PHP Oficial Certification
I personally believe this is a great thing to have out there, especially one which has commercial backing from one of the central php development companies out there. It starts to validate PHP as an trusted, enterprise language which PHB's can start to turn to for development solutions. It can only help the PHP community, not hurt it. -Brent - Original Message - From: "John Holmes" <[EMAIL PROTECTED]> To: "Yann Larrivee" <[EMAIL PROTECTED]> Cc: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 12:23 AM Subject: Re: [PHP] PHP Oficial Certification > Yann Larrivee wrote: > > > Hostely, what kind of market value does the certification has? Go get > > sun certified at least it has some sort of history and value. > > Hmmm... I guess that would depend if you're trying to get a job with Sun > or with PHP, wouldn't it?? > > Just like any other certification, this could give employers a base idea > of what you should be capable of. The actual interview and your > portfolio will seal the deal, eh? > > -- > > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals – www.phparch.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Oficial Certification
Again I point out that this certification starts to make PHP valid in the commercial world. I completely agree with everyone that certs usually aren't worth the paper they are printed on when it comes to technical expertise but to a PHB or client who doesn't know any better except buzz words, a "certified php developer" sounds better. Even I(who would take a seasoned programmer over a certified guy anyday), would probably prefer to hire "certified php" developers because you know what??? It's an easier sell to potential clients. Granted, you have to hire one or two guys who actually know what their doing to keep the ship floating but nevertheless it's an easier sell if you have "certified php developers" on board. -Brent - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 1:22 AM Subject: Re: [PHP] PHP Oficial Certification > * Thus wrote Yann Larrivee: > > For shure a beginner will benefit from this has it is problably give him > > a salary increase compared to the guy that is not certified (we all know > > that php developper are under paid) So this part is good. > > It will also eliminate some people out of the market for shure at some > > point. > > A certifcate most likely wont get you a salary increase, but it will > be favored in consideration of equal experience. > > > > > Yep emplyers will use it to evaluate people, but like i said i you want > > to get good exprience just work on a open source software if you don't > > have any work experience. > > OSS doesn't make a person better programmer, you can easily write > an OSS app and still lack any knowledge of proper writting. > > > > > Now has far has sun certification how it will help you get a php job. > > Well depends what kind of job you are looking for. A job where you only > > do php 24/7 or you do other stuff on the side (Java, C++, PHP, ...) > > I still dont see how sun has anything to do with anything, unless > your against OSS philosophy. > > > > > If so then beeing certified PHP just assure that you know PHP and some > > principles. > > Assuring someone that you have *some* is much better than the lack > of proof otherwise. > > > If you thake the sun certification it is been there for a far longer > > time ans since your job requires both in this case the sun certification > > means more. > > > > But certifications are just there to prove your level of understanding. > > So if I have a certificate of 'ed' that make it better than having > a sun certificat since 'ed' has been around longer than sun. And > should land me a much better PHP job. > > > Curt > -- > First, let me assure you that this is not one of those shady pyramid schemes > you've been hearing about. No, sir. Our model is the trapezoid! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html tabs
One suggestion that I have is to use curl to get the web page that you want, put that into a buffer variable and then when you click on the link to the second page, you would then output the variable to the "page". -Brent - Original Message - From: "Michael Gale" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 28, 2004 12:05 AM Subject: [PHP] html tabs > Hello > > I was working on a web site that will be using TABS, the page will have > three TABS. > > All the data will be dynamic on all the pages, the first tab will be a > search page. After submit is hit the page will be reloaded to display > the results. > > Each result will be a link to detailed information about the result you > clicked on. Can I make is so the link loads the page in the second tab ? > > Thanks. > > > -- > Hand over the Slackware CD's and back AWAY from the computer, your geek > rights have been revoked !!! > > Michael Gale > Slackware user :) > Bluesuperman.com > > > -- > Hand over the Slackware CD's and back AWAY from the computer, your geek > rights have been revoked !!! > > Michael Gale > Slackware user :) > Bluesuperman.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP speed
This isn't really answer to your question, but to possibly simplify your authentication mechanism, you ought to take a look at the pear package Liveuser which allows you to have somewhat of a distributed authentication architecture. Check out http://pear.php.net/package/LiveUser -Brent - Original Message - From: "FrzzMan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 28, 2004 4:55 PM Subject: [PHP] SOAP speed > Hello, > > I'm developing some site that will share the same UserDB, because these > site are quite large in scale so I decided to host it on different servers. > > Each site will have it own cache of active user on the site, so the user > wont' have to be authenticated every request (will be a pain in the a$$ > I'm sure), the cache will be cleared when the session time out. > > But since I don't have much experience with these kind of distributed > authenticate process with SOAP, so I wonder how long it will take to > receive the response from the UserDB server using SOAP. > > There's a change that the site server will be located @ Europe, while > the UserDB server will be located @ US (for global access). > > If the transmission time is about 1, 2 or even 3 secs, I think it > acceptable. btw, do you have any experience about this? > > TIA > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Convert gif to jpeg on the fly using gd?
I have a class that only accepts jpegs and png's but all of my images(we have over 200 of them) are in gif format. Is there a way to convert from gif to jpeg on the fly without outputting the new image to file or the screen or using a system call to run the gif2XXX utilities? I've tried imagejpeg(imagecreatefromgif($image)) but it outputs the image to the html screen as it should. Granted, I could pull some neat output buffering trick but I want to know if you guys think there is an easier way. And if so, point me in the right direction Thanks, Brent
[PHP] Probably not a php question, but here goes..how do I convert pixels to page units?
I have a pdf class that has a function that allows you to add an image to the pdf your creating. The problem is that the function requires that the height and width of the image be specified in page units. Well I know what the pixel height and width are of my image, how do I convert it over to page units so that the image displays correctly on the pdf? I just need the equation if you guys can think of one. THanks Brent
Re: [PHP] PHP- Dependant dropdown based on Mysql queries
Using a combination of javascript and php this is easily done. Below is just a way off the top of my head. There are probably simpler ways of doing it or even more elegant but again this is just off the top of my head. You would populate your first dropdown box by whatever method. Then you would do an onselect javascript event to submit the form, the php code would check to see what "step your at" by seeing which select form field was submitted and then take the value of select form field , query against the value, and then use the results to populate the other select form fields. Wash, rinse, repeat. -Brent - Original Message - From: "Francisco Puente XFMP (QA/EMC)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 30, 2004 1:42 PM Subject: [PHP] PHP- Dependant dropdown based on Mysql queries > Hi All, > I'm trying to generate a PHP page with 3 or 4 dropdown menus, each of one dependant upon each other, that means: > #2 dropdown should change upon selecting something on dropdown #1, #3 should change based on the selection at #2 to finally submit the desired query. Each dropdown menu should be generated from a mysql query based on the previous selection. > I need to generate mysql queries based on each dropdown selection and the page should reload the content for the next dropdown menu. I couldn't yet figure out how to accomplish this. > Let me know if I make myself clear enough :) > Any help is very welcome!! > > Thanks in advance, > > Francisco > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newbie Guide] For the benefit of new members
The problem with that request is that some employers require you to have a vacation message set. -Brent - Original Message - From: "Paul Waring" <[EMAIL PROTECTED]> To: "Jay Blanchard" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Monday, August 30, 2004 3:30 PM Subject: Re: [PHP] [Newbie Guide] For the benefit of new members > Another thing I'd like to add: if you're on a public mailing list > don't leave a vacation message set when you go away, it's *extremely* > annoying. > > Paul > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newbie Guide] For the benefit of new members
Damn, I just felt the wrath of the list even though I completely agree with you guys, I was just pointing out some employers requirements. -Brent - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Brent Clements" <[EMAIL PROTECTED]> Cc: "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Monday, August 30, 2004 5:16 PM Subject: Re: [PHP] [Newbie Guide] For the benefit of new members > On Mon, 30 Aug 2004 16:27:42 -0500, Brent Clements > <[EMAIL PROTECTED]> wrote: > > The problem with that request is that some employers require you to have a > > vacation message set. > > Then you should temporarily unsubscribe from the list until you > return. Vacation messages on mailing lists are more annoying than > disclaimers. > > -- > Stut > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Html pages generated with php can't be viewed as source in IE
We have a wierd problem that we can't seem to figure out, maybe it's something you guys can help out with or have seen before. HTML pages generated with php are displayed correctly in all browsers, but when you try to view the source of the html page in IE, the default source code viewer never pop's up. If you refresh the page, then try to view the source it works. Anybody have a clue whats going on?
Re: [PHP] Html pages generated with php can't be viewed as source in IE
That's what I thought because it works fine in other browsers. -Brent - Original Message - From: "Dan Joseph" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 01, 2004 8:50 AM Subject: RE: [PHP] Html pages generated with php can't be viewed as source in IE > Yeah, IE bugs... Clear your cache, if that doesn't work, go into the file > system, and manually delete the cache files. That'll fix it, for a while. > > -Dan Joseph > > > -Original Message- > > From: Brent Clements [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, September 01, 2004 9:36 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Html pages generated with php can't be viewed as source in > > IE > > > > We have a wierd problem that we can't seem to figure out, maybe it's > > something you guys can help out with or have seen before. > > > > HTML pages generated with php are displayed correctly in all browsers, but > > when you try to view the source of the html page in IE, the default source > > code viewer never pop's up. If you refresh the page, then try to view the > > source it works. > > > > Anybody have a clue whats going on? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print at a specific time
- Original Message - From: "devil_online" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 01, 2004 9:05 PM Subject: Re: [PHP] print at a specific time > and to print at minutes too, kije 9h01? > > thanks > "John Holmes" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > devil_online wrote: > > > > > Hi, I want to print or echo something in a specific time like 9.pm. > > > how can i do it? > > > > if(date('H')==21) > > { echo "'tis 9pm and all is well?"; } > > > > -- > > > > ---John Holmes... > > > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > > > php|architect: The Magazine for PHP Professionals - www.phparch.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print at a specific time
Sorry forgot to enclose the variable values. doh! I needs more coffee! -Brent - Original Message - From: "John Holmes" <[EMAIL PROTECTED]> To: "Brent Clements" <[EMAIL PROTECTED]> Cc: "devil_online" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 01, 2004 10:12 PM Subject: Re: [PHP] print at a specific time > Brent Clements wrote: > > > $minute = 01; > > Be careful with the leading zeros... that's interpreted as an Octal > number by PHP, but Octal 1 == Decimal 1 in this case. :) > > -- > > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals – www.phparch.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie: Validate Required Form Fields
Use javascript on register1 rather than actually submitting the form to the server. It's the best way to do this, plus it's a bit quicker. If you have javascript questions, those are for another forum. -Brent - Original Message - From: "Francis Chang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 02, 2004 3:37 AM Subject: [PHP] Newbie: Validate Required Form Fields > Hello All, > > I have a newbie question related to validating required Form fields. > > Suppose we have a two-step user registration process with scripts > register1.php and register2.php, each page containing a set of required and > non-required fields. In register1.php, when user submits the form, it calls > register2.php as the action. In register2.php, I want to validate the Form > values submitted by the user in register1.php and if any of the required > fields is missing a value, I want to re-dispaly the register1.php page with > the appropriate error message. > > What is the most appropriate way to handle this? Once the validation fails > in register2.php, can I call register1.php with parameters? If so, how? Or > do I use session variables to capture the error information? How do I > redirect to register1.php from within the code execution of register2.php? > > Thanks in advance for your help. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] data grids...
This is what I've used in the past, it's pretty much compatible with all of the major browsers that users will use. http://www.activewidgets.com/ -Brent - Original Message - From: "blackwater dev" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 08, 2004 1:15 PM Subject: [PHP] data grids... > Does anyone have a nice clean way to provide data grids with php short > of simply creating a bunch of input boxes or using flash? > > Thanks! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Convert textarea post data from plain text to html using php..how?
Do you guys happen to have an easy easy to do this? I need to convert plain text submitted via a textarea form field to html formatted text. Is there a way to do this with php? Thanks, Brent
[PHP] Good xml to array class?
I've done searching on google for "xml parsers" and xml to array using php and honestly there are S many. Most of the classes I've taken a look at either aren't finished, or require dom to work. Either I write my own or I get help from you guys. So me being the lazy person that I am will ask you guys. Anyone know of a very good xml to array class that is available as open source? I need it to not rely on DOM since the php which I am dealing with, only has expat compiled in. Thanks for any pointers to good classes! Brent
[PHP] I need help figuring out something
I'm trying to write text to an image but some parts of the text should be in italics. For instance, I have the following string. $string = "This is a [i]test[/i] string that [i]has[/i] some parts in [i]italics[/i]" How do I display that on an image using the image functions with php but display the parts between [i][/i] in italics? How would you guy's do it? Thanks, Brent
Re: [PHP] How do I do italics on a text string in an image?
Jason, thanks for the reminder, I completely forgot about the italic version(s). -Brent - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 12, 2004 8:08 PM Subject: Re: [PHP] How do I do italics on a text string in an image? > On Wednesday 13 October 2004 08:30, Brent Clements wrote: > > I've got the following string: > > > > $text = "football"; > > > > How do I put that string in italics using a true type font on an image? > > Use the italic version of the font. > > In case you're wondering, the italic/bold that you can select on fonts in, say > Windows, are generated on-the-fly if the italic/bold versions of that font > are not available. Have a look through your fonts directory and you'll see > the font names ending with *n, *i, *b, meaning normal, italic, bold > respectively. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Never test for an error condition you don't know how to handle. > -- Steinbach > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Class
GD is your friend for images with php. If your asking how to access java classes from PHP you may want to visit http://www.php.net/manual/en/ref.java.php -Brent - Original Message - From: "Mulley, Nikhil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 12, 2004 11:28 PM Subject: [PHP] PHP Class Hi All , I do not know whether to post here or not , but it always happens that I always get the crispy answers from here. I have JDK 1.4.2 Installed on my machine, Now I externally downloaded a Jimi Package and I wanted to know how to install/deploy/put this Jimi ( java Extension )in which folder. Jimi is a Java Class for Images, I need this because I wanted to use it in PHP. Please any soon relevant reply will be appreciated. --Nikhil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Tempnam not working??
Hi Everybody, I'm running php 4.3.2 When I run the following $fname = tempnam('mytmp/', 'PREFIX_'); and then echo $fname, it returns /tmp/FILENAME rather than mytmp/FILENAME I'm running under RHEL 3 U3 Anybody know what's going on? thanks, Brent
Re: [PHP] Website with a Instant Messenger
Implementing Jabber is probably his best bet. I believe there are a few php based interfaces for it. -Brent - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 4:01 PM Subject: Re: [PHP] Website with a Instant Messenger > On Tuesday 28 September 2004 04:42, Ricardo Cezar wrote: > > > I want to put a instant messenger in a website. People connect to this > > website to stay in touch with each other. There is a photo album for > > everyone, a Forum, groups... > > > > The IM must work like ICQ, MSN and other, but via web. Users of the site > > can add other users to the list, and when people log in their status go > > ONLINE. Then we can open another window and chat, or send a message... > > > > Nothing more than that. > > Is that all? You sure? > > > Where can I start? I have no idea on how to do this... Any help? > > Hire someone? > > I would suggest that you search around: > > sourceforge.net > freshmeat.net > hotscripts.com > > and find something suitable. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > You can't push on a string. > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
Stupid me completely forgot about the socket functions in PHP. Again, that's what I get for having too little coffee last night. Thanks for the help everyone. - Original Message - From: "Chris Shiflett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 11:06 PM Subject: Re: [PHP] submit to a remote form without the use of curl?? Is it possible? > --- [EMAIL PROTECTED] wrote: > > Is it possible with php to submit to a remote form without the > > use of curl? > > You can use fsockopen: > > http://shiflett.org/hacks/php/http_post > > If your version of PHP supports streams, you can use streams: > > http://shiflett.org/hacks/php/streams_post > > Hope that helps. > > Chris > > = > Chris Shiflett - http://shiflett.org/ > > PHP Security - O'Reilly HTTP Developer's Handbook - Sams > Coming December 2004http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I have a really stupid question, just trying to debug a script though.
I know what this means, but what are some reasons why we would get this error? Warning: fsockopen(): unable to connect to 128.42.244.20:80 Thanks, Brent
Re: [PHP] I have a really stupid question, just trying to debug a script though.
I'm going to change this question up a bit. The error is this one: "Warning: fsockopen(): unable to connect to www.example.com:80 in /home/u5/lentesta/html/socket.php on line 2 Permission denied (13)" What are some reasons we'd get this? Would a firewall or local system tcp/ip filtering prevent socket operations from occuring? Thanks, Brent - Original Message - From: "Brent Clements" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 29, 2004 8:41 AM Subject: [PHP] I have a really stupid question, just trying to debug a script though. I know what this means, but what are some reasons why we would get this error? Warning: fsockopen(): unable to connect to 128.42.244.20:80 Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] crypt() source
This question was completely off-topic, but here is a site that has code for java that may help you http://locutus.kingwoodcable.com/jfd/crypt.html Also, repeat after me...GOOGLE is your FRIEND! -Brent - Original Message - From: "Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 07, 2004 7:00 PM Subject: [PHP] crypt() source > Hi i am new to php, and i am writing a small user authentication script. In > the manual i read about using the crypt() function to generate a hash, and > how you can validate the password using a salt. eg > if (crypt($userinput, $hash) == $hash) > > The code works perfectly, however i am writing an application in java that i > want to validate users in the same way. So i need this app to be able to use > the EXACT same crypt function as PHP. I cant find any code that will do this > the same way. Can anyone supply me with some code that will? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help with a string
Given the following string: $textString = "Share A Dream Come True Parade 3:00 SpectroMagic Parade 9:00, 11:00 Wishes? nighttime spectacular 10:00" I need to break the string up into pieces where as $string[1] = "Share A Dream Come True Parade 3:00" $string[2] = "SpectroMagic Parade 9:00, 11:00" $string[3] = "Wishes? nighttime spectacular 10:00" Granted this is pretty easy because I could just search for this stuff and break it up, but the string above can actually be different each time, for instance, next time it could be: $textString = "Share A Dream Come True Parade 3:00, 5:00 SpectroMagic Parade 9:00, 11:00 Wishes? nighttime spectacular 10:00" I think my main issue is that I don't know how to keep the , XX:XX part combined with the previous part of the string. Any help would be appreciated! Thanks, Brent
Re: [PHP] read aspx files
Your question is a bit confusing. Do you want to convert asp to php on the fly? and then parse the php natively? Not easily done. Or do you just want to name your files .aspx yet have php code in the files. Easily done. Or do you want to run aspx files natively?(if so check out the mod_mono project). -Brent - Original Message - From: "celso andrade" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 08, 2004 1:00 PM Subject: [PHP] read aspx files > hi all, > > how do i setup a apache+php server to read aspx files > as php files? > > i need it to parse aspx files. > > thank you > > > > > > > ___ > Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] TTF Text not displaying correctly
Does anybody know off the top of their head why truetype font text would look greyed out? This is my code: The text looks greyed out and it's a bit distorted. Thanks, Brent
[PHP] strip out wierd characters in a string
Hi Guys, I think that a string that I'm grabbing from a website was actually created using ms-word. If I echo the string out, it has a question mark in it. If you look at the website, the text is fine ie"string some more text" but when I grab it from the website, and then echo the string, I get. "string? some more text" I have tried doing this echo str_replace("?", " ", $text); but it still print's out the ?. I think it's because the string itself has a wierd binary character in it or something. Anyone know how to fix this? Thanks, Brent
Re: [PHP] strip out wierd characters in a string
Solved my own problem. I ran the script itself from the unix prompt and forced it's output to a text file I then viewed the text file and saw the actual wierd character. I then used strtr to replace the wierd character with a single space. Pretty simple and clean way to fix this. -Brent - Original Message - From: "Brent Clements" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 1:22 AM Subject: [PHP] strip out wierd characters in a string Hi Guys, I think that a string that I'm grabbing from a website was actually created using ms-word. If I echo the string out, it has a question mark in it. If you look at the website, the text is fine ie"string some more text" but when I grab it from the website, and then echo the string, I get. "string? some more text" I have tried doing this echo str_replace("?", " ", $text); but it still print's out the ?. I think it's because the string itself has a wierd binary character in it or something. Anyone know how to fix this? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [NOT FIXED] Re: [PHP] strip out wierd characters in a string
Ok, I still have the problem. If I echo the string to a webpage, it still contains the ? So I viewed the source in a notepad, and the thing that shows up next to "string" is a TM. I tried using htmlentities on the string that I'm echoing but the question mark/tm is still there. Anybody know how to fix this? -Brent - Original Message - From: "Brent Clements" <[EMAIL PROTECTED]> To: "Brent Clements" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 1:42 AM Subject: Re: [PHP] strip out wierd characters in a string > Solved my own problem. > > I ran the script itself from the unix prompt and forced it's output to a > text file > I then viewed the text file and saw the actual wierd character. I then used > strtr to replace the wierd character with a single space. > > Pretty simple and clean way to fix this. > > -Brent > > - Original Message - > From: "Brent Clements" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, October 18, 2004 1:22 AM > Subject: [PHP] strip out wierd characters in a string > > > Hi Guys, > I think that a string that I'm grabbing from a website was actually created > using ms-word. If I echo the string out, it has a question mark in it. > > If you look at the website, the text is fine > ie"string some more text" > > but when I grab it from the website, and then echo the string, I get. > > "string? some more text" > > I have tried doing this > > echo str_replace("?", " ", $text); > > but it still print's out the ?. I think it's because the string itself has a > wierd binary character in it or something. > > Anyone know how to fix this? > > Thanks, > Brent > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best practices for php application
For a pretty cool PHP MVC Framework, check out http://www.phpmvc.net/ -Brent - Original Message - From: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 21, 2004 9:11 PM Subject: Re: [PHP] Best practices for php application > * Brent Baisley <[EMAIL PROTECTED]>: > > On Oct 21, 2004, at 12:47 PM, abrea wrote: > > > Dear list, > > > Does anybody know of a url where I can find reading materials about > > > best practices to organize the filesystem and variable structure of > > > a php application? Although application purposes probably vary > > > widely, I imagine that in one way or other most include adding, > > > updating, deleting and displaying records, so there might be some > > > standard or preferred procedure. > > > > That's a whopper of an open ended question. I found the biggest help > > for me was reading up on the MVC (Model, View, Controller) technique, > > which is probably the most commonly used "design pattern" for just > > about any language. > > Hear, hear! I first ran into this pattern when programming in Perl -- I > stumbled across CGI::Application, tried it out, and wondered how anybody > would program any other way. (Obligatory self-promotion: I've since > ported it to PHP -- http://freshmeat.net/projects/cgiapp/ ). > > For the OP, the basic idea behind an MVC pattern is: > > * Model -- separate code that deals with manipulating your data store > into classes or distinct functions grouped in a file > * View -- separate code that deals solely with presentation logic ("if > the user is an administrator, show these links; otherwise, show > these") into files of their own (or use a template engine) > * Controller -- separate code that deals with user input and validations > into a controller. > > Typically, your controller is either the actual script for the > application or a class that can be invoked with metadata (read: > customizable applications!). It then takes input, validates and filters > it, and passes it to the Model code. The data it receives back from the > Model is either piped directly back to the View, or acted upon and > further transformed before doing so. > > Learning to program this way is difficult at first -- it's a far cry > from opening a file, writing out a few statements, and executing it. > However, the flexibility it affords, and the maintainability, are > invaluable. > > I'm not sure of any URLs to give the OP. I'd highly recommend "The > Pragmatic Programmer", by Hunt and Thomas (Addison Wesley Press). > Another place to look might be the Horde's CVS collection -- to see how > other PHP programmers do it. > > -- > Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] > Webmaster and IT Specialist | http://www.garden.org > National Gardening Association| http://www.kidsgardening.com > 802-863-5251 x156 | http://nationalgardenmonth.org > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to add carriage returns??
Ok I have a general problem. I have a textarea on an html form. Well when the user get's to the end of the textarea, it wrap's around. The problem with this is that unless they do a carriage return, the text entered into the textarea is a very long line. So when ever they submit the form, the string in the textarea is just one long line without newlines or carriage returns. How do I add linefeeds every few words? Thanks, Brent
[PHP] Just wanted to say....
PHP 5 rocks. Thanks to all of the developers who have spent their time and efforts creating such an awesome application development language. Sincerely, Brent Clements Innovative PHP Solutions, L.L.C.
Re: [PHP] E-bay API and PHP
Sign up for the ebay developers program and they give you access to their api plus instructions on how to implement. You will also have access to a sandbox environment to test your code. Be aware that once you move past the sandbox environment, access to the ebay api is charged based on the number of remote procedure calls you use. If I recall, you purchase in blocks. - Original Message - From: "zareef ahmed" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 06, 2004 2:31 AM Subject: [PHP] E-bay API and PHP > Hi, >How can we communicate to E-bay API through PHP? > is it possible? or any alternative to E-bay API? > Basically I am going to develop a application with > E-bay functionality like Product Management, Auction > Mangement, and Digital Product delievey. > > any info as usual will be appriciated. > > zareef ahmed > > = > Zareef Ahmed :: A PHP Developer in Delhi(India). > Homepage :: http://www.zasaifi.com > > > > __ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Most used oop pattern to use for php application development?
Good Evening All, I know this will probably start a flame war, but I want to get everyone's opinion on which oop pattern is either the accepted pattern or most used pattern for php application. I'm pretty partial to MVC but it has it's benefits and drawbacks. What does everyone else use? Hopefully my question will start some meaningful conversation. Unless of course I'm asking a redundant question and this has already been answered. Excuse my redundancy if it has. Have a great night everyone! Brent
[PHP] Rotating image using imagerotate creates large black area on image
Hi Guys, I am working on some images and I am having some problems with image rotate. I am using imagerotate($im, "-90", 0); but when I display the image, the first 1/4 of the image has a large black splotch from left/top to right/bottom Help!! It's causing me fits. Thanks, Brent
Re: [PHP] Re: Rotating image using imagerotate creates large black area on image
I have also tried that and it still doesn't work. Turns out that since I was using two image rotates, it was causing the image to get those black splotches. This is the application flows. Rotate image to write text 90 CW Write text Rotate image back to original position 90CCW This was causing the black splotches. I fixed the problem by loading the image into photoshop, rotating it 90CW, saving and then only doing the last rotate. It worked great. Very weird problem with imagerotate. -Brent - Original Message - From: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 24, 2004 8:15 PM Subject: [PHP] Re: Rotating image using imagerotate creates large black area on image > * Brent Clements <[EMAIL PROTECTED]>: > > I am working on some images and I am having some problems with image = > > rotate. > > > > I am using imagerotate($im, "-90", 0); but when I display the image, the = > > first 1/4 of the image has a large black splotch from left/top to = > > right/bottom > > It might be because the second argument to imagerotate() is supposed to > be a floating decimal, not a string. Try: > > imagerotate($im, -90, 0); > > and see what happens. > > -- > Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] > Webmaster and IT Specialist | http://www.garden.org > National Gardening Association| http://www.kidsgardening.com > 802-863-5251 x156 | http://nationalgardenmonth.org > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 on IBM PowerPC; good combination?
Just so we are all clear. It doesn't matter which linux distribution you use as long as the distribution supports the ppc architecture which most do. As long as you have the gnu compiler suite and all associated tools and libraries, php will compile fine. It will also compile using the ibm compilers but it takes a bit of wrangling to get it to compile. -Brent - Original Message - From: "Pierre Ancelot" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 27, 2004 8:09 AM Subject: Re: [PHP] PHP5 on IBM PowerPC; good combination? > > yes, use debian: http://www.debian.org and study the apt system you'll get no > problem. (php 5 is not in "sarge" which is what you should use but compiling > php5 on it gives no problem.) and debian supports very well ppc... > > > > On Wednesday 27 October 2004 15:25, Aaron Gould wrote: > > My company is considering the purchase of a fairly nice IBM PowerPC > > system, running SuSe Linux (presumably version 9.2 by the time we get > > it). This will be replacing our aging Compaq as our main server for our > > mission-critical apps. > > > > Does anyone here have experience compiling PHP 5.x on a Linux-based > > PowerPC architecture? My primary concern is that it actually compiles > > without trouble; all we have here now are x86 systems, so we can't test > > this combination! > > > > -- > > Aaron Gould > > Parts Canada - Web Developer > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 on IBM PowerPC; good combination?
This has nothing to do with packaging systems or your choice of distribution. His question was if it compiled on a linux-based ppc architecture. I answered his question. You told him to use a specific distribution with a specific packaging system. That was not his question. -Brent - Original Message - From: "Pierre Ancelot" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 27, 2004 8:40 AM Subject: Re: [PHP] PHP5 on IBM PowerPC; good combination? > > Yes and welcome troubles with rpm when you use suse or redhat... that's why i > preconise debian, not have troubles this wise, when you need a lib > > > On Wednesday 27 October 2004 15:15, Brent Clements wrote: > > Just so we are all clear. It doesn't matter which linux distribution you > > use as long as the distribution supports the ppc architecture which most > > do. As long as you have the gnu compiler suite and all associated tools and > > libraries, php will compile fine. > > > > It will also compile using the ibm compilers but it takes a bit of > > wrangling to get it to compile. > > > > -Brent > > - Original Message - > > From: "Pierre Ancelot" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, October 27, 2004 8:09 AM > > Subject: Re: [PHP] PHP5 on IBM PowerPC; good combination? > > > > > yes, use debian: http://www.debian.org and study the apt system you'll > > > get > > > > no > > > > > problem. (php 5 is not in "sarge" which is what you should use but > > > > compiling > > > > > php5 on it gives no problem.) and debian supports very well ppc... > > > > > > On Wednesday 27 October 2004 15:25, Aaron Gould wrote: > > > > My company is considering the purchase of a fairly nice IBM PowerPC > > > > system, running SuSe Linux (presumably version 9.2 by the time we get > > > > it). This will be replacing our aging Compaq as our main server for our > > > > mission-critical apps. > > > > > > > > Does anyone here have experience compiling PHP 5.x on a Linux-based > > > > PowerPC architecture? My primary concern is that it actually compiles > > > > without trouble; all we have here now are x86 systems, so we can't test > > > > this combination! > > > > > > > > -- > > > > Aaron Gould > > > > Parts Canada - Web Developer > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need to add a 0 to a float number
Hi, How would I add a 0 to variables that have the following? I want $var = 6.5 to be converted to $var = 6.50 Thanks, Brent
Re: [PHP] Need to add a 0 to a float number
Solved my own problem Note to self, RTFM: number_format is w hat I needed. Thanks, Brent - Original Message - From: "Brent Clements" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 31, 2004 8:01 PM Subject: [PHP] Need to add a 0 to a float number Hi, How would I add a 0 to variables that have the following? I want $var = 6.5 to be converted to $var = 6.50 Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Very wierd issue with pdf's and rotating images
I have tried this with pretty much every pdf library available to use with PHP and all have the same results. 1. I create a new pdf. 2. I rotate a jpeg using gd's imagerotate 3. I output the jpeg to a new pdf page 4. I then output the pdf to the browser and/or to a file. When I view the pdf, the image that was embedded in the pdf page has a large black rectangular area taking up the first 1/4 of the image. If I do not rotate the image, there is no large black rectangular area. Anybody has an idea what's going on? Thanks, Brent
Re: [PHP] How to display a 'please wait' message whilst processing?
I would suggest using the PEAR Package html_progress available at your friendly neighborhood pear repository mirror. You can extend the class to work as needed and it uses the observer pattern to do it's magic. There are other ways to do this but html_progress is the simplest way to get you up and going. Brent Clements Innovative PHP Development Company ::a division of Im-Online, LLC - Original Message - From: "Brent Baisley" <[EMAIL PROTECTED]> To: "Graham Cossey" <[EMAIL PROTECTED]> Cc: "Php-General" <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 2:03 PM Subject: Re: [PHP] How to display a 'please wait' message whilst processing? > I've read of solutions on how to do this, but can't remember where. You > will probably need to search the message archives. You can pretty much > forget about the flush() command though, browsers don't handle it the > same way. For instance, Internet Explorer won't display anything until > it has either the whole page or a certain amount of data (something > like 24K). Also, I don't think any browser will display anything unless > all the html tags are closed (i.e. ...). > > I think one solution was to use CSS and DHTML to display the wait > message as a separate page in a on the current page. Once the > processing is done, the page will finished loading and the wait message > will be hidden. Unfortunately, I don't think you can use this technique > without javascript. But, I think it will work if javascript is not > enabled, the user just won't see the wait message. > > > On Nov 5, 2004, at 11:50 AM, Graham Cossey wrote: > > > > > [snip] > >> On a number of sites a message and/or graphic is displayed asking you > >> to > >> wait or be patient whilst some processing is being performed to > >> compose the > >> next page. > >> > >> How are these done within PHP scripts? > >> Could output buffering be used for this purpose? > >> For example is it possible to do something like: > >> > > [snip] > > > > Does anyone have any ideas on this? > > > > I do not really want to use META refresh as my understanding is that > > this > > either reloads the same page (loop?) or a new page, which I don't see > > working as I want the "Please wait.." to remain until the processing > > has > > finished, not for a fixed period of time as the report may take 10 > > seconds > > or one minute to complete running. > > > > I want to avoid Javascript if at all possible, as I cannot guarantee it > > being available on the client. > > > > I have managed to use flush() to display some text, but after > > processing (or > > sleep) I cannot 'overwrite' this only add to it. > > > > Any help much appreciated... > > > > Graham > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology Environments > p: 212.759.6400/800.759.0577 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question for the PHP consultants out there.
What web based software project management tool do you use to keep track of projects, project tasks, customer requests, and bug reports? I need something that would allow a customer to keep track of his/her project basically and to use the application to submit bug requests, feature requests, and other similiar items. I'm looking at replacing a home-grown solution I wrote in PHP a while back. I've done the google thing, but everything I've tried doesn't really sit well with me. So...now I'm turning to my peers for suggestions. What do you guy's use and/or suggest? Thanks, Brent
[PHP] Silly OOP question
I've always wondered this about OOP and maybe you guys can answer this question. I'm writing a php application and I'm trying to figure out the correct way to right the oop part of this application. for instance. I have a "project.class" file that has functions for dealing with individual projects because you break down ideas into singular entities in OOP(as I understand it) But what if I wanted to deal with multiple projects such as getting a list of the projects in my database, should I create a function in the "project.class" to handle the now plural request, or should I create a "projects.class" file that has a function called "getProjects". Hopefully I'm explaining this question right. It makes sense in my own head. :-) Thanks, Brent
Re: [PHP] Re: Silly OOP question
Daniel, Thanks for the insight, this is what I had thought. I just wanted to get a peer's validation of my thought process. You hit what I thought was right, right on the head. -Brent - Original Message - From: "Daniel Schierbeck" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 14, 2004 6:54 AM Subject: [PHP] Re: Silly OOP question > Brent Clements wrote: > > I've always wondered this about OOP and maybe you guys can answer this question. > > > > I'm writing a php application and I'm trying to figure out the correct way to right the oop part of this application. > > > > for instance. > > > > I have a "project.class" file that has functions for dealing with individual projects because you break down ideas into singular entities in OOP(as I understand it) > > > > But what if I wanted to deal with multiple projects such as getting a list of the projects in my database, should I create a function in the "project.class" to handle the now plural request, or should I create a "projects.class" file that has a function called "getProjects". > > > > Hopefully I'm explaining this question right. It makes sense in my own head. :-) > > > > Thanks, > > Brent > Well, if I get you right, you have a class named Project holds > information about a project. Now you want a list of the current > projects. I'd make a new class, named ProjectList or something similar, > that can be used to administrate your projects. > > > class Project > { > public $name;// The project's name > public $ownerID; // The user ID of the project's owner > > /* The constructor. Note: this only works in PHP5 */ > public function __construct ($id) > { > $db = mysql_connect(); > // Get project info... > > $this->name= $result['name']; > $this->ownerID = $result['owner']; > } > } > > class ProjectList > { > public $projects = array(); > > public function __construct () > { > $db = mysql_connect(); > $query = mysql_query('SELECT id FROM projects'); > $result = mysql_fetch_array($query); > > foreach ($result as $project_id) { > $this->projects[$project_id] = new Project($project_id); > } > } > > public function listProjects () > { > return $this->projects; > } > > public function addProject ($name, $owner) > { > // ... > } > > public function deleteProject ($id) > { > // ... > } > } > -- > Daniel Schierbeck > > Help spread Firefox (www.getfirefox.com): > http://www.spreadfirefox.com/?q=user/register&r=6584 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I get referer in php?
Let's say I have a page at another site that links to a php script on my server. Is there anyway to get the referrer to the php script using php? Thanks, Brent
[PHP] What should I name my base class?
I know this probably doesn't matter, but what is the pretty standard naming convention for base class names? Should I name it "base.class", "main.class", or the name of my application, "application.class"? What does everyone else use? If I went by the pear standards, they use a base class name of "pear.php" so I probably would go with "application.class" or "application.php" Thanks, Brent
[PHP] Question regarding constructors and child classes
If I have the following: Is there any way to run both the parent and child constructor? The reason I'm asking this is because in my parent class, the constructor creates the database connection, in the child constructor it set's up all variables for the child class. If I recall, I can do a "parent::constructorname()", is there a way to call the parent's constructor more cleanly, to me , stylewise, it looks funny to have parent::foo(). How would I do this? -Brent
[PHP] not related but need pointers
I was wondering, does anyone have a good source for web browser components that are compatible with php? There are a heck of alot of activex components available that allow you to create some very nice web applications. Are there any similiar that a cross-browser compatible that have a really nice professional look like the thousands of activex components out there? Thanks, Brent
[PHP] echo string with question mark in it
I have the following string variable $string = 'test.php?id=' . $id; but when I echo out the string it looks like this test.php? id=# ### is the $id variable value btw. How do I make the ? part of the string instead of php evaluating that question mark? I've tried adding \ before the ? but it doesn't work. Thanks, Brent
Re: [PHP] Spawning new pages
This is simple. echo ""; echo ""; echo "Hello World"; echo ""; echo ""; There are many ways to do what you want to do. It's at the core of PHP. -Brent - Original Message - From: "Christopher Weaver" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 30, 2004 6:54 PM Subject: [PHP] Spawning new pages > I want one of my functions to create and open a new page. I know how to > call an existing page from PHP ala form action, but in this case I want to > dynamically create and then display several pages. I'm thinking that > perhaps I should assemble some HTML, write it out to a files, then open the > HTML file. > > Is this the best way of going about it? > > Can it be done without actually writing the HTML to the disk? > > How do I actually open the page once it's been created? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I underline a string using php and fonts?
I have always wondered this and maybe you guys can help. How do I underline a bit of text using True Type Fonts? Right now, I am creating imagelines but I don't think that's the most efficient way of doing it. Anybody know how to do "underlines" but using the font itself? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question about dates
How does one over come the issue of unix time not going beyond a certain date? ie, when I do echo strtotime("2099-10-08"); it outputs -1 This has to do with the limitations of unix time, so how does one get around it? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML File validation using PHP????
We are running PHP 4.3.2 Is there a class out there that can validate an xml file against a schema? I know in PHP 5+ that the dom package includes simple validation function, but until we upgrade, that's not an option. Can anybody point me in the write direction? I want something simple to where I can: xmlfile('/foolocation/foo.xml'); $xmlvalidator->schemafile('/foolocation/foo.xsd'); echo $xmlvalidator->validate(); ?> If there is someting out there similiar that'd be great, if not can someone please explain to me the basics of validating xml against a schema file? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I start at a specific position in an array? Is there a function?
I know this is a simple question because I could easily write a loop to move to the specific position in the array, but I want to know is there a function to move the array pointer position to a specific position in the array? Thanks, Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please!!
Having a very frustrating problem and I can't seem to figure out why it's happening. 1. As of last week, all of our applications have started to work intermittingly. The codebase has not changed. 2. Sometimes the application will display, sometimes it won't. The browsers "loading progress bar" will move for about 25% then just stop. No timeout or 401 errors occur. 3. There are no errors message in any of the logs files. To test if it's our application we have done the following in our main php file which runs the rest of the application "; --Segment of our code is here-- echo "Step 1 "; --Segment of our code is here-- echo "Step 2 "; ?> Sometimes it doesn't even get to the first line of php code which is the first echo statement, sometimes it gets to step 0 and step 1 and sometimes it gets to all steps. The code between each of these steps is nothing major, nothing calls mysql or anything like that. It's mainly just variable initialization. Again, the entire application runs fine every couple of refreshes. Then sometimes it'll just stop completely. I have turned on all sorts of debugging and nothing. I have reinstalled apache, mysql, and php 2 times. We have also optimize both apache and mysql for for than enough client connections as well are using persistant db connections. But like I said, the application works sometimes, sometimes it doesn't. And the data is pretty static. I am running RHEL 3 U3 with RH php version php-4.3.2-19.ent, RH mysql server version mysql-server-3.23.58-2.3, and RH apache version httpd-2.0.46-44.ent Thanks guys for any help troubleshooting this. -Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php