RE: [PHP] Accessing HTTP Content

2004-03-29 Thread Quentin Bennett
Thanks,

I had a look at Snoopy, and it looks goodbut I don't think it can do
what I want.

Snoopy Fetches data from a known URL - what I want to do is read the
HTTP content no matter where it is sent from.

Simple, really - $GLOBALS['HTTP_RAW_POST_DATA']. Found this by looking
at SOAP server class that does what I want (except that I am not sending
SOAP)

Thanks for your time!

Quentin Bennett

-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED] 
Sent: Monday, 29 March 2004 10:11 p.m.
To: Quentin Bennett; [EMAIL PROTECTED]
Subject: Re: [PHP] Accessing HTTP Content


Quentin Bennett wrote:
 Hi,
  
 Is this possible, please?
  
 What I want to do is, using an HTTP class,
  
$myComms = new Ihttp_base_class($httpParams);
$myComms-request = $some_document;
$myComms-requrl = /mysite/myscript.php;
$myComms-Send();
  
 myscript.php runs within the same Apache server, processes 
 some_document, and returns an HTTP response. PHP is running as an
Apache module, not CGI.
  
 Within myscript.php, I can 'getallheaders()' to access the HTTP 
 headers, but I want to access the contents of $some_document - i.e.
the content portion of the HTTP message.
  
 $some_document can't be sent as a GET/POST variable, as it exceeds the

 limitations on those.

Have you considered using something like Snoopy? http://snoopy.sf.net

Could be worth a try.
The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you
are asked to respect that confidentiality and not disclose, copy or make use
of its contents. If received in error you are asked to destroy this email
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Accessing HTTP Content

2004-03-28 Thread Quentin Bennett
Hi,
 
Is this possible, please?
 
What I want to do is, using an HTTP class, 
 
   $myComms = new Ihttp_base_class($httpParams);
   $myComms-request = $some_document;
   $myComms-requrl = /mysite/myscript.php;
   $myComms-Send();
 
myscript.php runs within the same Apache server, processes some_document, and 
returns an HTTP response. PHP is running as an Apache module, not CGI.
 
Within myscript.php, I can 'getallheaders()' to access the HTTP headers, but I want to 
access the contents of $some_document - i.e. the content portion of the HTTP message.
 
$some_document can't be sent as a GET/POST variable, as it exceeds the limitations on 
those.
 
Any advice would be appreciated.
 
Quentin Bennett

 

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you
are asked to respect that confidentiality and not disclose, copy or make use
of its contents. If received in error you are asked to destroy this email
and contact the sender immediately. Your assistance is appreciated.


RE: [PHP] Displaying first 20 characters of a comment

2002-12-19 Thread Quentin Bennett
 


The information contained in this 
email is privileged and confidential and intended for the addressee only. If you 
are not the intended recipient, you are asked to respect that confidentiality 
and not disclose, copy or make use of its contents. If received in error you are 
asked to destroy this email and contact the sender immediately. Your assistance 
is appreciated. 


select left(myfield,20) from mytable;
-Original Message-
From: Kevin Meredith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 December 2002 11:03 p.m.
To: PHP
Subject: [PHP] Displaying first 20 characters of a comment


Hi.

I am trying to find out what the best way is to display only the first 20 or
so characters of a comment.  The comments which are entered separately by
users are stored in a MySql database.  I am displaying a list of the last 5
entries on the home page and then linking them to the relevant comments and
details.  However the comments are to long so I want to display only the
first portion, kind of like a intro for users to get an idea and then read
further.

I am not sure if it is best to do it with the select statement or format it
with the PHP.  Either way I am not sure how.

many thanks
Kevin


-- 
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] sending AND recieving XML

2002-12-19 Thread Quentin Bennett
Hi,

We are doing the exact same thing using a simple HTTP Post - the receiving PHP 
receives the XML, processes it, and sends back an XML answer.

Works great.

Hope this helps.

Quentin

