RE: [PHP] load balancer question

2005-12-20 Thread will
I've had really good experiences with load balancing a large php app
using
windows 2003 NLB (network load balancing)  (really, windows, I'm not
kidding :)).

It's available in 2003 server, you just have to turn it on and
configure.
If you're using windows currently I'd give it a shot before
purchasing a dedicated load balancer.  There are some nice
ones out there, but the major drawback is redundancy.
If your load balancer goes out, all of your nodes are unavailable,
So, you'd need at least 2 hardware load balancers operating in failover
mode.  
If you care nothing about availability and only care about the
performance 
then you've got alot of options.

Of course to load balance your app you need to centralize your data
onto a dedicated data server.  You'll have to put some thought into your

session issue, and any other data read/written by the app.

good luck,
will






>  Original Message 
> Subject: [PHP] load balancer question
> From: jonathan <[EMAIL PROTECTED]>
> Date: Tue, December 20, 2005 8:54 pm
> To: php-general@lists.php.net
> 
> I was having a discussion about scaling a php-based app. Most of the  
> sites I've worked on have easily fit into a single server model. I"m  
> looking at a site that will need to scale beyond that. The  
> anticipated bottleneck will be TCP connections and database  
> performance. I'm looking at load balancers and was wondering if  
> people had experience with one that they felt was up to task.
> 
> We do use sessions and I would not like to go to a saving session  
> data on another box or in the database. I would prefer for the  
> session identifier cookie to determine which box the user goes to.
> 
> thanks,
> 
> jonathan
> 
> -- 
> 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] select statement with variables ???

2005-12-20 Thread Anasta
Can someone tell me why this select is wrong please---ive tried everything.
the $cat is the tablename .


$query=" SELECT title FROM $cat WHERE id='$id'";



full script below





Edit and Submit changes

">
Title:
">







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



Re: [PHP] Logging within Extension

2005-12-20 Thread Michael B Allen
On Tue, 20 Dec 2005 20:02:58 -0500
Michael B Allen <[EMAIL PROTECTED]> wrote:

> I'm writing a PHP 4 extension and I would like to write debugging
> information to the Apache error log.Does anyone know how to do
> that? Basically I want error_log() but for within a C extension.

And the answer is php_error_docref. For example:

  php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Undefined variable: %s", varname);

Mike

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



Re: [PHP] Help Desk software

2005-12-20 Thread Glenn Sieb
Daniel Lahey said the following on 12/20/2005 10:28 PM:
> Can anyone recommend some good Open-Source Help Desk software for
> PHP?  (I know this is a little off-topic, but I'm having a hard time
> finding decent Open Source software.)
IMHO the best is RT, which is Perl and Mason.
(http://www.bestpractical.com/rt)

There are some nice PHP ones out there, but I don't have any experience
with them:

ruQueue: http://freshmeat.net/projects/ruqueue/
Hesk: http://www.phpjunkyard.com/free-helpdesk-software.php
Help Desk Software: http://www.helpdeskreloaded.com/

I'm sure there are more..

Best,
--Glenn

-- 
AIM: RainbearNJ  YahooIM: rainbear_nj

"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
  ~Benjamin Franklin, Historical Review of Pennsylvania, 1759

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



[PHP] Help Desk software

2005-12-20 Thread Daniel Lahey
Can anyone recommend some good Open-Source Help Desk software for  
PHP?  (I know this is a little off-topic, but I'm having a hard time  
finding decent Open Source software.)


TIA

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



Re: [PHP] Logging within Extension

2005-12-20 Thread Anas Mughal
Might want to look into "Log4Cxx".

--
Anas Mughal



On 12/20/05, Michael B Allen <[EMAIL PROTECTED]> wrote:
>
> I'm writing a PHP 4 extension and I would like to write debugging
> information to the Apache error log.Does anyone know how to do
> that? Basically I want error_log() but for within a C extension.
>
> Thanks,
> Mike
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Anas Mughal


[PHP] load balancer question

2005-12-20 Thread jonathan
I was having a discussion about scaling a php-based app. Most of the  
sites I've worked on have easily fit into a single server model. I"m  
looking at a site that will need to scale beyond that. The  
anticipated bottleneck will be TCP connections and database  
performance. I'm looking at load balancers and was wondering if  
people had experience with one that they felt was up to task.


We do use sessions and I would not like to go to a saving session  
data on another box or in the database. I would prefer for the  
session identifier cookie to determine which box the user goes to.


thanks,

jonathan

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



Re: [PHP] Random Images with no duplicates?

2005-12-20 Thread Mike

"Mike" <[EMAIL PROTECTED]> wrote in message news:...
 I'd just like to thank everyone who helped me our with this. I think it's
 great that so many people would be so helpful and not expect anything in
 return. This list is quite a storehouse of info and I'm learning just from
 reading the posts since I joined last week!

 Again, thanks all.

 -Mike


> ""Kilbride, James"" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> Actually with this idea all you do is reduce $max after each successful
> pull and 'increment' over pictures you already have. That way you never
> have to pull another random number. You just may have to increment
> through the entire set of pulled images if you pulled a high enough
> number.
>
> for($i = 0; $i < $want; $i++) {
> $random = mt_rand(0,$max);
> for($j = 0; $j < $i; $j++) {
> if ($retrieved[$j] < $random) {
> $random++;
> }
> }
> $retrieved[] = $random;
> sort($retrieved);
> $max--;
> }
>
> Guarentees unique choices.
>
>
>
>> > I'm still very green with PHP, but am working to fix that.
>> >
>> > I've searched high and low for an answer to this question
>> and so far
>> > no solution has presented itself. I have a script to
>> populate my web
>> > page with random images:
>> >
>> > > > #random images example
>> > #this is your file
>> > $file = "images.txt";
>> > #open the file
>> > $openFile = file($file);
>> > #generate a random number
>> > srand((double)microtime()*100);
>> > #get one of the entries in the file
>> > $random_image = $openFile[array_rand($openFile)]; #display
>> the entry
>> > echo ""; ?>
>> >
>> >
>> > This works beautifully, but my problem is that sometimes,
>> the same image
>> > displays twice or more on the same page-load. My page
>> requires 10 different
>> > places where my images need to load, but I can't have any
>> duplicate images
>> > show up.
>
> 

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



[PHP] Logging within Extension

2005-12-20 Thread Michael B Allen
I'm writing a PHP 4 extension and I would like to write debugging
information to the Apache error log.Does anyone know how to do
that? Basically I want error_log() but for within a C extension.

Thanks,
Mike 

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



Re: [PHP] pspell dictionary issue

2005-12-20 Thread Adi
No sign of aspell packages on the machine...

Adam.

On 12/20/05, John Nichel <[EMAIL PROTECTED]> wrote:
>
> Adi wrote:
> > I am not on a RPM based system(running slackware)... I have aspell
> 0.60.4
>
> Okay, what I am asking is this:  I understand that you installed aspell
> from source.  However, it is quite possible that aspell already existed
> on your machine.  Slackware has a package management system.  Check that
> to see if a|pspell is also installed that way.  Basically, you may have
> two versions of a|pspell on your system which are conflicting with each
> other.
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Take care...
Adam


RE: [PHP] asianwhiteskin beauty product [Offficially OT]

2005-12-20 Thread Jay Blanchard
[snip]
On Tuesday 13 December 2005 04:09, Raz wrote:
> Can I have some breast enlarger please?

Larger is not always better ;)
Is there any other men who prefer smaller/normal sized breasts?
[/snip]

