Re: [PHP] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Brice
On Mon, Mar 3, 2008 at 8:57 AM, Louie Miranda [EMAIL PROTECTED] wrote: Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to reply -- not using event handler 3. Send XML data to the host Probably with a socket : http://php.net/manual/en/ref.sockets.php

RE: [PHP] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Bastien Koert
sure, user curl (www.php.net/curl) bastien Date: Mon, 3 Mar 2008 15:57:19 +0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] Can PHP do this? -- w/o using event handler Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to

Re: [PHP] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Richard Lynch
On Mon, March 3, 2008 1:57 am, Louie Miranda wrote: Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to reply -- not using event handler 3. Send XML data to the host ?php $xml = file_get_contents(/path/to/file.xml); $s = fsockopen(remote host here); $reply

Re: [PHP] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Louie Miranda
Thanks everyone. I think, I will go with the sockets. Louie On Tue, Mar 4, 2008 at 12:36 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, March 3, 2008 1:57 am, Louie Miranda wrote: Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to reply -- not

Re: [PHP] can PHP do what tie does in Perl?

2005-12-02 Thread Jochem Maas
Bing Du wrote: Hi, In Perl, hash can be stored in a file like this: tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666); How the function should be implemented in PHP if it's possible? file_put_contents('/path/to/your/file', $someFingArray) Thanks, Bing -- PHP General Mailing

Re: [PHP] can PHP do what tie does in Perl?

2005-12-02 Thread Robert Cummings
On Fri, 2005-12-02 at 09:42, Jochem Maas wrote: Bing Du wrote: Hi, In Perl, hash can be stored in a file like this: tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666); How the function should be implemented in PHP if it's possible? file_put_contents('/path/to/your/file',

Re: [PHP] can PHP do what tie does in Perl?

2005-12-02 Thread Jochem Maas
Robert Cummings wrote: On Fri, 2005-12-02 at 09:42, Jochem Maas wrote: Bing Du wrote: Hi, In Perl, hash can be stored in a file like this: tie(%contact,'SDBM_File',$tmp_file,O_RDWR|O_CREAT,0666); How the function should be implemented in PHP if it's possible?

Re: [PHP] Can PHP do this...?

