|
Hi,
IIRC there is a CRON service for periodic activities; check whether your provider offers CRON.
I do not know any details, I am sure Google does.
[EDIT] It is CRON, not TRON [/EDIT]
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Monday, February 9, 2009 9:34 AM
|
|
|
|
|
Hi,
I dont know whether my server has CRON or not
my server is a shared one.With limited futures.
So how do I know whether my server has corn service or not.
And what if i dont have CRON in my server.
Regards,
Pavan.
modified on Monday, February 23, 2009 12:21 AM
|
|
|
|
|
LazyDragonfist wrote: So how do I know whether my server has corn service or not.
Check the field in your backyard... if the stalk is greater then 4 feet it's harvestin' time.
LazyDragonfist wrote: And what if i dont have CRON in my server.
Check with your host.
|
|
|
|
|
An alternative is to have the page auto refresh every ten mins.
Google "meta tag refresh" or "php header refresh"
The only downside is that you need a browser page constantly open for it to work.
|
|
|
|
|
But i want the PHP code run even the client turn off the pc.
i.e; Client just call the php page once and php should run every
10 mins even if the client pc is off.
Please help me through this.
|
|
|
|
|
Then use cron - ask your provider if your not sure if they support it - AFAIK both windows n linux servers usually support it
|
|
|
|
|
Hello,
What is your opinion about this CMS? And what features do you think must have a perfect CMS?
My goal was to create a CMS with a simple user interface on one side and wide spector of possibilities on another. And to provide delevoper with clean and expendable class architecture, unlimitied layout freedom and easy way to extend.
I would very appreciate if you write me some feedback here
Link: http://lightnote.net[^]
Demo: http://demo.lightnote.net/cms/[^]
Login: demo
Password: demo
|
|
|
|
|
Looks very simple...I'll take a peak for sure.
Do your extensions support implementing things like dynami menus, breadcrumbs, sitemaps, etc:?
|
|
|
|
|
Yes, of course! There are some built-in extensions for dynamic menus, breadcrumbs and for sitemap.xml (for google).
Currently there is no extension for sitemaps in front-end, because CMS is relatively new and it's not much extensions at all. But it's very easy to write them. You can ask me here or through contact form on lightnote.net and I can help you to quick start.
|
|
|
|
|
Hi,
Can u give me the sample project on zend framework
Thank u
|
|
|
|
|
|
I am creating online and offline users in my site.how to do it.how to know they are logged in or out when they close browser without logout.if any one know solution plz help.Thanks in advance.
modified on Wednesday, February 4, 2009 1:12 PM
|
|
|
|
|
|
Using sessions: You could store a variable for each user in the database that stores the time they were last active. It's easiest to use unix time for this (number of seconds since 1974 or something).
The include a file on every page that checks to see:
PHP (Pseudo code):
if ($timenow - $lastactive > 300){
header("Location: loginpage.php");
} else {
...
}
Then to check to see how many users are online just see how many users have isLoggedIn set to true or ($timenow - $lastactive < 300)
|
|
|
|
|
How To create dynamic subdomains using .htaccess.Any one know plz help. Thanks in advance
|
|
|
|
|
|
How To create dynamic subdomains using .htaccess.Anyknow plz help Thanks in advance
|
|
|
|
|
I've to need the PHP Code for a STO Project. PHP and MySQL is required for this.Sufficent payment will be give to Programmer. It's not a professional project but it's a College Project. If you are intrested then email me at "moononly4you@hotmail.com" I'll send you the document file through Email.
Urgently Required
Regards,
|
|
|
|
|
I have a php program that uses sessions : there are about 12 variables. I understand that to initialise these session variables I have to add &nbs p; $_SESSION['variable']; can this be an array- eg? &nbs p; $_SESSION ['variable1,'variable2'] Is this done before or after registering the session variable. Is this initialization of session variables done once when the session is created or for each page? Thanks
Optional Information:
OS: Unix; Browser: IE
Already Tried:
I'm converting the program to run with PHP 5.0 with globals on - this is what exists on the home page:
session_cache_limiter('none');
session_start();
session_register('pass_action');
session_register('user_name');
session_register('user_input');
session_register('user_encrypt');
session_register('user_artist_or_org');
session_register('user_id');
session_register('artist');
session_register('copyright');
session_register('org_id');
session_register('organization');
session_register('store_user_name');
session_register('store_user_input');
session_register('store_user_id');
session_register('store_user_encrypt');
session_register('store_user_artist_or_org');
session_register('artist_id');
Somehow I have to initialize these variables.
I have not tried anything yet because the manual info is confusing to me.
Thanks
|
|
|
|
|
To set a session variable you first need to start your session:
<?php
session_start(); /start the session
$SESSION['testvar'] = "value1";
?>
Now if you open another page on your site that has the session_start() function called you can print the value stored in the session with
<?php
session_start(); /start the session
echo $SESSION['testvar'];
?>
You will hvae to ensure your host has the session.save_handler and session.save_path php.ini values set. To test this you can try using my session test script:
http://www.joeceresini.com/testscripts/jc.sessions.phps
You can also see the values of those options in a php info file
<?php
phpinfo();
?>
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
Hostmysite.com
|
|
|
|
|
hi im new in Php,can any one plz guide in linking database with Php
|
|
|
|
|
|
In PHP, this is done with the mysql_connect() function.
Syntax
mysql_connect(servername,username,password);
Parameter Description
servername Optional. Specifies the server to connect to. Default value is "localhost:3306"
username Optional. Specifies the username to log in with. Default value is the name of the user that owns the server process
password Optional. Specifies the password to log in with. Default is ""
"Programming is a fun"
|
|
|
|
|
Let me contribute to solving your struggling :
First, because all your php pages that access mysql must connect to the Db
it is a wise tradition to create an include file
[call it for instance "dbconn.php"] with the following content :
============================
<?php
$conn = mysql_connect("localhost","root","yourpasswd")
or die('Could not connect: ' . mysql_error());
mysql_select_db("yourDBname") or die("Select DB error");
?>
============================
[NOTE the "localhost" must change if the target DB is not on your system but on a Host]
then whenever you create a new php script start with :
<?php
include('dbconn.php');
. . . . . . .
AND THEN WHAT ??? (you will say)
Here is an extract for my scripts slightly modified - with a little more modification it fits all purposes :
$query="select ProductID, ProductName from Products where ProductID=1"; // an SQL query
$result=mysql_query($query) or die('Query failed: ' . mysql_error()); // execure query
if (mysql_num_rows($result)==1) // if a record was found
{ $row = mysql_fetch_array($result,MYSQL_ASSOC);
//get record in array $row
echo 'ProductID ='. $row["ProductID"]."<BR />";
echo 'Prod.Name='. $row["ProductName"]."<BR />";
}
=======================
Good luck s4 - php is great remember !
ioannis_o5
|
|
|
|
|