Yes. Now, can this go to the alt.news.breastsize list?

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



Re: [PHP] asianwhiteskin beauty product

2005-12-20 Thread Stephen Leaf
On Tuesday 13 December 2005 04:09, Raz wrote:
> Can I have some breast enlarger please?

Larger is not always better ;)
Is there any other men who prefer smaller/normal sized breasts?

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



Re: [PHP] Hi!

2005-12-20 Thread John Nichel

Nanu Kalmanovitz wrote:

Hi!
 
Using a Win 2000 WS (work station), I'm trying to write the first PHP

page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
 
The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
on same server but different volumes. 
 
 
I created the file named hello.php by copying and pasting the following
text to notepad and put it in my web server root directory I:\HTDocs: 
 
Example 2-1. Our first PHP script: hello.php: 
 

  PHP Test
 
 
 Hello World'; ?>


 


When I am accessing the site with IE browser at the
http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
page.
The other pages are shown correctly.
 
Any Idea how to fix it and continue with the tutorial?


You need to tell Apache how to handle PHP pages.  In your httpd.conf add 
this line :


AddType application/x-httpd-php .php

See here in the manual for further explanation :

http://us2.php.net/manual/en/install.windows.apache1.php

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] pspell dictionary issue

2005-12-20 Thread John Nichel

Adi wrote:

I am not on a RPM based system(running slackware)... I have aspell 0.60.4


Okay, what I am asking is this:  I understand that you installed aspell 
from source.  However, it is quite possible that aspell already existed 
on your machine.  Slackware has a package management system.  Check that 
to see if a|pspell is also installed that way.  Basically, you may have 
two versions of a|pspell on your system which are conflicting with each 
other.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Mathmatical formula

2005-12-20 Thread Mike Smith
> Let's do an experiment. Place these two lines of code in a page, then load
> it in a browser;
>
> 
> $foo = (36.0*58.0)/144;
> echo $foo;
>
> ?>
>
> works fine for me. If you change
>
> 
>
> to
>
> 
>
Yep, that does work. Thanks Jay.

Mike

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



RE: [PHP] Mathmatical formula

2005-12-20 Thread Jay Blanchard
[snip]
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:


