php-general Digest 20 Jun 2010 16:47:18 -0000 Issue 6807

2010-06-20 Thread php-general-digest-help

php-general Digest 20 Jun 2010 16:47:18 - Issue 6807

Topics (messages 306270 through 306274):

Re: stripping first comma off and everything after
306270 by: Ashley Sheridan
306271 by: Daniel P. Brown
306273 by: Al

What am I missing here?
306272 by: Rick Dwyer

Encrypt and Decript email using PHP
306274 by: saeed ahmed

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On Sat, 2010-06-19 at 10:09 +0100, Ashley Sheridan wrote:

 On Fri, 2010-06-18 at 15:03 -0500, Adam wrote:
 
  I'm querying data and have results such as a variable named 
  $entries[$i][dn]:
  
  CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx
   
  
  
  Basically I need to strip off the first command everything after, so 
  that I just have it display CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92.
  
  I tried echo rtrim($entries[$i][dn],,); but that doesn't do 
  anything.  Any ideas?
  
 
 
 A substring() a strpos() should do the trick:
 
 substring($entries[$i]['dn'], 0, strpos($entries[$i]['dn']-1))
 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 


An amendment, as I read the rest of the thread and realised that I too
had missed out a check for the comma:

substring($entries[$i]['dn'], 0,
(strpos($entries[$i]['dn']?strpos($entries[$i]['dn']-1:strlen($entries[$i]['dn']

It doesn't look pretty, but it should do the trick.

Thanks,
Ash
http://www.ashleysheridan.co.uk


---End Message---
---BeginMessage---
On Sat, Jun 19, 2010 at 05:09, Ashley Sheridan a...@ashleysheridan.co.uk 
wrote:

 A substring() a strpos() should do the trick:

Echo echo

[sprintf()]

-- 
/Daniel P. Brown
URGENT:
EXTENDED TO SATURDAY, 19 JUNE: $100 OFF
YOUR FIRST MONTH, FREE CPANEL FOR LIFE
ON ANY NEW DEDICATED SERVER.  NO LIMIT!
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
---End Message---
---BeginMessage---



On 6/19/2010 3:08 AM, Adam Richardson wrote:

$before_needle = true



Requires 5.3
---End Message---
---BeginMessage---

Hello List.

I am completely at a loss for why the line of code below returns the  
desired value:


$PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRI
PT_NAME']), strlen($_SERVER['REQUEST_URI']));

BUT, putting the same line of code on 1 line fails to return anything:

$PATH_INFO=  
substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRIPT_NAME']),  
strlen($_SERVER['REQUEST_URI']));




 --Rick


---End Message---
---BeginMessage---
hello friends,

Is there a way to send an encrypted email from server-side PHP, and then
decrypt it using an email client such as Outlook?

regards
saeed
http://saeed05.wordpress.com
---End Message---


[PHP] Encrypt and Decript email using PHP

2010-06-20 Thread saeed ahmed
hello friends,

Is there a way to send an encrypted email from server-side PHP, and then
decrypt it using an email client such as Outlook?

regards
saeed
http://saeed05.wordpress.com


Re: [PHP] Encrypt and Decript email using PHP

2010-06-20 Thread Adam Richardson
On Sun, Jun 20, 2010 at 12:46 PM, saeed ahmed saeed@gmail.com wrote:

 hello friends,

 Is there a way to send an encrypted email from server-side PHP, and then
 decrypt it using an email client such as Outlook?

 regards
 saeed
 http://saeed05.wordpress.com


If you use a standard such as s/mime, then yes:

http://en.wikipedia.org/wiki/S/MIME
http://www.php.net/manual/en/function.openssl-pkcs7-encrypt.php
http://deb-tech.spaces.live.com/blog/cns!49551AC4A11853DE!1021.entry
http://support.apple.com/kb/TA22353

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com


[PHP] function within a class function

2010-06-20 Thread Rick Pasotto
Within a class function I have defined another function for use with the
usort() function. How do I reference it?

When it's not part of a class usort($arr,cmp) works fine but when it's
within a class function I get this error:

PHP Parse error:  syntax error, unexpected T_STRING, expecting T_FUNCTION

Is it not in the scope of the class function?

-- 
Memory is like an orgasm.  It's a lot better if you don't have to fake it.
-- Seymour Cray (on virtual memory)
Rick Pasottor...@niof.nethttp://www.niof.net

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



Re: [PHP] function within a class function

2010-06-20 Thread Rick Pasotto
On Sun, Jun 20, 2010 at 08:47:53PM -0400, Brandon Rampersad wrote:
 $this-usort();
 self::usort();
 
 On Sun, Jun 20, 2010 at 7:45 PM, Rick Pasotto r...@niof.net wrote:
 
  Within a class function I have defined another function for use with the
  usort() function. How do I reference it?
 
  When it's not part of a class usort($arr,cmp) works fine but when it's
  within a class function I get this error:
 
  PHP Parse error:  syntax error, unexpected T_STRING, expecting T_FUNCTION
 
  Is it not in the scope of the class function?

Forgive my ignorance but I have absolutely no idea what you're trying to
tell me.

usort() is part of the language so when, why, how does it become an
object of some class?

-- 
We have rights, as individuals, to give as much of our own money as
 we please to charity; but as members of Congress we have no right so
 to appropriate a dollar of public money. -- David Crockett
Rick Pasottor...@niof.nethttp://www.niof.net

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



[PHP] Re: Seeking developer for short term project

2010-06-20 Thread Dev Job
Just wanted to let everyone know that we will be finishing up with interview
this week in order to make a decision.  So, if anyone is interested, please
let me know so we can discuss the project further.

U.S. and UK solo developers (no teams) please.

Thanks!


On Mon, Jun 14, 2010 at 12:46 PM, Dev Job job4d...@gmail.com wrote:

 Our company is looking to hire a PHP Developer for a short term project.
  We're currently in the last couple weeks of the interview phase to narrow
 down our options.  We are looking for a developer that is comfortable
 working with existing code as well as creating new code.  You must be
 skilled in PHP and MySQL in addition to HTML and javascript.  Experience in
 jQuery is a plus!

 We're looking for candidates from the U.S. and UK only right now.

 If you meet the requirements and are intersted, please respond with a
 resume and contact information.

 We'll be making a decision in the next couple weeks, so please respond
 soon!



[PHP] not receiving mail from list

2010-06-20 Thread Rick Pasotto
This evening I sent two emails to the list but have not received either
of them back. Checking my logs I see that the last email I got was dated
2010-06-12. Could I have been unsubscribed without my knowing about it?

(My posts were received by the list since I got private replies.)

-- 
...He who laughs does not believe in what he laughs at, but neither does
 he hate it. Therefore, laughing at evil means not preparing oneself to
 combat it, and laughing at good means denying the power through which
 good is self-propagating. -- Umberto Eco, The Name of the Rose
Rick Pasottor...@niof.nethttp://www.niof.net

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



[PHP] Re: Seeking developer for short term project

2010-06-20 Thread Manuel Lemos
Hello,

on 06/21/2010 12:04 AM Dev Job said the following:
 Just wanted to let everyone know that we will be finishing up with interview
 this week in order to make a decision.  So, if anyone is interested, please
 let me know so we can discuss the project further.
 
 U.S. and UK solo developers (no teams) please.

You may want to also post it in the PHP jobs section in the
PHPClasses.org site. Thousands of PHP developers have signed up to get
jobs offers like yours. It is free for non-urgent jobs.

http://www.phpclasses.org/jobs/



-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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