php-windows Digest 8 Feb 2005 04:04:00 -0000 Issue 2565

Topics (messages 25518 through 25527):

$_SESSION
        25518 by: Dale Attree
        25519 by: Jason Barnett
        25521 by: Mikey

Re: DocGuru - PHP Documentation Tool 1.0 Released
        25520 by: Jason Barnett

outlook calendar
        25522 by: ludovic
        25523 by: tg-php.gryffyndevelopment.com
        25526 by: Jason Barnett

New Windows user having trouble with Apache and PHP
        25524 by: Sunburned Surveyor
        25525 by: Patrick Roane
        25527 by: Jennifer S.

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:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Is there anyway to spoof the $_SESSION array?

--- End Message ---
--- Begin Message --- Dale Attree wrote:
Is there anyway to spoof the $_SESSION array?


For what purpose?

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
> Is there anyway to spoof the $_SESSION array?

Well, depending on your server setup then possibly yes, but generally no.

Mikey

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
Cerauno proudly announces the release of DocGuru Professional 1.0.


No offense intended to you sir... but if you're going to try to sell this product on the list you could at least make comparisons to some of the other (open source / free) projects out there and explain why your project is better. Specifically I'm thinking about doxygen and phpdoc. And you make claims such as "Can cope with large projects easily." Well, *how* does it cope with large projects? What makes your product so good at this?

I'm in no way telling you to keep this off-list... because this kind of
announcement is ok to submit as far as I'm concerned.  However, you
might want to work on your sales pitch...

Sorry, just the business man in me taking over ;)

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Good morning,

Is it possible to reach the data of the outlook calendar (on a server
exchange) with php?

Thank you for advance

--- End Message ---
--- Begin Message ---
= = = Original message = = =

> Good morning,
> 
> Is it possible to reach the data of the outlook calendar (on a server
> exchange) with php?
> 
> Thank you for advance

I've never tried using PHP to connect to an Exchange server directly, but I've 
done some stuff with using PHP to connect via COM to Outlook itself (and let 
Outlook do all the hard work of getting data from Exchange).

Here's some sample code to read calendar entries.  Remember, you have to have 
Outlook currently running on the PC that PHP is running on.

Good luck!

-TG

<?php
$comobjOutlook = new COM("outlook.application") or die("Unable to instantiate 
outlook"); $comobjOutlook -> Activate;

# This is your mailbox name just like it appears in your Folders view.  It 
might be 'Inbox' or something else.
$targetmailboxname = "Personal Folders";

# 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 "\r\n\r\n";
    }

  } else {
    die ("Did not find calendar folder");
  }

} else {
  die("Did not find target mailbox: $targetmailboxname");
}
?>



___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
= = = Original message = = =


Good morning,

Is it possible to reach the data of the outlook calendar (on a server
exchange) with php?

Thank you for advance


I've never tried using PHP to connect to an Exchange server directly, but I've 
done some stuff with using PHP to connect via COM to Outlook itself (and let 
Outlook do all the hard work of getting data from Exchange).

Here's some sample code to read calendar entries.  Remember, you have to have 
Outlook currently running on the PC that PHP is running on.

Good luck!

-TG

<?php
$comobjOutlook = new COM("outlook.application") or die("Unable to instantiate 
outlook"); $comobjOutlook -> Activate;


PHP 5.0.3 crashed after trying this... it complained that there was no property named "Activate". I then tried changing Activate to Activate() in case it was supposed to be a method, but that failed as well. So much for copy and paste, is it ever that easy?

I always have problems with COM.  :-/  Perhaps there is another issue
that I'm unaware of that is preventing me from using COM and / or
preventing Outlook from responding correctly?  Anyone know what I might try?

I should probably add: I'm running Win2K v5.00.2195 (with all critical
updates).  I will try running this code on my WinXP laptop later to see
if the OS is my issue...


-- Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Windows/PHP Users,

I'm new to PHP and I had a question about getting PHP and Apache set
up on Windows. I've installed both PHP and  Apache on my computer per
the install instructions. I have successfully started the Apache
server, after I changed the port from 80 to 8080.

However, when I try to test my Apache/PHP by directing my browser to
http://localhost/phpinfo.php I receive the following error:

"The connection was refused when attempting to contact localhost."

I'm pretty sure that Apache is up and running, so I'm a little
confused by this warning. Could it be a firewall setting on my
computer or a configuration setting on my browser?

I would really appreciate a place to start looking, or any ideas on
where I can look to get this fixed.

Thanks,

The Sunburned Surveyor

P.S. - I'm running Windows 2000 on a Dell Precision 530. Mozilla
Firefox is my browser. I'm using the latest stable releases of both
PHP and Apache.

--- End Message ---
--- Begin Message ---
Do a search for you phpinfo.php on the 'C:' drive.
Make sure that its in your 'www' folder or in your
apach/htdocs folder. Once you've determined this, go
to www.php.net and review the section on 'installing
php on windows'. If all else fails, go to www.wamp.com
and instal the bundle. 





--- Sunburned Surveyor <[EMAIL PROTECTED]>
wrote:

> Windows/PHP Users,
> 
> I'm new to PHP and I had a question about getting
> PHP and Apache set
> up on Windows. I've installed both PHP and  Apache
> on my computer per
> the install instructions. I have successfully
> started the Apache
> server, after I changed the port from 80 to 8080.
> 
> However, when I try to test my Apache/PHP by
> directing my browser to
> http://localhost/phpinfo.php I receive the following
> error:
> 
> "The connection was refused when attempting to
> contact localhost."
> 
> I'm pretty sure that Apache is up and running, so
> I'm a little
> confused by this warning. Could it be a firewall
> setting on my
> computer or a configuration setting on my browser?
> 
> I would really appreciate a place to start looking,
> or any ideas on
> where I can look to get this fixed.
> 
> Thanks,
> 
> The Sunburned Surveyor
> 
> P.S. - I'm running Windows 2000 on a Dell Precision
> 530. Mozilla
> Firefox is my browser. I'm using the latest stable
> releases of both
> PHP and Apache.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. 
You can do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard

--- End Message ---
--- Begin Message ---
If you are pointing your browser to
http://localhost/phpinfo.php you are probably looking
at IIS since you said a few line up that you changed
the Apache port ot 8080.
Maybe you should try
http://localhost:8080/phpinfo.php, if, indeed, you
have a file called phpinfo.php in your web server
root.

Cheers,

Jennifer

 --- Patrick Roane <[EMAIL PROTECTED]> wrote: 
> Do a search for you phpinfo.php on the 'C:' drive.
> Make sure that its in your 'www' folder or in your
> apach/htdocs folder. Once you've determined this, go
> to www.php.net and review the section on 'installing
> php on windows'. If all else fails, go to
> www.wamp.com
> and instal the bundle. 
> 
> 
> 
> 
> 
> --- Sunburned Surveyor
> <[EMAIL PROTECTED]>
> wrote:
> 
> > Windows/PHP Users,
> > 
> > I'm new to PHP and I had a question about getting
> > PHP and Apache set
> > up on Windows. I've installed both PHP and  Apache
> > on my computer per
> > the install instructions. I have successfully
> > started the Apache
> > server, after I changed the port from 80 to 8080.
> > 
> > However, when I try to test my Apache/PHP by
> > directing my browser to
> > http://localhost/phpinfo.php I receive the
> following
> > error:
> > 
> > "The connection was refused when attempting to
> > contact localhost."
> > 
> > I'm pretty sure that Apache is up and running, so
> > I'm a little
> > confused by this warning. Could it be a firewall
> > setting on my
> > computer or a configuration setting on my browser?
> > 
> > I would really appreciate a place to start
> looking,
> > or any ideas on
> > where I can look to get this fixed.
> > 
> > Thanks,
> > 
> > The Sunburned Surveyor
> > 
> > P.S. - I'm running Windows 2000 on a Dell
> Precision
> > 530. Mozilla
> > Firefox is my browser. I'm using the latest stable
> > releases of both
> > PHP and Apache.
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> > 
> > 
> 
> 
> =====
> 
> ----------------
> "forget your lust for the rich man's gold. All that
> you need, is in your soul. You can do this if you
> try. All that I want for you my son, is to be
> satisfied"
> 
>   ~ Lynard Skynard
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>  

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

--- End Message ---

Reply via email to