and returning it with:
eval('?>' . $a . '

works fine for me. If you change



to



it also works.

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



Re: [PHP] Mathmatical formula

2005-12-20 Thread Mike Smith
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:


and returning it with:
eval('?>' . $a . 'http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Mathmatical formula

2005-12-20 Thread Jay Blanchard
[snip]
I have an application that allows the users to input a formula:
(Width*Height)/144

This formula gets updated with a part's specific width & height and
actually returns:

(36.0*58.0)/144

I use preg_replace to replace Width and Height with values from the
following array:

[Width] => 36.0
[Height] => 58.0

How can I get the resulting formula to actually calculate?
Simplified version of my code:

$partFormula = '(Width*Height)/144';
$prof = array('Width'=>36,'Height'=>58);

$find = array();
$replace = array();

foreach($prof AS $key => $val){
array_push($find,"[$key]");
array_push($replace,$val);  
}
return preg_replace($find,$replace,$partFormula);
//returns (36.0*58.0)/144

eval() doesn't seem to do much for me (parse error, unexpected $end).
[/snip]

Try;

$foo = preg_replace($find,$replace,$partFormula);
return $foo

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



Re: [PHP] XML Parser set option

2005-12-20 Thread Derek Williams

Amol,

Pretty sure that it means the white space after a tag.  for example:

  Joe Dempsey

or (even worse, with CR)

 
   Joe Dempsey


Amol Hatwar wrote:

Hi,

The PHP Manual entry for xml_parser_set_option lists an option called:
XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option
enables or disables.

The manual entry itself is a bit terse:
"Whether to skip values consisting of whitespace characters."

Doodling around with it in code got me no luck. Any ideas on what kind
of whitespaces it does supress?

Regards,

ah

  


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



[PHP] Mathmatical formula

2005-12-20 Thread Mike Smith
I have an application that allows the users to input a formula:
(Width*Height)/144

This formula gets updated with a part's specific width & height and
actually returns:

(36.0*58.0)/144

I use preg_replace to replace Width and Height with values from the
following array:

[Width] => 36.0
[Height] => 58.0

How can I get the resulting formula to actually calculate?
Simplified version of my code:

$partFormula = '(Width*Height)/144';
$prof = array('Width'=>36,'Height'=>58);

$find = array();
$replace = array();

foreach($prof AS $key => $val){
array_push($find,"[$key]");
array_push($replace,$val);  
}
return preg_replace($find,$replace,$partFormula);
//returns (36.0*58.0)/144

eval() doesn't seem to do much for me (parse error, unexpected $end).

Thanks,
Mike

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



RE: [PHP] Hi!

2005-12-20 Thread Erin Fortenberry
It does't look like PHP is setup in Apache.

You should have a line that looks something like this;

And some others that look like this;

AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php-source .phps


Check out your apache config file.

-Erin


> Hi!
> 
> Using a Win 2000 WS (work station), I'm trying to write the first PHP
> page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
> 
> The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
> on same server but different volumes. 
> 
> 
> I created the file named hello.php by copying and pasting the following
> text to notepad and put it in my web server root directory I:\HTDocs: 
> 
> Example 2-1. Our first PHP script: hello.php: 
> 
>  PHP Test
> 
> 
> Hello World'; ?>
> 
> 
> 
> 
> When I am accessing the site with IE browser at the
> http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
> page.
> The other pages are shown correctly.
> 
> Any Idea how to fix it and continue with the tutorial?
> 
> TIA
> 
> Nanu
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

-- 
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] Re: בעניין: Re: [PHP] Hi!

2005-12-20 Thread Mike Smith
On 12/20/05, Nanu Kalmanovitz <[EMAIL PROTECTED]> wrote:
>
> Thanks!
>
> Since I am a newbie with the Apache \ PHP \ MySQL, can u tell me what file
> and what shall I add\change in it?
>
> TIA
>
> Nanu
>
Google for install php netware
Try: http://developer.novell.com/ndk/whitepapers/namp.htm

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



[PHP] Caucho Resin adds PHP

2005-12-20 Thread Marten Lehmann

Hi,

has anyone read this:

http://www.theserverside.com/news/thread.tss?thread_id=38144

The Java-implementation of the PHP-spec is announced to be six times 
faster than mod_php itself.


Regards
Marten

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



Re: [PHP] Hi!

2005-12-20 Thread Gustav Wiberg

Hi there!

View source-code of output. Maybe that could give you a clue! :-)

/G
http://www.varupiraten.se/

- Original Message - 
From: "Nanu Kalmanovitz" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, December 20, 2005 8:10 PM
Subject: [PHP] Hi!



Hi!

Using a Win 2000 WS (work station), I'm trying to write the first PHP
page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.

The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
on same server but different volumes. 



I created the file named hello.php by copying and pasting the following
text to notepad and put it in my web server root directory I:\HTDocs: 

Example 2-1. Our first PHP script: hello.php: 


 PHP Test


Hello World'; ?>




When I am accessing the site with IE browser at the
http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
page.
The other pages are shown correctly.

Any Idea how to fix it and continue with the tutorial?

TIA

Nanu












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



[PHP] Hi!

2005-12-20 Thread Nanu Kalmanovitz
Hi!
 
Using a Win 2000 WS (work station), I'm trying to write the first PHP
page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
 
The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
on same server but different volumes. 
 
 
I created the file named hello.php by copying and pasting the following
text to notepad and put it in my web server root directory I:\HTDocs: 
 
Example 2-1. Our first PHP script: hello.php: 
 
  PHP Test
 
 
 Hello World'; ?>


 

When I am accessing the site with IE browser at the
http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
page.
The other pages are shown correctly.
 
Any Idea how to fix it and continue with the tutorial?
 
TIA
 
Nanu
 
 
 
 
 
 
 
 
 


Re: [PHP] pspell dictionary issue

2005-12-20 Thread Adi
I am not on a RPM based system(running slackware)... I have aspell 0.60.4

Adam.


Re: [PHP] Write a FIFO file

2005-12-20 Thread Robin Vickery
On 12/20/05, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote:
> Robin Vickery wrote:
>
> >I bet your script will finish as soon as you read from the other end -
> >for example by doing 'cat fifo' from a shell.
> >
> Thats it.
> I would like to use fifo, but thats a problem. If there is not process
> reading, it wont work.
> Is there any way to create process?
> Something like:
> exec("echo \"My text $var\" > fifo &"); //(This idea does not work)

