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
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
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
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
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
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',
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?
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**;
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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) {
[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
24 matches
Mail list logo