is there a way to limit the time a website is available in php?, if you want to
have a database driven website but you would only like it to be active for 6
months for instance, i'm doing a project at univirsity and this is part of the
specs, but i cant think of a good way how to do it...
Ok, it's not the regexp for detecting email addresses what I need,
that's widely published, thanks. I'm using ereg to match this regular
expression:
(On)[\s\w\d\W\S\D\n]*(wr[i|o]te[s]?:)
That will match phrases like
On 8/3/05, Carol Swinehart [EMAIL PROTECTED] wrote:
the type On date, name email
Maybe have a cron job that deletes/changes perms to make inaccessible
the script after the given date.
Johan Grobler wrote:
is there a way to limit the time a website is available in php?, if you want to
have a database driven website but you would only like it to be active for 6
months for
Couldn't you use a date check with date()?
if(todays date end date)
{
load the site
}
else
{
the site has expired
}
Andrew Darrow
Kronos1 Productions
www.pudlz.com
- Original Message -
From: Johan Grobler [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, August 03,
btw - what has 'code generation' got to do with the question?
a oneliner to check 2 dates is not considered code generation -
I'd call it 'writing a oneliner' or something similiar :-)
[EMAIL PROTECTED] wrote:
Couldn't you use a date check with date()?
if(todays date end date)
{
load the site
This may be slightly OT, but I've modified a gallery script that I had
written for me which reads directories and echos the dir name as a
gallery.
Unfortunately, it doesn't look very nice with say picsofsomething so I
renamed the folder 'pics of something'
When this is read, the string inserts %20
Tom Chubb [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
This may be slightly OT, but I've modified a gallery script that I had
written for me which reads directories and echos the dir name as a
gallery.
Unfortunately, it doesn't look very nice with say picsofsomething so I
renamed the
I am trying to find a suitable opensource Knowledge Management System to be
used in my organisation; at least with document management, project management
group collaboration capabilities, like http://cortexpro.com/
Any clues ?
--
Roger
---
Roger Thomas wrote:
I am trying to find a suitable opensource Knowledge Management System to be
used in my organisation; at least with document management, project
management group collaboration capabilities, like http://cortexpro.com/
Any clues ?
snip
Hi Roger
KnowledgeTree comes
OK thanks Rory. I will certainly evaluate it.
--
Roger
Quoting Rory McKinley [EMAIL PROTECTED]:
Roger Thomas wrote:
I am trying to find a suitable opensource Knowledge Management System to be
used in my organisation; at least with document management, project
management group collaboration
yes sorry about that, i was going to ask about code generation but then
rephrased the question without changing the subject...
thanx for the responses, i thought of that but wouldn't changing the system
date on your machine be a way of getting around that?
Jochem Maas [EMAIL PROTECTED]
Hi
Can anyone tell me how can I count how many times my website has been viewed
using php
Thanks
Suma
_
Post FREE Classifieds.
http://www.sulekha.com/classifieds/cllist.aspx?nma=INref=msn Reach out to
over a million NRIs.
--
snip
thanx for the responses, i thought of that but wouldn't changing the system
date on your machine be a way of getting around that?
/snip
Time and Date functions are dependent on the locale settings of your server.
This message has been delivered to the Internet by
suma parakala wrote:
Hi
Can anyone tell me how can I count how many times my website has been
viewed using php
you'd think someone had done this before - try google first - there are
1000's of scripts that do this, have a look at some and see how they do it.
e.g.:
well u have a parse error in ur TESTARRAY.PHP file
within the foreach loop
u hav writen
print $day
while here u must also terminate it through semi-colon like this
print $day;
This wil solve the problem
Now it wil work
zedleon wrote:
I am having
I'm having a problem with the following code:
?php
$file = http://www.mysite.co.uk/mailing_list_database.list;;
$lines = count(file($file));
echo $lines ;
?
I'm trying to show the number of subscribers to my visitors from a
text file, but it returns a value of 1 when it should be 5000.
I
I have a question I can't answer by myself. :)
Do I need to use --with-pic option when configuring php 4?
I'm going to build it as an Apache 1.3 DSO module and going to
run multiple instances of Apache (under different users). I
use Linux (kernel 2.4.30).
Generally, when one may need to use
you sure each is on its own line (\n) ?
if you're only getting a value of 1 it is likely putting everything on a
single array key..
Tom Chubb wrote:
I'm having a problem with the following code:
?php
$file = http://www.mysite.co.uk/mailing_list_database.list;;
$lines =
When I open the list in notepad everything is on one line with a
square box character.
When I open it in wordpad, it's one email address on each line.
On 04/08/05, Sebastian [EMAIL PROTECTED] wrote:
you sure each is on its own line (\n) ?
if you're only getting a value of 1 it is likely
Hey all -
I have an unused Pentium box here, recent, well loaded with RAM and
HD. I want to turn it into a LAMP box. Never done that before; is
there a preferred one-stop-shop installer CD or anything (easy -
knock on wood)? It would be nice to end up with some kind of decent
[snip]
When I open the list in notepad everything is on one line with a
square box character.
When I open it in wordpad, it's one email address on each line.
[/snip]
Sounds like that there are not any newline characters in the file. You
could do something like this...
$theFile =
do this:
$file = 'http://www.mysite.co.uk/mailing_list_database.list';
echo 'pre';
print_r($file);
echo '/pre';
im pretty sure you'll only see 1 key..
if each has its own line, you would see something like:
Array
(
[0] = foo
[1] = foo
[2] = foo
[3] = foo
)
etc...
Tom Chubb
sorry, i forgot to put file();
Sebastian wrote:
do this:
$file = 'http://www.mysite.co.uk/mailing_list_database.list';
echo 'pre';
print_r($file);
echo '/pre';
im pretty sure you'll only see 1 key..
if each has its own line, you would see something like:
Array
(
[0] = foo
[1] = foo
Tom Chubb wrote:
I'm having a problem with the following code:
?php
$file = http://www.mysite.co.uk/mailing_list_database.list;;
$lines = count(file($file));
echo $lines ;
?
I'm trying to show the number of subscribers to my visitors from a
text file, but it returns a value of 1 when it
Hello,
I am not quite sure if this is the correct mailing list to post this
question, but here I go anyway. I have a vanilla Fedora Core 3
installation, and I am trying to run a php script through a local
website that has calls into a MySQL database. I can run this script
at the command
[EMAIL PROTECTED] wrote:
Thanks Mark and Sonu... as much as I've learned over the last few months I
think I'm still a little confused about some of this stuff. I appreciate the
Help you've given me :-)
Would any of you know about any tutorials on something like this? books with
im working on a comment/forum app and when a user enters too many
carriage returns i want to remove them before insert to db.
example, user input:
-snip-
[quote=user]
foo
[/quote]
bunch of extra lines
more text...
-snip-
I to change to:
[quote=user]foo[/quote]
more
Don't know much about the app you're writing, but does this do the trick for
you?
echo preg_replace ('!
(
\[quote
(?:=[^\]]*)?
\]
)# Capture the [quote=xxx] part
Look into the SELinux settings for your system, if you have that
enabled, by default PHP is not allowed to get that file via the user
nobody.
If you look into /var/log/messages you'll see some selinux messages.
You either need to disable selinux, or set your policy...http://
thanx for the reply, but 1 problem. there is not only \n there are \r in
the POST too (carriage returns) so a string can look like this:
$string = '[quote=xx]\r\nfoo\r\n[/quote]\r\nmore text\r\n\r\n\r\n\r\n';
and your regexp will only catch if there is just \n
any solution for \r\n in
Try changing the
\n*
patterns to
(?:\r?\n)*
Cheers,
Marco
--
BeebleX - The PHP Search Engine
http://beeblex.com
On 8/4/05 10:39 AM, Sebastian [EMAIL PROTECTED] wrote:
[quote=user]
foo
[/quote]
bunch of extra lines
more text...
--
PHP General Mailing List (http://www.php.net/)
Hi all, I just discovered the gethostbyaddr() function. By reading the
user contributed notes, I get the impression that either this function
may cause performance problems, or a user-contributed function based
upon it may be slow. So, is gethostbyaddr() slow? Is it dangerous?
Thanks!
Dotan Cohen
Dotan Cohen wrote:
Hi all, I just discovered the gethostbyaddr() function. By reading the
user contributed notes, I get the impression that either this function
may cause performance problems, or a user-contributed function based
upon it may be slow. So, is gethostbyaddr() slow? Is it dangerous?
that works for my orginal request, but i found something else:
$string = '[quote=xx]foo[/quote]\nmore text\r\n\r\n\r\n\r\nmore text';
now if they enter more carriage returns i get the results from above.
its no big deal, but you always have someone trying to 'break' the system.
thanks, i
I can say from personal experience that gethostbyaddr() and
gethostbyname() can seem almost randomly slow, depending on machine, OS,
software, who knows. I'm not smart enough to figure out the reason why
it can vary so much on machines with nearly the same configuration, but
I can tell you
I've wanted to make a ping 'program' in PHP, so after reading up on
this, it occured to me that the only difficult thing was to calculate
the ICMP checksum. So after some heavy reading I could calculate this by
pen and paper. And after some hours trying to make my calculations into
PHP code, I
On 8/4/05, Kristen G. Thorson [EMAIL PROTECTED] wrote:
I can say from personal experience that gethostbyaddr() and
gethostbyname() can seem almost randomly slow, depending on machine, OS,
software, who knows. I'm not smart enough to figure out the reason why
it can vary so much on machines
On 8/4/05, kalinga [EMAIL PROTECTED] wrote:
On 8/4/05, Kristen G. Thorson [EMAIL PROTECTED] wrote:
I can say from personal experience that gethostbyaddr() and
gethostbyname() can seem almost randomly slow, depending on machine, OS,
software, who knows. I'm not smart enough to figure out
On 8/4/05 10:56 AM, Sebastian [EMAIL PROTECTED] wrote:
that works for my orginal request, but i found something else:
$string = '[quote=xx]foo[/quote]\nmore text\r\n\r\n\r\n\r\nmore text';
Try removing double-instances of \r\n (or \n) before running the regex.
Marco
now if they enter
i missed another keypoint..
if you are running unix/linux server, you need to have a properly
setup resolv.conf
or if you experience a slowness while you quering your own domains,
check whether you DNS servers are providing authoritative answers to
your domains.
~viraj.
On 8/4/05, kalinga
I creating a out.php file that will record clicks, and the redirect
the user to the site that he wanted. I am currently using
header(Location: $url); which works as expected. The only problem
is, that the browser does not send $HTTP_REFERER info to the recieving
site.
However, that particular
Are you running this php code in windows, where a line break is made up of
a carriage return and a line feed? The file was probably created on
unix/linux where the line break is just a line feed. If you try to read this
file in windows, it will think everything is on one line. You either have
kalinga wrote:
if you are quering a external host, the bad network conditions may
cause delay in results.
if your server is connected to a heavily loaded hub/ cheap switch, or
the target hosts DNS servers are poorly configured/ slow in responce
it adds further delay to your result.
try dig/
* Sam Smith [EMAIL PROTECTED]:
shell_exec(zip -r ddd ddd); // don't work
Many version of zip won't append the .zip extension. In such a case,
what you have above will try to name the zip file the same as the
existing directory, which obviously won't work. Try:
shell_exec(zip -r ddd.zip
* Steve Turnbull [EMAIL PROTECTED]:
Is there a class or some code out there which enables you to print your
PHP code to a web page and make it appear with syntax highlighting?
As an example of what I am after, have a look here;
http://www.phpfreaks.com/phpmanual/page/function.ldap-add.html
On 8/4/05, Kristen G. Thorson [EMAIL PROTECTED] wrote:
kalinga wrote:
if you are quering a external host, the bad network conditions may
cause delay in results.
if your server is connected to a heavily loaded hub/ cheap switch, or
the target hosts DNS servers are poorly configured/
On 8/4/05, suma parakala [EMAIL PROTECTED] wrote:
Hi
Can anyone tell me how can I count how many times my website has been viewed
using php
Thanks
Suma
Suma,
I am working on that now. I will soon have a script ready under GPL.
There are two versions, one with mysql and one with flat files.
Brandon Ryan wrote:
Are you running this php code in windows, where a line break is made up of
a carriage return and a line feed? The file was probably created on
unix/linux where the line break is just a line feed. If you try to read this
file in windows, it will think everything is on one
Mark Rees [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Tom Chubb [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
This may be slightly OT, but I've modified a gallery script that I had
written for me which reads directories and echos the dir name as a
gallery.
I believe %20 and + are used to replace spaces.
See RFC 1738 - Uniform Resource Locators (URL)
http://www.faqs.org/rfcs/rfc1738.html
C.
-Original Message-
From: Satyam [mailto:[EMAIL PROTECTED]
Sent: 04 August 2005 18:07
To: php-general@lists.php.net
Subject: [PHP] Re: The Naming of
* Matt [EMAIL PROTECTED] :
Perhaps svscan and its associated daemontools programs could be
used to monitor the script instead of relying on cron.
Just a note: The above suggestion would assume you control the box, and
that you're running on a *nix system (i.e., you've got root on a linux,
bsd,
* Edwin Barrios [EMAIL PROTECTED]:
i'am developing a web framework SifEngine (Secure Web Inteface
framework) that implement MVC applaying the security ideas from
http://phpsec.org. I'am using DomXML, Sqlite, Mcrypt and PostgreSql.
After of post my development on the internet ( i have been
Denis Solovyov wrote:
I have a question I can't answer by myself. :)
Do I need to use --with-pic option when configuring php 4?
I'm going to build it as an Apache 1.3 DSO module and going to
run multiple instances of Apache (under different users). I
use Linux (kernel 2.4.30).
* Norbert Wenzel [EMAIL PROTECTED]:
Hi, I've done something like this:
class MyClass {
private $var;
function __construct($value) {
$this-var = $value;
}
public function printVar() {
echo($this-var);
}
}
$object = new MyClass('1');
$object-printVar(); //
* Marcus Bointon [EMAIL PROTECTED]:
I'm not sure if this is a bug or a feature, but it seems you can't
use class constants to set default values for class properties. You
can, however, use them for default values for method params, e.g.:
class foo {}
const BAR = 100;
private
Hello,
I am trying to understand how sessions work. I have this code. My
understanding is after 1 sec of script completion, (may be little
after that), the session should destroy.
I understand that it is huge overhead for server, not planning to do
this but want to understand how it really
So what is your question...?
- Original Message -
From: Suhas [EMAIL PROTECTED]
To: php-general php-general@lists.php.net
Sent: Thursday, August 04, 2005 4:13 PM
Subject: [PHP] Sessions again
Hello,
I am trying to understand how sessions work. I have this code. My
Hello,
I am trying to understand how sessions work. I have this code. My
understanding is after 1 sec of script completion, (may be little
after that), the session should destroy.
I understand that it is huge overhead for server, not planning to do
this but want to understand how it really
session.cookie_lifetime integer
session.cookie_lifetime specifies the lifetime of the cookie in seconds
which is sent to the browser. The value 0 means until the browser is
closed. Defaults to 0. See also session_get_cookie_params() and
session_set_cookie_params().
- Original Message
Well script is not working as it is supposed to be. Even after 2 hrs I
visit the page the count variable increases by 1 than prevois value.
Any reason why is that so? If my understanding is not correct please correct me.
Thanks
SP
On 8/4/05, James [EMAIL PROTECTED] wrote:
So what is your
Thanks! tried googling - only found using ruby to automatically generate
php sites...
the SW-Soft Site Builder program is a great program - looking all through
it now.
Thanks!
For one project, I'm required to access a web service for every page.
Basically it returns a little bit of random text. I have no control
over the web service, and there is no possibility of cacheing or
bringing it locally: the requirements are that it be accessed live
across the Internet
Brian Dunning wrote:
For one project, I'm required to access a web service for every page.
Basically it returns a little bit of random text. I have no control
over the web service, and there is no possibility of cacheing or
bringing it locally: the requirements are that it be accessed live
Suhas wrote:
Hello,
I am trying to understand how sessions work. I have this code. My
understanding is after 1 sec of script completion, (may be little
after that), the session should destroy.
I understand that it is huge overhead for server, not planning to do
this but want to understand
I'm quoting out a system for a Windows/Apache/PHP/MySQL
database-driven web application I've written. I've never gotten too
deep into determining what is the actual performance bottleneck in
this scenario. Is it the disk or the RAM?
I expect about 75-100 users during business hours. 90% will be
Dotan Cohen wrote:
I creating a out.php file that will record clicks, and the redirect
the user to the site that he wanted. I am currently using
header(Location: $url); which works as expected. The only problem
is, that the browser does not send $HTTP_REFERER info to the recieving
site.
On 8/5/05, Jochem Maas [EMAIL PROTECTED] wrote:
he runs php5, you run php4 - is the following set on his server perchance?:
echo $_SERVER['HTTP_REFERER'];
//or
echo getenv(HTTP_REFERER);
note that $HTTP_REFERER is depreciated in php5.
also the freeBSD box may have a firewall that is
Dotan Cohen wrote:
On 8/5/05, Jochem Maas [EMAIL PROTECTED] wrote:
he runs php5, you run php4 - is the following set on his server perchance?:
echo $_SERVER['HTTP_REFERER'];
//or
echo getenv(HTTP_REFERER);
note that $HTTP_REFERER is depreciated in php5.
also the freeBSD box may have a
Sebastian wrote:
im working on a comment/forum app and when a user enters too many
carriage returns i want to remove them before insert to db.
example, user input:
-snip-
[quote=user]
foo
[/quote]
bunch of extra lines
more text...
-snip-
I to change to:
* JM [EMAIL PROTECTED]:
I'm quoting out a system for a Windows/Apache/PHP/MySQL
database-driven web application I've written. I've never gotten too
deep into determining what is the actual performance bottleneck in
this scenario. Is it the disk or the RAM?
I expect about 75-100 users during
70 matches
Mail list logo