Named pipes are blocking - if you open one for reading and there's
nothing writing then the reading process will be blocked. And as
you've just seen, the same happens if you open one for writing and
there's nothing reading it.

You can change that behaviour by specifying the O_NONBLOCK flag when
opening the pipe - if you're opening it for writing, the attempt will
fail immediately rather than waiting for something to read.

I don't know of a way to do that through fopen(), but you can probably
manage it using dio_open() if you *really* want to.

It might be better to rethink how your processes communicate?

  -robin


Re: [PHP] pspell dictionary issue

2005-12-20 Thread John Nichel

Adi wrote:

All the installs are from source...and aspell works just fine from
shell...its almost like pspell if defaulting to use the american dictionary.

Adam.



Did you check to see if your system has any of the spelling tools 
installed as a package also?  If you're on a RPM based system :


rpm -qa | grep [a\|p]spell

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Filtering URLs problem..

2005-12-20 Thread Jochem Maas

Anders Norrbring wrote:

On 2005-12-20 16:16 Silvio Porcellana [tradeOver] wrote:


Anders Norrbring wrote:


I'm writing a filter/parsing function for texts entered by users, and
I've run into a problem...
What I'm trying to do is to parse URLs of different sorts, ftp, http,
mms, irc etc and format them as links, that part was real easy..




You might want to consider using vbCode, there is a nice class for PHP 
here:

http://www.phpclasses.org/browse/package/1379.html

HTH, cheers.
Silvio



Thanks, but I already use PEAR HTML_BBCodeParser for that part.. :)
I solved it by a lookbehind, if there isn't a whitespace before the URL, 


I answered your question stating that a regexp with a
negative-lookahead assertion would probably be a good way to go...
but it seems my post never arrived ... anyway I think a negative lookahead or
lookbehind assertion will cut it. I would just like to add that you might 
consider
looking behind for something a little more specific that a white space
(or lack of it); consider what happens when you are given the following HTML 
snippet:

click this: http://yourdomain.com/something

depending on the processing you do to the text prior to linkifying
(made that word up!) this may not be relevant.



just jump over it.

Thanks for the suggestion!


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



Re: [PHP] Problem with fopen and sending POST vars

2005-12-20 Thread tg-php
There are a couple examples of manually sending POST data via fsockopen() on:

http://us2.php.net/manual/en/function.fsockopen.php


Basically the stucture is the same as URL "GET" variables but you have to send 
the header data manually and set content-type to 
"application/x-www-form-urlencoded".  But you still end up sneding data in this 
form: "var1=value1&var2=value2&var3=value3" (hence the "urlencoded" part).

Good luck!

-TG

= = = Original message = = =

Hello everyone!

I have a problem sending POST vars via fopen.
It was possible for me to send some xml data but that's all.

Anyone know how to send POST vars?
Big probleme here is also that i have to connect via SSL.

Many thanks for any help.

Greetings
~Barry

Here is my code:
blablubb";

# array with the options to create stream context
$opts = Array();

# compose HTTP request header
$header .= "User-Agent: PHP Script\\r\\n";
$header .= "Content-Type: text/xml\\r\\n";
$header .= "Content-Length: ".strlen($request_data)."\\r\\n";
$header .= "Connection: close";

# define context options for HTTP request
$opts['http']['method'] = 'POST';
$opts['http']['header'] = $header;
$opts['http']['content'] = $request_data;

# create stream context
$context = stream_context_create($opts);

$fp = fopen 
("https://easy-demo.tcinternet.de/hosting/servlet/Dispatcher","r",false,$context);
if (!$fp) echo "error";
else
 
 $vars= explode ("&",stream_get_contents($fp));
 foreach ($vars as $key => $value)
 
 $var = explode ("=", $value);
 $tcph[$var[0]] = urldecode($var[1]);
 
 
print_r($tcph);
?>


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

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



Re: [PHP] Filtering URLs problem..

2005-12-20 Thread Anders Norrbring

On 2005-12-20 16:16 Silvio Porcellana [tradeOver] wrote:

Anders Norrbring wrote:


I'm writing a filter/parsing function for texts entered by users, and
I've run into a problem...
What I'm trying to do is to parse URLs of different sorts, ftp, http,
mms, irc etc and format them as links, that part was real easy..




You might want to consider using vbCode, there is a nice class for PHP here:
http://www.phpclasses.org/browse/package/1379.html

HTH, cheers.
Silvio



Thanks, but I already use PEAR HTML_BBCodeParser for that part.. :)
I solved it by a lookbehind, if there isn't a whitespace before the URL, 
just jump over it.


Thanks for the suggestion!
--

Anders Norrbring
Norrbring Consulting

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



Re: [PHP] Write a FIFO file

2005-12-20 Thread Ray Hauge
I'm not sure, but it could have something to do with append mode instead 
of write mode.  All I know about FIFO files and named pipes is that you 
cannot open them for read and write, only one or the other.  The file 
system could detect append as "reading" when it's positioning your 
pointer at the end of the file.


Robin Vickery wrote:


On 12/20/05, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote:
 


Ok, I tried it before, it didn't work:

[...]

Try to execute it and execution never ends... browser is waiting for
ever ...
No errors in error php error log.

Any ideas?
   



I bet your script will finish as soon as you read from the other end -
for example by doing 'cat fifo' from a shell.

-robin
 



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



Re: [PHP] pspell dictionary issue