-Original Message-
From: K.C.P. van Zijl [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 December 2002 10:52 a.m.
To: [EMAIL PROTECTED]
Subject: [PHP] sending AND recieving XML


Hello,

I'm building this web application that has to communicate with some
other web servers. This communication is done by sending and receiving
XML. I discovered I don't have curl support compiled in PHP and was
wondering if there are other ways to send and receive XML? 

 

1. Perhaps I can communicate with curl by using exec (I've installed the
curl RPM package)? 

2. Or perhaps fsockeropen() could do the job.

 

In both cases I don't have any experience with any of these 2 functions.
Does anyone have an example for me?

 

Thanks,

Karel

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Problem with sessions.

2002-12-19 Thread Quentin Bennett
Hi,

Is your 'other server' identical (Web Server, PHP Version, register_globals setting)?

Quentin

-Original Message-
From: Mike Hillyer [mailto:[EMAIL PROTECTED]]
Sent: Friday, 20 December 2002 12:43 p.m.
To: PHP GENERAL LIST
Subject: [PHP] Problem with sessions.


Hello All;

Please forgive me if I am repeating an often asked question, but I am having
a problem with sessions. I simply cannot get them to work.

The sample code I provide works on another server perfectly, this is the
first page:

?PHP

 session_start();
 session_register(name,pass);
 $name = hilde;
 $pass = mypassword;
 echo h1Session variables set!/h1;
 echo a href=\page2.php\go to next page/a;

?

When called, the following file arrives in /tmp:

sess_f9c5e87b35ae66eac64a9a346321b269

name|s:5:hilde;pass|s:10:mypassword;



So obviously the session file is being created.
However, when I go to page2.php?PHPSESSID=f9c5e87b35ae66eac64a9a346321b269
Which has this code:

?PHP
 session_start();
 echo h1The password of $name is $pass /h1;

?

I get The Password of  is 

As a response. Both pages work perfectly on another server, so I am having
trouble finding the problem, especially since the session file is actually
created in /tmp

My PHP.ini file is standard to a RedHat RPM install, but I will include it
as an attachment.

Any help would be greatly appreciated!

Mike Hillyer

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Array

2002-12-16 Thread Quentin Bennett
Hi,

No I don't think that is right.

$monthschedule[Jun] is not what is being looked for, but 
$monthschedule[something]=Jun;

Try doing a loop to see what is in the array.

Example, from PHP Bible,

function print_keys_and_values_each($arr)
{
   reset($arr);
   while ($cell = each($arr))
   {
  $c = $cell['value'];
  $k = $cell['key'];
  print (Key: $k; Value: $cBR);
   }
}


Quentin

-Original Message-
From: Andy Turegano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 December 2002 10:25 a.m.
To: Mako Shark
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Array


What you have to do, at least I think, is you have to type:
$r = $monthschedule[Jun];

That is what I think you have to do. The other way you did it was when you
have a value-only array.


On Mon, 16 Dec 2002, Mako Shark wrote:

 I have an array I set up like this:

 $monthschedule = array(1 = Jan, 2 = Feb, 3 =
 Mar, 6 = Jun);

 When I try to access them, doing this:
 $r = $monthschedule[6];

 nothing comes up ($r is blank). Any thoughts? There
 are missing elements (4,5,7-12) in $monthschedule.

 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] MySQL select a field's first X bytes

2002-12-16 Thread Quentin Bennett
What's wrong with 

select left(myfield, 500) from mytable;

?

Quentin

-Original Message-
From: Micah Bushouse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 December 2002 3:22 p.m.
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL select a field's first X bytes


Is there a way in MySQL to select a fields first X bytes?

I have a field of type text.  I would like to print the first 500 or so
bytes of its contents as a summary of the entire field, then having the user
click read more... or something of that sort for the whole document.

I read up on select in the MySQL manual and didn't see much, does anyone out
there know of such a feature?  Should I just take the whole field into php
and do it that way?

thanks,
Micah Bushouse



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] XML Enabled not there

2002-12-12 Thread Quentin Bennett
Hi,

If phpinfo() does not have an 'XML' section, and so 'XML Enabled  true' is not 
there, but the compile line is '--with-xml=shared,/usr', does this mean that I have 
XML support or not?

PHP 4.0.3pl1, Apache 1.3.9

I am checking the configuration of a server before implementing on it - in fact, I 
haven't got access to it yet, so, no, I can't try it and see.

Thanks in advance

Quentin Bennett
Transport Systems Division
Infinity Solutions 
web http:\\www.infinitysolutions.co.nz
mailto:[EMAIL PROTECTED]
Support Calls: mailto:[EMAIL PROTECTED]
Phone : +64 9 358 9720
Fax : +64 9 309 4142


The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.



[PHP] Re: PHP and SOAP

2002-05-03 Thread Quentin Bennett

Hi,

Let Manuel be your friend!

http://www.phpclasses.org/

Quentin

Udo Giacomozzi [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Probably this question has been asked a couple of times but I could not
 find a complete answer to my question...

 I am new to PHP but have a lot of experience with Delphi and usually have
 no problems learning new languages (besides PHP is very similar to C). I
 also made already some little PHP scripts or modified larger scripts to
 suit my needs. Anyway...

 I need to write a web service in PHP. On the client side there will be a
 Delphi program that accesses the server via SOAP. I choose PHP on the
 server side because it (1) offers more possibilities to extend the product
 later on and (2) because it is less problematic with installation issues
 and platform support. The most work will be anyway the client so it should
 not be too difficult to write the server.


 Now the simple question:

 What SOAP server implementation for PHP do you suggest me? I know there
are
 several projects being developed on but I really don't know which one I
 should use to begin my tests with or - in other words - to learn.

 I hope you can give me more information on this subject. :-)

 Many thanks in advance,
 Udo



 --
 Udo Giacomozzi - [EMAIL PROTECTED]
 www.nova-sys.net - www.guweb.com
 The disadvantage of intelligence is that one
 is constantly obliged to go on learning.

 Posted by ELKNews 1.0.4-B
 Empower your News Reader! http://www.atozedsoftware.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: just wanna know

2002-03-01 Thread Quentin Bennett

Unlike echo, print can accept only one argument
Unlike echo, print returns a value, which represents whether the print
statement suceeded.

Both are language constructs, so () are optional. Using () with echo limits
you to one argument.

All courtesy PHP 4 Bible.

Quentin Bennett

Eoghan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED];
 hi

 whats the difference between
 print and echo ?

 thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] HTTP Post to another server

2002-03-01 Thread Quentin Bennett

Hi,

I want to turn some form data in to and XML document, and the HTTP Post that
data to another server. Is that possible from PHP.

As a challenge, I know it is possible in ASP!

Thanks In Advance

Quentin Bennett
mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php