php-general Digest 20 Jun 2010 16:47:18 -0000 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:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
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=XXXXXXXXXXf,OU=XXXXXXXXXX,OU=XXXXXXXXXXXXX,DC=xxxxxxxx,DC=xxxxxxxxxx,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 ---
--- Begin Message ---
On Sat, Jun 19, 2010 at 05:09, Ashley Sheridan <[email protected]>
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!
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
--- End Message ---
--- Begin Message ---
On 6/19/2010 3:08 AM, Adam Richardson wrote:
$before_needle = true
Requires 5.3
--- End Message ---
--- Begin Message ---
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 ---
--- Begin Message ---
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 ---