2005-12-20 Thread Adi
All the installs are from source...and aspell works just fine from
shell...its almost like pspell if defaulting to use the american dictionary.

Adam.


Re: [PHP] Re: [Bulk] Re: [PHP] PHP errors in Apache error logs

2005-12-20 Thread Georgi Ivanov
You need to compile php4-extensions or php5-extensions
/usr/ports/lang/

Good luck.

On Monday December 19 2005 22:32, Jose Borquez wrote:
> John Nichel wrote:
> > Jose Borquez wrote:
> > 
> >
> >> The Makefile configuration did have "--disable-all" included.  Here
> >> is the link to my phpinfo page;
> >> http://68.127.38.82/install/test.php
> >
> > You have no session support.
>
> I am not sure what to do now.  Do I need to uninstall and reinstall it
> with session support?  What is the configuration I need to specify?
>
> Thanks in advance,
> Jose

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



Re: [PHP] Problem with fopen and sending POST vars

2005-12-20 Thread Barry

Silvio Porcellana [tradeOver] wrote:

Barry wrote:
I have a problem sending POST vars via fopen.
It was possible for me to send some xml data but that's all.

Anyone know how to send POST vars?
Big probleme here is also that i have to connect via SSL.




cURL can be your friend...

http://php.net/curl
http://www.zend.com/pecl/tutorials/curl.php

HTH, cheers
Silvio


Is there an other way?
Ensim is installed on the Webserver, and this Webserver-tool is quite 
everywhere in the system.

cURL has SSL disabled.
I tried to install/update to a newer version but i get errors trying it 
like:

# rpm -U curl-7.15.1-1.i386.rpm
error: failed dependencies:
libcurl.so.2   is needed by php-4.2.2-2ensim7

And i am a bit afraid if i now add/change that system too much that the 
whole server breaks up...