2002-12-12 Thread @ Edwin
Hello, 1LT John W. Holmes [EMAIL PROTECTED] wrote: OK. I think I understand this, but let me ask just to be sure. So if I setup in my page something to this effect: if ($_SERVER['!HTTPS']) { echo Switching over to SSL...; echo META redirect to SSL; } else { echo **Rest of Page**;

RE: [PHP] Can PHP do this...?

2002-12-11 Thread John W. Holmes
Hello all. I have a question that I hope someone can answer. Is it possible to determine is someone is hitting your site over SSL or plain http using PHP? If so, is it part of getenv()? I think it's $_SERVER['HTTPS']. If that is set, then the connection is over SSL. ---John W. Holmes... PHP

RE: [PHP] Can PHP do this...?

2002-12-11 Thread Ronald Clark
W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 11:45 AM To: Ronald Clark; [EMAIL PROTECTED] Subject: RE: [PHP] Can PHP do this...? Hello all. I have a question that I hope someone can answer. Is it possible to determine is someone is hitting your site over SSL

Re: [PHP] Can PHP do this...?

2002-12-11 Thread 1LT John W. Holmes
OK. I think I understand this, but let me ask just to be sure. So if I setup in my page something to this effect: if ($_SERVER['!HTTPS']) { echo Switching over to SSL...; echo META redirect to SSL; } else { echo **Rest of Page**; } Would this work? I am about to add a secind site to my

Re: [PHP] Can PHP do this...?

2002-12-11 Thread Johannes Schlueter
On Wednesday 11 December 2002 19:19, Ronald Clark wrote: Hi Ronald, hi List, it isn't if ($_SERVER['!HTTPS']) { but if (!isset($_SERVER['HTTPS']) { // unsecure } else { //secure } You want to check wether the server variable HTTPS is set or not. johannes -- PHP General Mailing List

RE: [PHP] Can PHP do this...?

2002-12-11 Thread Dave [Hawk-Systems]
John, PHP-general, OK. I think I understand this, but let me ask just to be sure. So if I setup in my page something to this effect: if ($_SERVER['!HTTPS']) { echo Switching over to SSL...; echo META redirect to SSL; yuck recommend insuring this is at the top of your page and

Re: [PHP] Can php do this?

2001-11-25 Thread Miles Thompson
I've followed this with interest, but unless you specifically need some properties of PHP to do this, use an easier tool. Python has modules for both MySQL and PHP. They are easily invoked and don't involve calling Lynx feeding it the script. Here's some code, you might want to think about it

Re: [PHP] Can php do this?

2001-11-25 Thread Michael Sims
At 09:22 AM 11/25/2001 -0400, Miles Thompson wrote: I've followed this with interest, but unless you specifically need some properties of PHP to do this, use an easier tool. Python has modules for both MySQL and PHP. They are easily invoked and don't involve calling Lynx feeding it the

Re: [PHP] Can php do this?

2001-11-24 Thread Michael Sims
At 10:04 PM 11/24/2001 -0500, [EMAIL PROTECTED] wrote: [snip] Sort of like cron doing what you would do if you visited page.php and once it's hit, it emails specified users in a database Would I need path to php in the cron script to do this? Or am I just living a dream? It sure can. There's a

Re: [PHP] Can php do this?

2001-11-24 Thread Michael A. Peters
If you have built the php standalone binary then its easy- #!/usr/local/bin/php ?php // your php code here ? What I do when I build php is build it twice. First I build it with all my options EXCEPT for with-apxs=/blah That builds the standalone binary, and I install that in /usr/local/bin

Re: [PHP] Can php do this?

2001-11-24 Thread Casey Allen Shobe
On 24 November 2001 23:45, Michael Sims spaketh unto ye recipient: It sure can. There's a couple of ways to accomplish this. I personally think the easiest way is to code your page like normal, then call it in a cron job via lynx. Let's say you have a page called page.php that connects to

Re: [PHP] Can php do this?

2001-11-24 Thread Joelmon2001
Thanks guys I just want to confirm one last thing, as it's been a while since I needed cron After I create this file (cron.file) for ex and use crontab cronfile (I do this as root, if it matters) do permissions need to be set? I really can't recall I would think that would do it as I am not

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Duncan Hill
On Wed, 24 Oct 2001 [EMAIL PROTECTED] wrote: iTo print/i: a href=javascript:if (window.print != null) { window.print(); } else { alert('Unfortunately, your browser does not support this shortcut. Please select Print from the File menu.'); } bClick here/b/a ior/i Select bFile/b and then

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Richard S. Crawford
Unfortunately, since PHP lives on the server and JavaScript lives on the browser, there really is no way to get PHP to do what you want. Stick with JavaScript. There's really no reason not to when you're doing client-side programming. At 11:14 AM 10/24/2001, [EMAIL PROTECTED] wrote: iTo

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Frazer
Javascript can be embedded in PHP files anyway. I do a lot of database management interfaces in PHP and one thing I want to do is protect items from being accidentally deleted. I use Javascript to verify that they intended to click on the link to delete the information. Remember, PHP files are

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Eheler
There's a really long method of doing it that would work, but would involve server-side browser detection, and a database containing a list of browsers that support print shortcuts. Stick with the JS. Mike [EMAIL PROTECTED] wrote: iTo print/i: a href=javascript:if (window.print != null) {

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread chip . wiegand
[EMAIL PROTECTED] on 10/24/2001 10:31:30 PM Internet mail from: To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: Re: [PHP] Can PHP do what this javascript does... There's a really long method of doing it that would work, but would involve server-side browser detection, and a database