php-general Digest 25 Nov 2007 23:42:03 - Issue 5147
Topics (messages 265003 through 265010):
Re: Adv. photo scripts
265003 by: Robert Cummings
265004 by: Casey
265007 by: PHP-General
Re: URL Parsing...
265005 by: Richard Heyes
265006 by: Jochem Maas
one of these should give you something to go on:
echo preg_replace('\.cfm$', '-meta.cfm', parse_url($_SERVER['REQUEST_URI'],
PHP_URL_PATH)), \n;
echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['PATH_TRANSLATED']), \n;
echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['SCRIPT_FILENAME']), \n;
Richard Heyes wrote:
one of these should give you something to go on:
echo preg_replace('\.cfm$', '-meta.cfm',
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)), \n;
echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['PATH_TRANSLATED']),
\n;
echo preg_replace('\.cfm$', '-meta.cfm',
Thanks for all the replys. I should have warned you in advance that I am new
;)
Casey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Nov 24, 2007 11:16 PM, Robert Cummings [EMAIL PROTECTED] wrote:
On Sun, 2007-11-25 at 01:59 -0500, PHP-General wrote:
Not sure if I'm at the
well if you take a string (filename) and wish to change the end of it somone
then I don't think str_replace() is the correct function. what's to say a script
doesn't exist called 'my.cfm.php'?
How does this:
/\.cfm$/
take into account that?
--
Richard Heyes
+44 (0)800 0213 172
Richard Heyes wrote:
well if you take a string (filename) and wish to change the end of it
somone
then I don't think str_replace() is the correct function. what's to
say a script
doesn't exist called 'my.cfm.php'?
How does this:
/\.cfm$/
take into account that?
WTF
--
PHP
Eventually, I wind up with a query similar to:
UPDATE table_01 SET field_a = 'New value here', updated=CURDATE() WHERE
primary_key=12345
Even though you've solved it one way to work out the problem here would
be to change it to a select query (unfortunately mysql can't explain
Richard Heyes wrote:
well if you take a string (filename) and wish to change the end of it
somone
then I don't think str_replace() is the correct function. what's to
say a script
doesn't exist called 'my.cfm.php'?
How does this:
/\.cfm$/
take into account that?
$ in regex's means 'end of
I use $aa=$_SERVER[REMOTE_ADDR];
and
if(($aa==192.168.2.108) || ($aa==192.168.2.34)) {
$aa=61.64.101.101;// for testing put in a public IP
}
However, I would like to cover all private IPs (192.168.x.x and 10.x.x.x
and 172.??.x.x). How can I do that simple?
bye
Ronald
$remoteIP = $_SERVER['REMOTE_ADDR'];
$parts = explode('.', $remoteIP); // Get IP bytes in an array
$isPrivateIP = false;
/* single class A */
$classA = $parts[0] == 10;
/* 16 contiguous class Bs */
$classB = $parts[0] == 172 $parts[1] = 16 $parts[1] = 31;
/* 256 contiguous class Cs */
$classC =
i did this once
$ip = sprintf(%u,intval(ip2long($_SERVER['REMOTE_ADDR'])));
and then did checks to see if it was between the ranges for 10.0.0.0,
192.168 etc...
apparently i lost that code. but it was pretty simple.
http://www.faqs.org/rfcs/rfc1918.html
10.0.0.0- 10.255.255.255
If my user wants to logout, I want that the session will be destroyed
and that he must start with the first page again (index.php) and a new
session.
Whatever I try he always gets the old sessions or he does not come to
the first page.
How can I solve that?
bye
Ronald
--
PHP General Mailing
Ronald Wiplinger wrote:
If my user wants to logout, I want that the session will be destroyed
and that he must start with the first page again (index.php) and a new
session.
Whatever I try he always gets the old sessions or he does not come to
the first page.
What code do you have?
--
13 matches
Mail list logo