See here, everything is connected to that ensim thing :(
# rpm -qa | grep ensim
vacation-1.2.6.1-ensim1
gettext-0.10.38-7ensim1
Zope-services-2.3.3-2ensim3
postgresql-contrib-7.1.3-4ensim3
apache-manual-1.3.27-ensim1
libsfio-1999-1ensim1
apache-mod_fastcgi-2.2.10-1ensim11
postgresql-7.1.3-4ensim4bp.2
postgresql-server-7.1.3-4ensim4bp.2
php-devel-4.2.2-2ensim7
php-ldap-4.2.2-2ensim7
php-snmp-4.2.2-2ensim7
python2-2.1.3-1ensim2
majordomo-1.94.5-2ensim6
cronolog-1.6.1-ensim4
Zope-zpublisher-2.3.3-2ensim3
tomcat4-4.0.3-ensim1
apache-devel-1.3.27-ensim1
proftpd-standalone-1.2.4-ensim2
apache-1.3.27-ensim1
postgresql-libs-7.1.3-4ensim4bp.2
postgresql-python-7.1.3-4ensim4bp.2
php-4.2.2-2ensim7
php-imap-4.2.2-2ensim7
php-pgsql-4.2.2-2ensim7
sendmail-doc-8.11.6-3ensim7
analog-5.1-1ensim2
mx-2.0.2-1ensim3
Zope-zserver-2.3.3-2ensim3
phpMyAdmin-2.2.0-ensim4
mod_jk-1.3-1.0-1.4.0.2ensim2
proftpd-1.2.4-ensim2
postgresql-devel-7.1.3-4ensim4bp.2
php-gettext-4.2.2-2ensim7
php-mysql-4.2.2-2ensim7
php-sysvshm-4.2.2-2ensim7
sendmail-cf-8.11.6-3ensim7
perl-Quota-1.4-ensim2
frontpage-5.0-ensim15
Zope-components-2.3.3-2ensim3
Zope-ztemplates-2.3.3-2ensim3
ensim-appliance-libs-3.1.0-25
MySQL-python21-0.3.5-1ensim3
mod_ssl-2.8.12-ensim1
ensim-appliance-l-3.1.4-1
php-ftp-4.2.2-2ensim7
php-manual-4.2.2-2ensim7
php-sysvsem-4.2.2-2ensim7
sendmail-8.11.6-3ensim7

Greetings
Barry

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



Re: [PHP] Filtering URLs problem..

2005-12-20 Thread Silvio Porcellana [tradeOver]
Anders Norrbring wrote:
> 
> I'm writing a filter/parsing function for texts entered by users, and
> I've run into a problem...
> What I'm trying to do is to parse URLs of different sorts, ftp, http,
> mms, irc etc and format them as links, that part was real easy..
> 

You might want to consider using vbCode, there is a nice class for PHP here:
http://www.phpclasses.org/browse/package/1379.html

HTH, cheers.
Silvio

-- 
tradeOver | http://www.tradeover.net
...ready to become the King of the World?

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



Re: [PHP] Filtering URLs problem..

2005-12-20 Thread Philip Hallstrom
I'm writing a filter/parsing function for texts entered by users, and I've 
run into a problem...
What I'm trying to do is to parse URLs of different sorts, ftp, http, mms, 
irc etc and format them as links, that part was real easy..


The hard part is when a user has already entered a complete link..
In short:

http://www.server.tld/page.html
should be converted to:
http://www.server.tld/page.html

That part works fine, but if the user enters:

click here

it all becomes a mess...  Can somebody please make a suggestion on this?


Skip anything inside <> tags... then you're last line would come through 
completely unchanged...


-philip

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



[PHP] Re: When using foreach(), how to use &$value in php 4??

2005-12-20 Thread chris
.
""Scott Fletcher"" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
>I have encountered a situation where I'm using the foreach() where I need 
>to
> assign new data to the $value in the foreach loop, foreach($x as $key ==>
> $value). With PHP 5, you can do the ampersand to the $value but I'm using
> PHP 4? So, how do you guys do it? I tried this sample code but it only 
> work
> in the child array but not the parent arrays...  Food for Thought??
> Thanks...
>
> --code--
> function XmlTreeCDataAsciiLoopThrough(&$tree)
> {
>   foreach($tree as $key => $value)
>   {
>  if (is_array($value)) {
> XmlTreeCDataAsciiLoopThrough($value);
>  } else {
> if ($key == "VALUE") {
>echo $tree[$key]." ###";
>$tree[$key] = "#";
>echo $tree[$key]." @@@";
> }
>  }
>   }
> }
> --code-- 

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



Re: [PHP] Re: IE6 not returning POST data from a textarea

2005-12-20 Thread chris
..
"Curt Zirzow" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
> On Mon, Dec 12, 2005 at 08:33:40PM -0500, Al wrote:
>> Al wrote:
>> >Anyone know to get IE6 to return POST data from a textarea when the text
>> >is pasted in?
>> >
>> >Works fine for Mozilla, etc.
>> >
>> >print_r($_POST) shows several  and  values just 
>> >fine.
>> >
>> >Thanks
>>
>>
>> For those interested, here is the answer...
>>
>> Text pasted into a textarea [e.g., from Word] can have characters not
>> defined in IE's textarea ISO-8859-1 charset.
>>
>> Appearently, IE6 has a bug such that it does not send the POST value for
>> the textarea name when some of these are present.  [e.g., "" char [hex
>> 85]] I don't know how many.
>>
>> You can get it to work by right-mouse selecting Encoding UTF-8 on the
>> client browser or use in the html header:
>> 
>
> This is a good point. I would even go further and to have all php
> files output in charset utf-8 by setting the ini setting:
>
>  default_charset=UTF-8
>
> Curt.
> -- 
> cat .signature: No such file or directory 

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



Re: [PHP] problem: pgsql (unicode) => php5 => HTML (iso-8859-1)

2005-12-20 Thread Jochem Maas

Michelle Konzack wrote:

Hello,

my PostgreSQL stores all data in UNICODE and now if I connect via
Webbrowser to my Database my webpages are detected as ISO-8859-1.

For each Page I must select View->Character Encoding->Unicode (UTF8).

Please can anyone tell me the right  (???) Tag to get Motilla
right to UNICODE?


this will probably do it (make sure headers et al are not designating
a conflicting codepage elsewhere):


try here for more info:
http://www.utf-8.com/




Thanks
Michelle



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



Re: [PHP] problem: pgsql (unicode) => php5 => HTML (iso-8859-1)

2005-12-20 Thread David Grant
Michelle,

Michelle Konzack wrote:
> Please can anyone tell me the right  (???) Tag to get Motilla
> right to UNICODE?

Try:



Cheers,

David
-- 
David Grant
http://www.grant.org.uk/

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



[PHP] problem: pgsql (unicode) => php5 => HTML (iso-8859-1)

2005-12-20 Thread Michelle Konzack
Hello,

my PostgreSQL stores all data in UNICODE and now if I connect via
Webbrowser to my Database my webpages are detected as ISO-8859-1.

For each Page I must select View->Character Encoding->Unicode (UTF8).

Please can anyone tell me the right  (???) Tag to get Motilla
right to UNICODE?

Thanks
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)

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



RE: [PHP] Re: asianwhiteskin beauty product

2005-12-20 Thread George Pitcher
Ah, Michelle, but think of the problems getting dressed
(http://spysports.net/blueshirt.wmv). No offense!

george

> -Original Message-
> From: Dan McCullough [mailto:[EMAIL PROTECTED]
> Sent: 20 December 2005 2:39 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] Re: asianwhiteskin beauty product
>
>
> Maybe this is a disk space product, increases disk space on all
> types of drives.
>
> On 12/20/05, Michelle Konzack <[EMAIL PROTECTED]> wrote:
> > Am 2005-12-15 15:00:41, schrieb Dan McCullough:
> > > Is this some sort of new Zend product? :)
> >
> > Can this implemented?  I have only 75A and do
> > not like become patched with plastic.  ;-P
> >
> > If men can increase 3-4 inches...
> >...why not me 3-4 cups?  =8 >
> > Greetings
> > Michelle
> >
> > --
> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
> > # Debian GNU/Linux Consultant #
> > Michelle Konzack   Apt. 917  ICQ #328449886
> >   50, rue de Soultz MSM LinuxMichi
> > 0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.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
>
>

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



Re: [PHP] Re: asianwhiteskin beauty product

2005-12-20 Thread Dan McCullough
Maybe this is a disk space product, increases disk space on all types of drives.

On 12/20/05, Michelle Konzack <[EMAIL PROTECTED]> wrote:
> Am 2005-12-15 15:00:41, schrieb Dan McCullough:
> > Is this some sort of new Zend product? :)
>
> Can this implemented?  I have only 75A and do
> not like become patched with plastic.  ;-P
>
> If men can increase 3-4 inches...
>...why not me 3-4 cups?  =8
> Greetings
> Michelle
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> # Debian GNU/Linux Consultant #
> Michelle Konzack   Apt. 917  ICQ #328449886
>   50, rue de Soultz MSM LinuxMichi
> 0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.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



