[PHP] Re: socket question

2001-10-25 Thread Tim Ballantine

That seems to just give me the first line, of:
htmlheadtitlePHP Credits/title/headbody
but nothing else after that. Any ideas? :)

Tim
James Cave [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 There is some source code on the php.net site which captures the credits
 with output buffering and then uses then in the page. Once you have the
 data in a variable you can do what you like to it.

   if (function_exists('ob_start')) {
 ob_start();
 phpcredits();
 $credits = ob_get_contents();
 ob_end_clean();
   }

 Maybe that will do the trick.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: socket question

2001-10-25 Thread Tim Ballantine

That is, using a socket, that it gives me the one line. echo'ing it gives
the whole thing.

Tim
Tim Ballantine [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 That seems to just give me the first line, of:
 htmlheadtitlePHP Credits/title/headbody
 but nothing else after that. Any ideas? :)

 Tim
 James Cave [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  There is some source code on the php.net site which captures the credits
  with output buffering and then uses then in the page. Once you have the
  data in a variable you can do what you like to it.
 
if (function_exists('ob_start')) {
  ob_start();
  phpcredits();
  $credits = ob_get_contents();
  ob_end_clean();
}
 
  Maybe that will do the trick.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] socket question

2001-10-24 Thread Tim Ballantine

Hey.

Anoyone know how i would go about using one of the internal variables, such
as phpinfo() or phpcredits() to send through a socket.

like for:
write ($msgsock, :RWorld PRIVMSG $pnum :phpcredits()\n, strlen (:RWorld
PRIVMSG $pnum :phpcredits()\n));

so it sends the actual information instead of just phpcredits(). I have
tried with $credits = phpcredits(); and placed the $credits in the line
above, but that seemed to echo it to my console then send the number 1
through the socket.

Any help on this would be greatly appreciated :)

Tim



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] eregi

2001-10-01 Thread Tim Ballantine

Hello,

Could anyone tell me how to eregi a word, to see if it only contains either
numbers, letters, the _ and the -, so that any other symbol with call it
invalid. For example, theres the word expressio_n that will be valid, but
the word express%^$-n will be invalid.

Thankyou,

Tim



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine

Is there anything which doesnt use length? And something like eregi, because
it would be infeasible to list all of the symbols that a user could use, to
compare a string by.

Tim

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 See php.net/strcspn

 On Mon, 1 Oct 2001, Tim Ballantine wrote:

  Hello,
 
  Could anyone tell me how to eregi a word, to see if it only contains
either
  numbers, letters, the _ and the -, so that any other symbol with
call it
  invalid. For example, theres the word expressio_n that will be valid,
but
  the word express%^$-n will be invalid.
 
  Thankyou,
 
  Tim
 
 
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine

Returns the length of the initial segment of str1 which does not contain
any of the characters in str2.

I realise that i could see if this matches with the length of the entire
word, and is there a way to get it to compare the word by the legal
characters, because the amount of illegal symbols, including different
language symbols (french for example) will be too high for me to list.

Tim

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Huh?  You better read that documentation page again.  You only need to
 list the illegal symbols.  And what do you mean by length?

 -Rasmus

 On Mon, 1 Oct 2001, Tim Ballantine wrote:

  Is there anything which doesnt use length? And something like eregi,
because
  it would be infeasible to list all of the symbols that a user could use,
to
  compare a string by.
 
  Tim
 
  Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   See php.net/strcspn
  
   On Mon, 1 Oct 2001, Tim Ballantine wrote:
  
Hello,
   
Could anyone tell me how to eregi a word, to see if it only contains
  either
numbers, letters, the _ and the -, so that any other symbol with
  call it
invalid. For example, theres the word expressio_n that will be
valid,
  but
the word express%^$-n will be invalid.
   
Thankyou,
   
Tim
   
   
   
   
  
 
 
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine

Thankyou...

I should have made it clearer that I did want to use only the legal
characters to compare the string by.

Tim

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Well, either you need to know the valid chars or the invalid ones.  Make
 up your mind and use strspn() or strcspn() appropriately.

 -Rasmus

 On Mon, 1 Oct 2001, Tim Ballantine wrote:

  Returns the length of the initial segment of str1 which does not
contain
  any of the characters in str2.
 
  I realise that i could see if this matches with the length of the entire
  word, and is there a way to get it to compare the word by the legal
  characters, because the amount of illegal symbols, including different
  language symbols (french for example) will be too high for me to list.
 
  Tim
 
  Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Huh?  You better read that documentation page again.  You only need to
   list the illegal symbols.  And what do you mean by length?
  
   -Rasmus
  
   On Mon, 1 Oct 2001, Tim Ballantine wrote:
  
Is there anything which doesnt use length? And something like eregi,
  because
it would be infeasible to list all of the symbols that a user could
use,
  to
compare a string by.
   
Tim
   
Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 See php.net/strcspn

     On Mon, 1 Oct 2001, Tim Ballantine wrote:

  Hello,
 
  Could anyone tell me how to eregi a word, to see if it only
contains
either
  numbers, letters, the _ and the -, so that any other symbol
with
call it
  invalid. For example, theres the word expressio_n that will be
  valid,
but
  the word express%^$-n will be invalid.
 
  Thankyou,
 
  Tim
 
 
 
 

   
   
   
   
  
 
 
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]