ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
Like I said: www.sektioneins.de www.scanit.be
-
You can hire a proffesional hacker they give you a detailed report afterwards. I know a few companies but these are based in Belgium and in Germany: www.sektioneins.de www.scanit.be
-
Please post your code as the above command's should work you probably used them wrong
-
No don't use client side cookies to auto-login a user many do something like: $_COOKIE['username'] = $username; $_COOKIE['password'] = $password; And then one of your users logs in on a public computer and his data is readable by any competent hacker that uses that computer after him Try any of the below options: session_cache_expire session_set_cookie_params
-
make your database field datetime and use: $sqlDate = date('Y-m-d', strtotime($date));
-
Maybe it's because of that new firewall your company uses that prohibits all it's personnel to upload irrelevant and useless stuff on to the internet
-
What's this for bullshit? Are we now storing a session expiration date on an expiring session? Just use: ini_set('session.save_path', SESSION_SAVE_PATH); ini_set('session.gc_probability', 100);// not recommended but will make sure the session is removed immediatly after expiration session_set_cookie_params(3600);//cookie expires 3600 seconds after initialization session_start(); Another method is using a database as it allows for more control as: SELECT * FROM sessions WHERE id = $id AND last_modified + lifetime > now() This will effectively expire the session when last_modified + lifetime <= now() altough the deletion of the record may well be a few minutes later. It has also other advantages like a session will be re-used instead of creating a new one whenever the user logs-in before the session expires by which the last_modified time is modified and the expiration is delayed
-
http://reader.google.com
-
I highly disadvice against the use of integer as an indicator for a user level it's just not readable. Any programmer that will have to maintain your work will have to write down which number stands for which role. A much easier approach is: class User { const ROLE_VISITOR = 1; const ROLE_MEMBER = 2; const ROLE_ADMINISTRATOR = 4; private $data = array(); public function __construct($data) { $this->data = $data; } public function isVisitor() { return $this->_getRole() & self::ROLE_VISITOR; } public function isMember() { return $this->_getRole() & self::ROLE_MEMBER; } public function isAdministrator() { return $this->_getRole() & self::ROLE_ADMINISTRATOR; } private function _getRole() { return (isset($data['role']) && is_integer($data['role'])) ? $data['role'] : self::ROLE_VISITOR; } } // in your script if ($user->isAdministrator()) { Something like that is readable
-
Then provide some more information or an example of what you want to achieve because I agree with ohdang888 from what I read from you.
-
Here's a list of a few good forums around http://webtecker.com/2008/05/02/8-popular-open-source-forums/ I highly recommend Vanilla or SMF (which PHPFreaks uses)
-
Your code should have been: foreach ($array as $key => $value) { unset($array[$key]); } But this is equal to the faster: $array = array();
-
Hi - having some issues trying to post to back end database
ignace replied to Gilly79's topic in PHP Coding Help
You were right it is simple look at the below code see something strange? <input type="submit" name="button" id="button" value="Submit" /> if (isset($_POST['submit'])) { -
$query = "SELECT data_id, resolution FROM data WHERE tdate = '$date' AND resolution IN ('Resolved', 'Dispatch') ORDER BY resolution"; $result = mysql_query($query); if ($result) { $resolved = array(); $dispatch = array(); while ($row = mysql_fetch_assoc($result)) { if ($row['resolution'] === 'Resolved') { $resolved[] = $row; } else if ($row['resolution'] === 'Dispatch') { $dispatch[] = $row; } } //use $resolved, $dispatch }
-
Use the BaseUrl view helper <link href="<?php print $this->baseUrl('styles/screen.css'); ?>" .. />
-
Instead of keeping track of hits manually use Google Analytics instead it provides you with much more information and allows you to set-up funnels and goals http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55580
-
If you go for one table like jl5501 suggested you need to make sure that whenever a user adds a product it's listed under a subcategory because if the use is able to place it under a category then your product may well never be shown
-
Post your database structure
-
Well if you don't store it in a database then why don't you just create 2 files: summer.inc.php and winter.inc.php $time = time(); if ($time >= mktime(0, 0, 0, 5, 1) && $time <= mktime(0, 0, 0, 31, 10)) { include('summer.inc.php'); } else { include('winter.inc.php'); }
-
Would someting like Gears work? http://gears.google.com/
-
create table opening_hours ( id integer not null auto_increment, valid_from date, valid_until date, monday varchar(32), tuesday varchar(32), wednesday varchar(32), thursday varchar(32), friday varchar(32), primary key (id)); $query = 'SELECT monday, tuesday, wednesday, thursday, friday FROM opening_hours WHERE now() BETWEEN valid_from AND valid_until'; $result = mysql_query($query); list($monday, $tuesday, $wednesday, $thursday, $friday) = myql_fetch_array($result, MYSQL_NUM)) { //echo '<td>', $monday, '</td><td>', $tuesday, '</td><td>', $wednesday, '</td><td>', // $thursday, '</td><td>', $friday, '</td><td>'; The fields monday till friday would hold the opening hours like 17:00-24:00
-
Well after 15 years of programming you would think that I have seen it all
ignace replied to MiCR0's topic in Miscellaneous
Well I still can get that degree and start working for IBM some day, so you are only spared a few years before cataclysm starts Besides if I won't kill you, time will, or the Sun, or a war between US and China, or Iran, or climate change, or terrorists, or .. 6 million ways to die, choose one!