Re: [PHP] Re: asianwhiteskin beauty product

2005-12-20 Thread John Nichel

Michelle Konzack wrote:

Am 2005-12-15 15:00:41, schrieb Dan McCullough:


Is this some sort of new Zend product? :)



Can this implemented?  I have only 75A and do
not like become patched with plastic.  ;-P

If men can increase 3-4 inches...
...why not me 3-4 cups?  =8

You have to wait for PHP6 for that.

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] Re: asianwhiteskin beauty product

2005-12-20 Thread Michelle Konzack
Am 2005-12-15 15:00:41, schrieb Dan McCullough:
> Is this some sort of new Zend product? :)

Can this implemented?  I have only 75A and do
not like become patched with plastic.  ;-P

If men can increase 3-4 inches...
...why not me 3-4 cups?  =8http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)

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



Re: [PHP] pspell dictionary issue

2005-12-20 Thread John Nichel

Adi wrote:

I am having a problem switching dictionaries from 'american', 'british' and
'canadian' English in pspell. Pspell seems to test everything against the
american dictionary for some reason. I tested aspell on command line and
worked fine if I supplied the dictionary I wanted to use with the –d option.
Below is some basic code I used to test this in php:



";

   }

} else {

   echo "All good";

}

?>



The output was "All good" instead of a list of suggestions. Also, when I
tested the string "colour" with pspell_new("en", "american"); pspell
accepted the spelling…aspell on the other hand worked as expected in shell.



Any suggestions would be much appreciated.


I had a problem similiar to this a couple of years ago; don't know if 
this will help, but  How is your version of php installed (from 
source, RPM, another package?)  If you installed php/aspell from source, 
check to see if your system also has aspell installed as an RPM (or 
other package).


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Re: [Bulk] Re: [PHP] PHP errors in Apache error logs

2005-12-20 Thread Matt
Install the "php5-session" port from your ports tree to enable
sessions.  It's located in "/usr/ports/www/php5-session" on a default
install with the port tree.


On 12/19/05, John Nichel <[EMAIL PROTECTED]> wrote:
> Jose Borquez wrote:
> > John Nichel wrote:
> >
> >> Jose Borquez wrote:
> >> 
> >>
> >>> The Makefile configuration did have "--disable-all" included.  Here
> >>> is the link to my phpinfo page;
> >>> http://68.127.38.82/install/test.php
> >>
> >>
> >>
> >> You have no session support.
> >>
> > I am not sure what to do now.  Do I need to uninstall and reinstall it
> > with session support?  What is the configuration I need to specify?
>
> Check with your OS.  They _might_ have a package (port) you need to
> install.  Probably named something like php-session
>
> Or...
>
> ./config
> make
> make install ;)
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 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



[PHP] apache and PHP on win2k3 server error

2005-12-20 Thread Peter Palermo
Hello,
 
When I am trying to load PHP as a module (php4apache.dll), it gives me

error at the time of starting Apache Server. Error is like - 



[Thu Jan 31 13:11:11 2002] [warn] 

Loaded DSO D:/php/sapi/php4apache.dll uses plain Apache 1.3 API, this

module might crash under EAPI! (please recompile it with -DEAPI)
Do you know how I can fix this or where I can download a copy of PHP already
compiled with -DEAPI (i am using PHP 4.3.11)?
 

 Thank you,

Peter Palermo

I.T. Coordinator

Venetor Group - Hamilton

 

420 Grays Road

Hamilton, ON  L8E 4H6

Toll Free:  888.664.5007

Office:  905.664.5007 (ext. 5661)

Fax:  905.561.4062

Email:   [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]> 

 
 www.venetor.com << 
http://www.venetor.com>> 

The information in this message (including its attachments) is CONFIDENTIAL
and may be legally privileged. It is intended solely for the addressee.
Access to this message by anyone else is unauthorized. If you are not the
intended recipient, notify the sender by return e-mail and delete this
message from your system. Any disclosure, copying, or distribution of the
message, or any action or omission taken by an unauthorized recipient in
reliance on it, is prohibited and may be unlawful. Our Company does not
guarantee that this communication is free of viruses, interceptions or
interference, and does not endorse the sender's personal opinions or similar
information, which may be contained in this message.

 


[PHP] Filtering URLs problem..

2005-12-20 Thread Anders Norrbring


I'm writing a filter/parsing function for texts entered by users, and 
I've run into a problem...
What I'm trying to do is to parse URLs of different sorts, ftp, http, 
mms, irc etc and format them as links, that part was real easy..


The hard part is when a user has already entered a complete link..
In short:

http://www.server.tld/page.html
should be converted to:
href='http://www.server.tld/page.html'>http://www.server.tld/page.html


That part works fine, but if the user enters:

click here

it all becomes a mess...  Can somebody please make a suggestion on this?
--

Anders Norrbring
Norrbring Consulting

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



Re: [PHP] Write a FIFO file

2005-12-20 Thread Robin Vickery
On 12/20/05, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote:
> Ok, I tried it before, it didn't work:
>
> [...]
>
> Try to execute it and execution never ends... browser is waiting for
> ever ...
> No errors in error php error log.
>
> Any ideas?

I bet your script will finish as soon as you read from the other end -
for example by doing 'cat fifo' from a shell.

