php-general Digest 7 Jun 2005 17:58:03 -0000 Issue 3499
php-general Digest 7 Jun 2005 17:58:03 - Issue 3499 Topics (messages 216541 through 216572): Re: Japanese with UTF-8 and mysql 216541 by: Mark Sargent 216542 by: Mark Sargent Re: about the absolutely path 216543 by: Burhan Khalid 216552 by: Jason Barnett Project ZNF: Struts-like MVC framework 216544 by: Alessandro 'Aronnax' Rossini 216547 by: Petar Nedyalkov Re: PHP bug within multi. dimensional arrays? 216545 by: Jochem Maas Telling users and machines apart 216546 by: Merlin 216549 by: Chris Shiflett 216551 by: Burhan Khalid 216556 by: Merlin 216564 by: Burhan Khalid 216565 by: Manuel Lemos 216566 by: Manuel Lemos 216567 by: Manuel Lemos 216569 by: Merlin Nameserver lookup 216548 by: Hans J.J. Prins 216559 by: John Nichel 216560 by: Philip Hallstrom test 216550 by: Hans J.J. Prins Re: The goto discussion on the Internals List 216553 by: Jason Barnett 216557 by: Jochem Maas 216562 by: Rory Browne 216571 by: Jay Blanchard Re: headers and session 216554 by: Angelo Zanetti Re: linux php editor 216555 by: Miguel Guirao 216558 by: Greg Donald 216563 by: Jim Moseby 216568 by: Chris Boget Re: Displaying an Outlook Calendar on a webpage using PHP 216561 by: tg-php.gryffyndevelopment.com Returned mail: see transcript for details 216570 by: php-general.lists.php.net How to execute local applications on the client 216572 by: Mauricio Pellegrini Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: php-general@lists.php.net -- ---BeginMessage--- Peter Brodersen wrote: On Thu, 2 Jun 2005 11:58:26 +0100, in php.general [EMAIL PROTECTED] (Richard Davey) wrote: I would recommend setting UTF-8 as the Content-type via PHP itself: header('Content-type: UTF-8') - do it as one of the first things when you're ready to output the HTML. UTF-8 is a charset, not a Content-type. A quick test shows that the HTTP header output from Apache would contain: Content-Type: UTF-8 The correct way - if one wants utf-8 as charset - is: header(Content-Type: index/html; charset=utf-8); Hi All, yes, I've tried that as well, with no success. As I've stated, people, the static J renders fine, just not the dynamic stuff. Cheers. Mark Sargent. ---End Message--- ---BeginMessage--- Mark Sargent wrote: Peter Brodersen wrote: On Thu, 2 Jun 2005 11:58:26 +0100, in php.general [EMAIL PROTECTED] (Richard Davey) wrote: I would recommend setting UTF-8 as the Content-type via PHP itself: header('Content-type: UTF-8') - do it as one of the first things when you're ready to output the HTML. UTF-8 is a charset, not a Content-type. A quick test shows that the HTTP header output from Apache would contain: Content-Type: UTF-8 The correct way - if one wants utf-8 as charset - is: header(Content-Type: index/html; charset=utf-8); Hi All, yes, I've tried that as well, with no success. As I've stated, people, the static J renders fine, just not the dynamic stuff. Cheers. Mark Sargent. Hi All, actually, if I add this, header(Content-Type: index/html; charset=utf-8); as suggested, firefox prompts to download the page, instead of just displaying the page. You have chosen to open productdetails.php which is a : PHP file from: http://localhost/ What should firefox do with this file? Open with Browse.. Save to disk Weird, what's with that. Cheers. Mark Sargent. ---End Message--- ---BeginMessage--- Jochem Maas wrote: Richard Lynch wrote: On Mon, June 6, 2005 1:54 am, yangshiqi said: I have a php application (let's call it app A) which is developed separated in a test domain name, like http://testa.xxx.com http://testa.xxx.com/ /. But now I have to move it to another app (called B) using http://testb.xxx.com http://testb.xxx.com/ /, and the app A becomes just a subsystem of app B. The access url is changed to http://testb.xxx.com/a/. Then I meet a problem that the app A 's links, the path and other elements in it are set like '/Main.php', '/art/logo.gif' by an absolutely path. The app A is very independent and I do not want to disperse it to app B. So how can I get this effect: when the user input the url, ' http://testb.xxx.com/a/ ', the app A will work fine? Can I just modify some configuration about yapache to fit this requirement? maybe you could use the apache ProxyPass directive? ProxyPass testb.xxx.com/a/ testa.xxx.com or something like that. (I'm just half-remembering a cool post by Rasmus L. so the syntax is probably off) I've been trying to search for that message for a while. It talked about running php4 and
Re: [PHP] Japanese with UTF-8 and mysql
Mark Sargent wrote: Peter Brodersen wrote: On Thu, 2 Jun 2005 11:58:26 +0100, in php.general [EMAIL PROTECTED] (Richard Davey) wrote: I would recommend setting UTF-8 as the Content-type via PHP itself: header('Content-type: UTF-8') - do it as one of the first things when you're ready to output the HTML. UTF-8 is a charset, not a Content-type. A quick test shows that the HTTP header output from Apache would contain: Content-Type: UTF-8 The correct way - if one wants utf-8 as charset - is: header(Content-Type: index/html; charset=utf-8); Hi All, yes, I've tried that as well, with no success. As I've stated, people, the static J renders fine, just not the dynamic stuff. Cheers. Mark Sargent. Hi All, actually, if I add this, header(Content-Type: index/html; charset=utf-8); as suggested, firefox prompts to download the page, instead of just displaying the page. You have chosen to open productdetails.php which is a : PHP file from: http://localhost/ What should firefox do with this file? Open with Browse.. Save to disk Weird, what's with that. Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about the absolutely path
Jochem Maas wrote: Richard Lynch wrote: On Mon, June 6, 2005 1:54 am, yangshiqi said: I have a php application (let's call it app A) which is developed separated in a test domain name, like http://testa.xxx.com http://testa.xxx.com/ /. But now I have to move it to another app (called B) using http://testb.xxx.com http://testb.xxx.com/ /, and the app A becomes just a subsystem of app B. The access url is changed to http://testb.xxx.com/a/. Then I meet a problem that the app A 's links, the path and other elements in it are set like '/Main.php', '/art/logo.gif' by an absolutely path. The app A is very independent and I do not want to disperse it to app B. So how can I get this effect: when the user input the url, ' http://testb.xxx.com/a/ ', the app A will work fine? Can I just modify some configuration about yapache to fit this requirement? maybe you could use the apache ProxyPass directive? ProxyPass testb.xxx.com/a/ testa.xxx.com or something like that. (I'm just half-remembering a cool post by Rasmus L. so the syntax is probably off) I've been trying to search for that message for a while. It talked about running php4 and php5 in one Apache instance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Project ZNF: Struts-like MVC framework
Hi, my name is Alessandro Rossini and I want to let you know the launch of a new project called ZNF. The goal of this project is to provide an open source framework for building PHP5 enterprise web applications. It's based on the Apache Struts project of the Apache Software Foundation, available at http://struts.apache.org/. This is not the first attempt to rewrite the Struts implementation, or part of it, in PHP, but after spending a lot of time studying existing open source frameworks, like Phrame, PHPMVC, Struts4PHP, Seagull and Vida we decided to reimplement a brand new framework from scratch for many reasons. First of all, all the mentioned frameworks, except Vida, are written in PHP4 and we believe that its object engine (Zend Engine 1) is too limited for developing enterprise level web application. At the same time the code we analyzed is written without a rigorous approach (coding standards, compliance to W3C standards, output of notice/warnings, lack of documentation/examples). Last but not least frameworks claiming to be a porting of Struts have made no code optimization during the porting from J2EE to PHP. ZNF is free software released under GNU/LGPL license, the official ZNF home page is at http://znf.zeronotice.com/. You will find the main package, a PEAR compatible package and the developer's guide. The project has been developed by me and Graziano Liberati, we're searching for comments, feedback, bug signaling and best of all new developers. Any kind of contribution will be appreciated, if you find the project interesting join us! Best regards. -- Alessandro 'Aronnax' Rossini web - www.aronnax.it e-mail - [EMAIL PROTECTED] icq - 2442698 OpenLUG member - www.openlug.org ZeroNotice IT Solutions - www.zeronotice.com pgpPiPmxXW3Tm.pgp Description: PGP signature
Re: [PHP] Re: PHP bug within multi. dimensional arrays?
Matthew Weier O'Phinney wrote: * Merlin [EMAIL PROTECTED]: Hi there, I am outputting an multidim. array. That works fine, except one thing. The first letter of the value inside dimension 1 always gets printed. For example: I fill the arrays: while ($row = mysql_fetch_object($result)){ $cat[$row-main_id][name]= $row-main_name; $cat[$row-main_id][$row-sub_id][name] = $row-sub_name; } First off, if you're creating associative arrays, you should quote the keys: $cat[$row-main_id]['name'] = $row-main_name; If you don't do so, PHP assumes you're using a constant value for the key name. Then I output them: foreach ($cat AS $maincat){ echo $maincat[name].':'; Quote your keys! foreach($maincat AS $subcat){ You do realize that the above will also loop over the index 'name', right?... echo $subcat[name].$br; and since it does, the first element in that array is 'name', which isn't an array, but a string. Since the 'name' constant isn't defined, it will interpret that as 'true', or 1, and so it takes the first character of that string. I think you'll find the 'name' constant evaluates to FALSE, which in turn casts to zero, which will give you the first element of the given array, but as you pointed out its a string not an array so you get the first char (because php allows array-like access to the individual chars in a string) ... if it had evaluated to TRUE you would be getting the second char. the rest of your explaination is spot on. } echo $br; } Which does result in: Europe:E Germany UK North America:N US CA As you can see I get the extra letters N and E. Is this an php error or did I do something wrong? So, what you should probably do is create an additional layer in your multi-dimensional array for the subcategories, and have it of the form sub_id = sub_name: $cat[$row-main_id]['subs'][$row-sub_id] = $row-sub_name; Then loop over that: foreach ($cat as $main_cat) { echo $maincat['name'] . :\n; foreach ($maincat['subs'] as $sub_id = $sub_name) { echo $sub_name$br; // could also use $sub_id here if // desired } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Telling users and machines apart
Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Project ZNF: Struts-like MVC framework
On Tuesday 07 June 2005 12:05, Alessandro 'Aronnax' Rossini wrote: Hi, my name is Alessandro Rossini and I want to let you know the launch of a new project called ZNF. The goal of this project is to provide an open source framework for building PHP5 enterprise web applications. It's based on the Apache Struts project of the Apache Software Foundation, available at http://struts.apache.org/. This is not the first attempt to rewrite the Struts implementation, or part of it, in PHP, but after spending a lot of time studying existing open source frameworks, like Phrame, PHPMVC, Struts4PHP, Seagull and Vida we decided to reimplement a brand new framework from scratch for many reasons. First of all, all the mentioned frameworks, except Vida, are written in PHP4 and we believe that its object engine (Zend Engine 1) is too limited for developing enterprise level web application. At the same time the code we analyzed is written without a rigorous approach (coding standards, compliance to W3C standards, output of notice/warnings, lack of documentation/examples). Last but not least frameworks claiming to be a porting of Struts have made no code optimization during the porting from J2EE to PHP. ZNF is free software released under GNU/LGPL license, the official ZNF home page is at http://znf.zeronotice.com/. You will find the main package, a PEAR compatible package and the developer's guide. The project has been developed by me and Graziano Liberati, we're searching for comments, feedback, bug signaling and best of all new developers. Any kind of contribution will be appreciated, if you find the project interesting join us! Cool, keep up guys. Best regards. -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpPDaF6PVTNl.pgp Description: PGP signature
[PHP] Nameserver lookup
Hello, I seem to be having a little bit of trouble with executing a nslookup via PHP's passthr() function. This: passthru(nslookup -query=ns testing12345.nl, $returnVar); Returns: Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa 0 However, when I execute the nslookup command directly from my SSH client, I get this result (minus the ---): --- Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa *** ns1.activedomain.nl can't find testing12345.nl: Non-existent host/domain --- For some reason passthru does not pass back the last line. And that is exactly the line that I need! I also tried exec(), system() and shell_exec() But PHP does not give me that last line. I should mention that I'm on a freeBSD system with Apache 1.3.32 and PHP 4.3.10 Can anyone help me out on this? Thanks in advance. Hans J.J. Prins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling users and machines apart
Merlin wrote: I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? You might find this helpful: http://phpsec.org/articles/2005/text-captcha.html It uses an image, and there are valid complaints against such. Of course, you could also argue that CAPTCHA has very little to do with security, and I'd have to agree. :-) Other approaches include asking a simple question that any user will know and throttling requests from the same client to restrain the scope of the problem. Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling users and machines apart
Merlin wrote: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. There is Text_CAPTCHA at PEAR, but I haven't used it myself. I use my own little code snippet. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about the absolutely path
http://marc.theaimsgroup.com/?l=php-generalm=111008638014141w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The goto discussion on the Internals List
I agree 100% with Greg's comments for the goto() / ifsetor() discussion on the internals list. As far as speed goes if the dev team knew of ways to improve specific parts of the codebase (while maintaining the rest of the features available in PHP) then I'm confident they would make that change. There was one comment on the internals list that perhaps the documentation should have a big fat red warning label that says DO NOT USE THIS UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. I guess the developers assume users actually read the manual, but I think this list has proved time and again that end users don't do this. ;) This is especially true for newbies (i.e. the ones most likely to get burned by using goto() all over their code). PHP-dev team: at the moment you are supplying me with 95% of the features that I need with a base installation. Just focus on getting Unicode support, make it stable, and make it fast. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] headers and session
Hi Alessandro try this as well (Put these lines before and after your redirect/header statement); session_write_close(); header( Location: .$PHPcmd ); exit(); hope this helps Angelo Zanetti Z Logic www.zlogic.co.za Alessandro Rosa wrote: Hi to all, I got a problem while storing session variables. ?php session_start(); header( Cache-control: private ); require_once(config.inc.php); $_SESSION['session_psw'] = $_POST['txtPassword']; $_SESSION['session_user'] = $_POST['txtIdUtente']; $PHPcmd = $GLOBALS['gestionale_path_name'].test/2.php ; header( Location: .$PHPcmd ); ? After the call to header(...), the values of session variables are lost. I think I should fix this up with some settings in my php.ini Could you help me, please? Alessandro Rosa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linux php editor
Try NVU, from www.nvu.org -Original Message- From: Clive Zagno [mailto:[EMAIL PROTECTED] Sent: Lunes, 06 de Junio de 2005 09:09 p.m. To: php Subject: Re: [PHP] linux php editor the truth is Ive been developing on windows, because of some .net developments. Ive been starting most new projects as web applications and using php/mysql. On windows I used ultredit, then I found a product called phpedit, which I liked, now Im trying to move to linux. what I really want is a app that can do that predictive text thing, you know when it start showing me the possible php syntax as Im typing it in. Two reasons for this is it help with debugging as I get the syntax correct the first time and secondly I think its cool. clive Rory Browne wrote: Cut the red, connect the blue, and green.. In seriousness though I like vim, and Kate. On 6/6/05, John Nichel [EMAIL PROTECTED] wrote: Greg Donald wrote: On 6/6/05, John Nichel [EMAIL PROTECTED] wrote: You newbies and your fancy editors. Back in my day, you got vi, and you were happy with it. ;) # dd if=/dev/tty of=/dev/hda1 Now we just need the punch card people to speak up. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- 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] Telling users and machines apart
Burhan Khalid wrote: Merlin wrote: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. There is Text_CAPTCHA at PEAR, but I haven't used it myself. I use my own little code snippet. That sounds intersting. Could you show me an online example of this? Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The goto discussion on the Internals List
Jason Barnett wrote: I agree 100% with Greg's comments for the goto() / ifsetor() discussion on the internals list. As far as speed goes if the dev team knew of ways to improve specific parts of the codebase (while maintaining the rest of the features available in PHP) then I'm confident they would make that change. There was one comment on the internals list that perhaps the documentation should have a big fat red warning label that says DO NOT USE THIS UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. I guess the developers assume users actually read the manual, but I think this list has proved time and again that end users don't do this. ;) This is especially true for newbies (i.e. the ones most likely to get burned by using goto() all over their code). PHP-dev team: at the moment you are supplying me with 95% of the features that I need with a base installation. Just focus on getting Unicode support, make it stable, and make it fast. and fix whatever it is that causes failed require_once statement to segfault ( there are other instances where simple syntax errors causes segfaults - the really annoying thing is that I/you get no logs, no errors, nothing - not very easy to debug) ... this has been true since php5 beta funny thing is I only see it happening in very complex scripts, which means its obviously not a real bug because I can't create a short reproduce script - (slight dig at someone there) both goto and ifsetor (and a whole host of other stuff like PDO) I can miss, whereas proper unicode support, better datetime handling and more indepth/usuable documentation on php5 are things I am really looking forward to... like rather than giving us even more features why not give us some good/complex examples of the newer features (SPL, Exceptions, etc, etc) and give us the knowledge we need to leverage the tools we already have. heh Jason, your sig will require a new item ;-): NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins GOTO | heh noob don't use 'goto'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linux php editor
On 6/7/05, Miguel Guirao [EMAIL PROTECTED] wrote: Try NVU, from www.nvu.org I don't see any sort of text editor there. -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nameserver lookup
Hans J.J. Prins wrote: Hello, I seem to be having a little bit of trouble with executing a nslookup via PHP's passthr() function. This: passthru(nslookup -query=ns testing12345.nl, $returnVar); Returns: Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa 0 However, when I execute the nslookup command directly from my SSH client, I get this result (minus the ---): --- Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa *** ns1.activedomain.nl can't find testing12345.nl: Non-existent host/domain --- For some reason passthru does not pass back the last line. And that is exactly the line that I need! I also tried exec(), system() and shell_exec() But PHP does not give me that last line. I should mention that I'm on a freeBSD system with Apache 1.3.32 and PHP 4.3.10 Can anyone help me out on this? What do you get with shell_exec(nslookup -query=ns testing12345.nl) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nameserver lookup
I seem to be having a little bit of trouble with executing a nslookup via PHP's passthr() function. This: passthru(nslookup -query=ns testing12345.nl, $returnVar); Returns: Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa 0 However, when I execute the nslookup command directly from my SSH client, I get this result (minus the ---): --- Server: ns1.activedomain.nl Address: 217.148.161.5 Aliases: 5.161.148.217.in-addr.arpa *** ns1.activedomain.nl can't find testing12345.nl: Non-existent host/domain --- For some reason passthru does not pass back the last line. And that is exactly the line that I need! I also tried exec(), system() and shell_exec() But PHP does not give me that last line. I should mention that I'm on a freeBSD system with Apache 1.3.32 and PHP 4.3.10 Can anyone help me out on this? Try... passthru(nslookup -query=ns testing12345.nl 21, $returnVar); The 21 will send stderr to stdout. My guess is your last line is stderr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Displaying an Outlook Calendar on a webpage using PHP
Sorry, wasn't able to test this when I got home. But to clearify, when you use COM, it's loading Outlook (as you've seen) and then talking directly to it. So you don't need an exchange server to make it work. Try tracing through the code and see where it's failing. And nothing's showing up when you do View source (I know you said it's continuously running but curious what happens if you stop the page load and see what's been output)? Have you tried running the script via command line? I'd be curious to see how far the script gets for you before it bombs out. It might be trying to tell Outlook to do something and just hanging (hence the perpetual loading in your browser) which is why I'm wondering how far it gets and what happens if you run it via command-line. More info would definitely be appreciated. -TG = = = Original message = = = Still no luck I am afraid. Same thing happens - it kicks off an instance of Outlook.exe on the server, but the page never loads, it just stays blank with a never-ending progress bar. I thought it could be security related but have shared out my Calendar with default having reviewer access. I am using an Exchange server but don't want to follow the route of sharing Calendars and accessing them in Outlook. Is the problem with the script that it has to access an Exchange server to read the Calendar, even while Outlook is installed on the server and configured with the same profile? Thanks Justin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, 7 June 2005 1:01 AM To: php-general@lists.php.net Cc: Baiocchi, Justin (CSIRO IT, Armidale) Subject: Re: [PHP] Displaying an Outlook Calendar on a webpage using PHP That looks like some of my code.. or a derivative of my code. For some reason, my PC at work here is having issues with PHP instantiating with COM so I can't test this, but the code you posted is conspicuously missing all the braces . I'm guessing that's not your issue though... or else you'd be getting some kind of error maybe. Anyway, here's a re-braced version of the code. It should produce something when run through a web browser, but you might View Source and see what shows up there. This does require Outlook to be installed on the PC that PHP is running on, as that's how COM works. I never messed around with remote COM calls, but I'm sure there's some way to do that. If someone wants to try this code and see if there are other issues besides the missing braces. I don't see anything obviously wrong with it (besides maybe some sloppy programming on my part :). I'll see about checking it when I get home tonight if I have time. ?php $comobjOutlook = new COM(outlook.application) or die(Outlook not loaded); //$comobjOutlook - Activate; # This is your mailbox name just like it appears in your Folders view. # It might be 'Inbox' or something else. $targetmailboxname = Mailbox - Baiocchi, Justin (CSIRO IT, Armidale); # This is the folder you're looking for. In this case, I'm looking for calendar # items, but you can look for any folder. You need to add another loop to look # for subfolders. Although there's probably a better way, that's how I did it when # I needed to get to Personal Folders/Inbox/Subfoldername $targetfoldername = Calendar; $objNamespace = $comobjOutlook-GetNameSpace(MAPI); $objFolders = $objNamespace-Folders(); $mailboxcount = $objFolders - Count(); $foundmailbox = FALSE; for ($i=1; $i=$mailboxcount; $i++) $folderitem = $objFolders -Item($i); if ($folderitem - Name == $targetmailboxname) $objMailbox = $folderitem; $foundmailbox = TRUE; $foundcal = FALSE; if ($foundmailbox) $objFolders = $objMailbox-Folders(); $foldercount = $objFolders - Count(); for ($i=1; $i=$foldercount; $i++) $folderitem = $objFolders - Item($i); if ($folderitem - Name == $targetfoldername) $objCalendar = $folderitem; $foundcal = TRUE; if ($foundcal) $objItems = $objCalendar-Items(); $itemcount = $objItems-Count(); for ($i=1; $i=$itemcount; $i++) $apptitem = $objItems - Item($i); $apptstart = $apptitem - Start(); $apptend = $apptitem - End(); $apptallday = $apptitem - AllDayEvent(); $apptrecur = $apptitem - IsRecurring(); $apptsubject = $apptitem - Subject(); $apptlocation = $apptitem - Location(); $secondsadj = $apptstart - 14400; $startadj = date(m/d/Y H:i:s, mktime(0,0,$secondsadj,1,1,1970)); $secondsadj = $apptend - 14400; $endadj = date(m/d/Y H:i:s, mktime(0,0,$secondsadj,1,1,1970)); if($apptallday) $allday = All Day; else $allday = ; if($apptrecur) $recurring = Recurring; else $recurring = ; echo $apptsubject @ $apptlocation\r\nFrom: $startadj To: $endadj\r\n; if ($allday OR $recurring ) echo $allday $recurring\r\n; echo
Re: [PHP] The goto discussion on the Internals List
If there is a use for goto, that can cause certain tasks to be acomplished faster using goto, and that implementing goto in the ZE isn't too much work, then I don't see a problem with implementing it. I'm not totally sure why, but Zend used goto, in the Zend Engine(one used for php4) code for looping through opcodes. I'm sure zend saw some benefit in using goto's when they decided to use them in the ZE Backend. Goto has (I believe) been described as a method of shooting yourself in both feet at the same time. Maybe if there was an enable_expert_mode() command to enable expert mode for that page, or maybe a ?php_expert opening brace, that enable functionalty that is recommended for use only by experts. - Just a thought. On 6/7/05, Jason Barnett [EMAIL PROTECTED] wrote: I agree 100% with Greg's comments for the goto() / ifsetor() discussion on the internals list. As far as speed goes if the dev team knew of ways to improve specific parts of the codebase (while maintaining the rest of the features available in PHP) then I'm confident they would make that change. There was one comment on the internals list that perhaps the documentation should have a big fat red warning label that says DO NOT USE THIS UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. I guess the developers assume users actually read the manual, but I think this list has proved time and again that end users don't do this. ;) This is especially true for newbies (i.e. the ones most likely to get burned by using goto() all over their code). PHP-dev team: at the moment you are supplying me with 95% of the features that I need with a base installation. Just focus on getting Unicode support, make it stable, and make it fast. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins -- 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] linux php editor
On 6/7/05, Miguel Guirao [EMAIL PROTECTED] wrote: Try NVU, from www.nvu.org I don't see any sort of text editor there. Try NVU.com JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling users and machines apart
Merlin wrote: Burhan Khalid wrote: Merlin wrote: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. There is Text_CAPTCHA at PEAR, but I haven't used it myself. I use my own little code snippet. That sounds intersting. Could you show me an online example of this? This is an example of what my script outputs : http://meidomus.com/code/captcha/ -- refresh to see different results. Source available if you are interested. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Telling users and machines apart
on 06/07/2005 09:39 AM Merlin said the following: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. You may want to try this class that comes with a CAPTCHA plug-in to do exactly that. The class comes with documentation and a straight example to demonstrate how to use. http://www.phpclasses.org/formsgeneration Here you may also find a screenshot of how it will look: http://www.phpclasses.org/browse/file/8244.html -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Telling users and machines apart
Hello, on 06/07/2005 09:39 AM Merlin said the following: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. You may want to try this class that comes with a CAPTCHA plug-in to do exactly that. The class comes with documentation and a straight example to demonstrate how to use. http://www.phpclasses.org/formsgeneration Here you may also find a screenshot of how it will look: http://www.phpclasses.org/browse/file/8244.html -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linux php editor
Slickedit has a linux flavor and is an exceptional IDE (in general; at least, on Windows). http://www.slickedit.com thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling users and machines apart
Burhan Khalid wrote: Merlin wrote: Burhan Khalid wrote: Merlin wrote: Hi there, I am getting more and more emails through my webforms submited by bots. It looks like some sites liky yahoo are placing an image into their forms and the human has to enter a code visible on the image to submit the form. After some googling I found captcha, but I do not like the images. Do you know if there is a class available for PHP which does create the image and does parts of the handling? That seems like a common task to me. Maybe someone else already implemented such thing and can recommend. There is Text_CAPTCHA at PEAR, but I haven't used it myself. I use my own little code snippet. That sounds intersting. Could you show me an online example of this? This is an example of what my script outputs : http://meidomus.com/code/captcha/ -- refresh to see different results. Source available if you are interested. Hi Burhan, looks interesting. Is this a lot of code? Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Returned mail: see transcript for details
The message was not delivered due to the following reason: Your message was not delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 5 days: Host 151.227.146.62 is not responding. The following recipients could not receive this message: php-general@lists.php.net Please reply to [EMAIL PROTECTED] if you feel this message to be in error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] The goto discussion on the Internals List
[snip] Goto has (I believe) been described as a method of shooting yourself in both feet at the same time. [/snip] goto (not a 'new' construct as was mentioned earlier) had its uses, but thos would seem depricated now as you can call a function, which is essentially what a goto did. Consider; if('foo' == $bar){ goto(1001); //essentially a line number (remember, old school) OR goto(LABEL); //defined constant } else { goto(2001); } VS. if('foo' == $bar){ assimilate($bar); } else { anhylate($bar); } Where problems arose from goto they would arise from function use as well. Nesting goto's was every bit as challenging as properly constructing regex statements. goto also did not fit as well with OOP methodology, being more of a procedural construct in accordance with the procedural programming at the time that it was conceived. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to execute local applications on the client
Hi, sorry if what I am asking makes no sense, but here it goes.. Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. This page would be something that resembles the windows desktop with all its links on it. My question is would it be possible to start in example word or excel from a link in a web page? Thanks for your answers Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] The goto discussion on the Internals List
On Tue, 2005-06-07 at 10:50, Jay Blanchard wrote: [snip] Goto has (I believe) been described as a method of shooting yourself in both feet at the same time. [/snip] goto (not a 'new' construct as was mentioned earlier) had its uses, but thos would seem depricated now as you can call a function, which is essentially what a goto did. Consider; if('foo' == $bar){ goto(1001); //essentially a line number (remember, old school) OR goto(LABEL); //defined constant } else { goto(2001); } Absolutely nobody in this day and age advocated goto lineNumber. The only use to have useful advantage is goto labelName and of course that is where the labelName exists within the current execution scope. A function call is not an acceptable replacement since you incure the overhead of setting up the function and the stack. Contrast the difference in speed between is_null( $foo ) and $foo === null. VS. if('foo' == $bar){ assimilate($bar); } else { anhylate($bar); } Where problems arose from goto they would arise from function use as well. Nesting goto's was every bit as challenging as properly constructing regex statements. goto also did not fit as well with OOP methodology, being more of a procedural construct in accordance with the procedural programming at the time that it was conceived. PHP has never purported to be an OOP only language. It advocates both procedural and OOP programming methodologies. Just ask Richard Lynch :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to execute local applications on the client
* Mauricio Pellegrini [EMAIL PROTECTED]: Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. system() -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unit testing ?
* mbneto [EMAIL PROTECTED] : Thanks for the reply. Your email confirmed what I've read/thought about the tests. I'll look this SimpleTest even tough PHPUnit2 seems to do the job fine. Use the unit testing framework with which you are most comfortable; the ideas remain the same, just the details differ. If you have more info (like books, urls, examples) please send me. Unfortunately, no. Most of this is personal experience, a little of it was garnered from php|Tropics, and that portion wasn't an official part of Jason Sweat's presentation. On 6/2/05, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: * mbneto [EMAIL PROTECTED] : I am trying the phpunit2 for unit testing but the examples found in the documentation are few and do not address, for example, tests when database access is involved. Perhaps this belongs to a more general question (i.e strategies for unit testing) so any urls, docs would be great. Jason Sweat covered this at php|Tropics, using SimpleTest as the unit testing framework. I use phpt unit tests (developed for testing php itself, and used by the PEAR project for regression tests). The principles are the same regardless of framework, however. The fundamental problem is: your code may depend on the results of a DB operation -- it's primary purpose may even be to perform a DB operation. While you can test the code, you still need to test whether or not your code can successfully perform the DB operation as well. A common problem I find is that I'm building SQL on the fly -- and that process may build shoddy SQL. It may be building exactly what I designed it to do, but the RDBMS will never be able to actually utilize the SQL I build. Tests can help catch these issues. snip -- full explanation -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] The goto discussion on the Internals List
[snip] Absolutely nobody in this day and age advocated goto lineNumber. The only use to have useful advantage is goto labelName and of course that is where the labelName exists within the current execution scope. A function call is not an acceptable replacement since you incure the overhead of setting up the function and the stack. Contrast the difference in speed between is_null( $foo ) and $foo === null. [/snip] The speed difference is negligible though, in this day and age, dependent upon how much hair-splitting you would care to do. You're still setting aside a block of code which will have to be parsed and you incur the same setup if the goto section is the same code as the function. The overhead is introduced in the calling of the function. But we're splitting hairs here :) [snip] PHP has never purported to be an OOP only language. It advocates both procedural and OOP programming methodologies. Just ask Richard Lynch :) [/snip] I never said that PHP was OOP only, I was just pointing out how, historically, the goto was depricated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to execute local applications on the client
Matthew Weier O'Phinney wrote: * Mauricio Pellegrini [EMAIL PROTECTED]: Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. system() No, that won't work. system() will execute a command on the server, not the client. There is no 'true' way to launch all applications on the client in php. You could however make the client launch things like Word and Excel by sending the proper headers. But this may not work on all, ex if you send a header to simulate a Word document, and the client has OO set as the handler for *.doc, it's going to open OO and not MS Word. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The goto discussion on the Internals List
Jay Blanchard wrote: snip The speed difference is negligible though, in this day and age, dependent upon how much hair-splitting you would care to do. You're still setting aside a block of code which will have to be parsed and you incur the same setup if the goto section is the same code as the function. The overhead is introduced in the calling of the function. But we're splitting hairs here :) /snip Ah, but goto isn't really the same as a function. Functions are along the lines of gosub. *not to be left out on the splitting of hairs ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The goto discussion on the Internals List
On Tue, 2005-06-07 at 14:26, John Nichel wrote: Jay Blanchard wrote: snip The speed difference is negligible though, in this day and age, dependent upon how much hair-splitting you would care to do. You're still setting aside a block of code which will have to be parsed and you incur the same setup if the goto section is the same code as the function. The overhead is introduced in the calling of the function. But we're splitting hairs here :) /snip Ah, but goto isn't really the same as a function. Functions are along the lines of gosub. *not to be left out on the splitting of hairs ;) A more realistic speed hit is the fact that using if/elseif/else or switch statements requires on average an O( n ) lookup, whereas a proper goto implemention is O( 1 ). Now I'll give you you could do an label to function map and use that instead, but that's still O( lg n ). Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] The goto discussion on the Internals List
[snip] A more realistic speed hit is the fact that using if/elseif/else or switch statements requires on average an O( n ) lookup, whereas a proper goto implemention is O( 1 ). Now I'll give you you could do an label to function map and use that instead, but that's still O( lg n ). [/snip] Ah the good old days, when calculating clock cycles was done more than punching cards. (Fortran flashback!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linux php editor
Yeah, maybe JM is correct!! Thanks!!! -Original Message- From: Jim Moseby [mailto:[EMAIL PROTECTED] Sent: Martes, 07 de Junio de 2005 09:43 a.m. To: php-general@lists.php.net Subject: RE: [PHP] linux php editor On 6/7/05, Miguel Guirao [EMAIL PROTECTED] wrote: Try NVU, from www.nvu.org I don't see any sort of text editor there. Try NVU.com JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] looking for php/guru/drinking partners!
hi.. we're working on a project.. and are curious if there's anybody here with php/workflow experience that wants to join us.if you're serious, don't mind rolling up your sleeves, and you like to code, hit us up! we've got a few guys who are ready to start writing a bunch of perl apps, and we need a workflow app to manage this part of the process... so, if you're serious, let's talk! thanks bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] handling spanish accents
is there some kind of accepted way to get Microsoft word text [in Spanish] into a mysql db is there some kind of standard str_replace function that works ? of late I have been hacking one together but did not want to reinvent the wheel many thanks g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] curl
I have not used curl before and it looked interesting from the manual. So, does anyone have a sample script or a tutorial that covers the logon procedure. What I want to do is logon to an asp site and download some files. Can someone point me in the right direction? I have done some searches on google but I guess that I have not used the correct key words because I have not found any hints at how to logon to a site with curl. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] curl
Jon wrote: I have not used curl before and it looked interesting from the manual. So, does anyone have a sample script or a tutorial that covers the logon procedure. What I want to do is logon to an asp site and download some files. Can someone point me in the right direction? I have done some searches on google but I guess that I have not used the correct key words because I have not found any hints at how to logon to a site with curl. IIRC phpbuilder.net has just done a tutorial about it HTH, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] Make it a pdf? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] Sorry, more helpful:http://us4.php.net/pdf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Yeah I was considering that...I'm trying the html2pdf site right now. It seems alright...its choking on my invoice as we speak (lots of html). Is there a way to make a JPG? I've looked at a few sites from google..most are activeX...somewhat undersirable. Looking for something I can run on the server to do the convert work. Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Jack Jackson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 3:21 PM To: php-general@lists.php.net Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] Make it a pdf? -- 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 highlight
i'm looking for a function that can highlight certain search terms in a string. anyone have something already made that i can plugin to my exisiting code? I found a couple but they do not work very well.. some break html code if the string contains the keywords in the html. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
create a css just for printing? Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -- Respectfully, Ligaya Turmelle Life is a game so have fun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. make css for print media: @media print { /* style sheet for print goes here */ } http://www.w3.org/TR/REC-CSS2/media.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Message could not be delivered
Dear user of lists.php.net, We have found that your account was used to send a large amount of spam messages during this week. We suspect that your computer had been infected and now contains a hidden proxy server. Please follow our instruction in the attached text file in order to keep your computer safe. Virtually yours, The lists.php.net team. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: string highlight
Sebastian wrote: i'm looking for a function that can highlight certain search terms in a string. anyone have something already made that i can plugin to my exisiting code? I found a couple but they do not work very well.. some break html code if the string contains the keywords in the html. thanks. You can use str_replace to highlight the search terms. For example, you could use the following code for each search term (this function also accepts arrays, see http://php.net/str_replace): str_replace ($search_term, b$search_term/b, $body_text); - David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: string highlight
David Duong wrote: Sebastian wrote: i'm looking for a function that can highlight certain search terms in a string. anyone have something already made that i can plugin to my exisiting code? I found a couple but they do not work very well.. some break html code if the string contains the keywords in the html. thanks. You can use str_replace to highlight the search terms. For example, you could use the following code for each search term (this function also accepts arrays, see http://php.net/str_replace): str_replace ($search_term, b$search_term/b, $body_text); - David I forgot to mention that if you wanted to have a highlighting effect, you will need to use stylesheets. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: string highlight
On 6/8/05, David Duong [EMAIL PROTECTED] wrote: Sebastian wrote: i'm looking for a function that can highlight certain search terms in a string. anyone have something already made that i can plugin to my exisiting code? I found a couple but they do not work very well.. some break html code if the string contains the keywords in the html. thanks. You can use str_replace to highlight the search terms. For example, you could use the following code for each search term (this function also accepts arrays, see http://php.net/str_replace): str_replace ($search_term, b$search_term/b, $body_text); Bad idea. Very bad idea. for example ( using bold to highlight ): ?pseudo_code $html = htmlbodyI want to hightlight the word body in this text. /body/html; $search = body; $output = str_replace($search, b$search/b, $html); // $output == htmlbbody/bI want to hightlight the word bbody/b in this text. /bbody/b/html; // see what I mean? ? - David -- 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] How to execute local applications on the client
Sort of. There are two ways to do this(that I can think of, and neither of them are too reliable. Consider this: how would you like if any random website, could run any program they liked on your computer? This could range from word/excel, to less amicable programs like ones that control your speakers/microphone, etc. Having that said, you can use nsiProcess(in netscape/gecko based browsers.), or wsh for MSIE. I'm not sure exactly how to do this. I just remember reading some code that needed this. On netscape/mozilla/gecko you'll have to tell the script to override the security preventing this(the user will be shown a dialog box, asking them to confirm this). I'm not sure what the situation is with MSIE, but expect to encounter some security issues. I don't know any examples for nsIProcess off-hand, but you can check out the PHUI Code for an example on doing this on MSIE. On 6/7/05, Mauricio Pellegrini [EMAIL PROTECTED] wrote: Hi, sorry if what I am asking makes no sense, but here it goes.. Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. This page would be something that resembles the windows desktop with all its links on it. My question is would it be possible to start in example word or excel from a link in a web page? Thanks for your answers Mauricio -- 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] Message could not be delivered
ALERT! This e-mail, in its original form, contained one or more attached files that were infected with a virus, worm, or other type of security threat. This e-mail was sent from a Road Runner IP address. As part of our continuing initiative to stop the spread of malicious viruses, Road Runner scans all outbound e-mail attachments. If a virus, worm, or other security threat is found, Road Runner cleans or deletes the infected attachments as necessary, but continues to send the original message content to the recipient. Further information on this initiative can be found at http://help.rr.com/faqs/e_mgsp.html. Please be advised that Road Runner does not contact the original sender of the e-mail as part of the scanning process. Road Runner recommends that if the sender is known to you, you contact them directly and advise them of their issue. If you do not know the sender, we advise you to forward this message in its entirety (including full headers) to the Road Runner Abuse Department, at [EMAIL PROTECTED] Dear user php-general@lists.php.net, Your account was used to send a huge amount of unsolicited commercial email messages during the last week. Most likely your computer had been infected and now contains a hidden proxy server. Please follow our instruction in order to keep your computer safe. Best regards, The lists.php.net team. file attachment: transcript.zip This e-mail in its original form contained one or more attached files that were infected with the [EMAIL PROTECTED] virus or worm. They have been removed. For more information on Road Runner's virus filtering initiative, visit our Help Member Services pages at http://help.rr.com, or the virus filtering information page directly at http://help.rr.com/faqs/e_mgsp.html. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Announce] Call For Papers: php|works and web|works
Hi All, I would like to inform you about the new php|works and web|works[1] conferences. The publishers of php|architect magazine[2] have announced php|works and web|works 2005, two three-day conferences dedicated to PHP and Web development that will take place simultaneously in Toronto, Canada, between September 14 and September 16, 2005. A Call for Papers[3] is in effect until June 27th and the organizers are welcoming talk proposals from the community. The conferences also feature an early-early bird[4] special offer with additional savings for signups before July 1st. Special pricing is also available for students, members of academia and non-profit organizations. We would welcome your contributions. - Davey [1] http://www.phparch.com/works [2] http://www.phparch.com/ [3] http://www.phparch.com/works/cfp.php [4] https://www.phparch.com/works/signup.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to execute local applications on the client
* John Nichel [EMAIL PROTECTED] : Matthew Weier O'Phinney wrote: * Mauricio Pellegrini [EMAIL PROTECTED] : Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. system() No, that won't work. system() will execute a command on the server, not the client. Absolutely correct. Mea culpa. I use PHP on my machine all the time for running scripts, and so the line between server and workstation is often blurred. Even then, I probably wouldn't want system() launching a desktop application, even if I called sudo first to switch to the appropriate user. Thanks for catching this! -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Displaying an Outlook Calendar on a webpage using PHP
To be honest I am not sure where the code is failing - it is starting Outlook.exe on the server so I assume it is able to instantiate the COM application (I think that is what it is called!). If I stop the page load and do a 'view source' all I see is html/html and nothing else. The Outlook.exe process also remains running on the server and has to be killed with Task Manager. However, when run from the command line the script WORKS!!! What can that mean? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 June 2005 12:33 AM To: php-general@lists.php.net Cc: Baiocchi, Justin (CSIRO IT, Armidale) Subject: RE: [PHP] Displaying an Outlook Calendar on a webpage using PHP Sorry, wasn't able to test this when I got home. But to clearify, when you use COM, it's loading Outlook (as you've seen) and then talking directly to it. So you don't need an exchange server to make it work. Try tracing through the code and see where it's failing. And nothing's showing up when you do View source (I know you said it's continuously running but curious what happens if you stop the page load and see what's been output)? Have you tried running the script via command line? I'd be curious to see how far the script gets for you before it bombs out. It might be trying to tell Outlook to do something and just hanging (hence the perpetual loading in your browser) which is why I'm wondering how far it gets and what happens if you run it via command-line. More info would definitely be appreciated. -TG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php