-robin


Re: [PHP] Write a FIFO file

2005-12-20 Thread Ruben Rubio Rey

Ok, I tried it before, it didn't work:

For example,


fifo file created as root:
mkfifo fifo
chmod 777 fifo

Try to execute it and execution never ends... browser is waiting for 
ever ...

No errors in error php error log.

Any ideas?

Jay Blanchard wrote:


[snip]
I have  a problem. I have created a fifo file (under linux) and I m not 
able to append some line from a php script.  There is not output error, 
php just is executing for ever ...


How can I write a fifo file?
[/snip]

Please have a look here; http://www.php.net/file as a starting point for
file operations. You can append to a file with the fopen() function...
http://www.php.net/fopen


 



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



RE: [PHP] can someone explain this query to me

2005-12-20 Thread Dan Parry
WHERE id IN (1,2,3)

Is the same as saying WHERE id = 1 OR id = 2 OR id = 3

Few more details in this link

http://www.w3schools.com/sql/sql_in.asp

HTH

Dan

-Original Message-
From: Ross [mailto:[EMAIL PROTECTED] 
Sent: 20 December 2005 12:07
To: php-general@lists.php.net
Subject: [PHP] can someone explain this query to me

$query = "delete from meetings where id IN (".implode(",", $ids).")";


Just the end bit, ids is an array of values (1,2,3,4,5) what does the IN 
do??

Ross 

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

__ NOD32 1.1328 (20051219) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com

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



Re: [PHP] can someone explain this query to me

2005-12-20 Thread David Grant
Ross,

Ross wrote:
> $query = "delete from meetings where id IN (".implode(",", $ids).")";
> 
> Just the end bit, ids is an array of values (1,2,3,4,5) what does the IN 
> do??

It's the equivalent of WHERE id = 1 OR id = 2 OR id = 3 OR id = 4 OR id = 5.

Cheers,

David
-- 
David Grant
http://www.grant.org.uk/

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



[PHP] can someone explain this query to me

2005-12-20 Thread Ross
$query = "delete from meetings where id IN (".implode(",", $ids).")";


Just the end bit, ids is an array of values (1,2,3,4,5) what does the IN 
do??

Ross 

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



Re: [PHP] Problem with fopen and sending POST vars

2005-12-20 Thread Silvio Porcellana [tradeOver]
Barry wrote:
> Hello everyone!
> 
> I have a problem sending POST vars via fopen.
> It was possible for me to send some xml data but that's all.
> 
> Anyone know how to send POST vars?
> Big probleme here is also that i have to connect via SSL.
> 

cURL can be your friend...

http://php.net/curl
http://www.zend.com/pecl/tutorials/curl.php

HTH, cheers
Silvio

-- 
tradeOver | http://www.tradeover.net
...ready to become the King of the World?

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



Re: [PHP] XML Parser set option

2005-12-20 Thread ondrej

Amol Hatwar wrote:

Hi,

The PHP Manual entry for xml_parser_set_option lists an option called:
XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option
enables or disables.

The manual entry itself is a bit terse:
"Whether to skip values consisting of whitespace characters."

Doodling around with it in code got me no luck. Any ideas on what kind
of whitespaces it does supress?


Look at this script:

\n\t";

$p = xml_parser_create();

xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, $argv[1]);
xml_parse_into_struct($p, $simple, $vals);

xml_parser_free($p);
echo "\nVals array\n";
print_r($vals);
?>

// sets XML_OPTION_SKIP_WHITE to false
[EMAIL PROTECTED] ~/tmp $ php simple.php 0
Array
(
[0] => Array
(
[tag] => ROOT
[type] => complete
[level] => 1
[value] =>

)

)

// sets XML_OPTION_SKIP_WHITE to 1
[EMAIL PROTECTED] ~/tmp $ php simple.php 1
Array
(
[0] => Array
(
[tag] => ROOT
[type] => complete
[level] => 1
)

)

With XML_OPTION_SKIP_WHITE = 1 sets are whitespace chars discarded from 
the result. In first output is index 'value' which contains only "\n\t" 
- whitespace chars. Second output is without this index in array - 
whitespace chars are ignored.


If you have node which contains text and whitespace chars " some 
text" then whitespace chars are not discarded. Only content of 
nodes with whitespace chars only are discarded (-> 
).



--
Ondrej Ivanic
([EMAIL PROTECTED])

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



[PHP] XML Parser set option

2005-12-20 Thread Amol Hatwar
Hi,

The PHP Manual entry for xml_parser_set_option lists an option called:
XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option
enables or disables.

The manual entry itself is a bit terse:
"Whether to skip values consisting of whitespace characters."

Doodling around with it in code got me no luck. Any ideas on what kind
of whitespaces it does supress?

Regards,

ah

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



Re: [PHP] Access Headers Submitted by Browser

2005-12-20 Thread Jochem Maas

Curt Zirzow wrote:

On Mon, Dec 19, 2005 at 11:28:07PM -0500, Michael B Allen wrote:


I want to read headers submitted by the client. Are these available
through some global array somewhere?



You will notice all the  HTTP_* values in:
  var_dump($_SERVER);


hi Curt,

although there is lots of header info in the SERVER super global I don't
know if they [headers] are all accounted for there, I assume this because
of the existance of getallheaders().


After PHP 4.3.0, getallheaders() is an alias for apache_request_headers().



Curt.


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