Using CakePHP Auth, I want to have all actions that require being logged in to also be forced to use https.
Is this possible via a Callback somehow?
Further info: I have Admin routing in use as well as certain "member-only" actions.
Using cakePHP 1.2 also.
many thanks for any pointers on this.
boobyW.
...
I want to upload image out side site root directory using php? can any one tell me that how I give path of directory out side root for image upload ????
...
Hi
A friend directed me to this Question "What is the best PHP programming book?"
and from there suggested that "PHP in Action" is the book for me (me been a born again programmer that hasn't coded in 7 years but wants to re-code a project i got outsourced).
The question i ask, "is it still one of the best books to learn php or has php...
how we can update session variable by ajax in a php page.
...
public static String convertHexString(String hex){
byte[] bytes = new byte[hex.length() / 2];
for (int i = 0; i < bytes.length; i++) {
bytes[i] = (byte) Integer.parseInt(hex.substring(2 * i,2 * i + 2), 16);
}
sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
System.out.println(encoder.encode(bytes));
return encoder...
Dropping of the ereg-functions and their POSIX-regular expression flavor in later PHP versions?
After reading an older posting concerned of this - and reading the official PHP statement I'm inclined to ask what this is about. Following the development of PHP over the years (and doing much development in Perl and PHP) I'm really unsure i...
Im using for rediff:
$mail->Host = 'smtp.rediffmail.com'/'smtp.rediffmail.com'/;(i tried both)
$mail->Port = 25;
and for hotmail:
$mail->Host = 'smtp.live.com';
$mail->Port = 25/587; (i tried both)
but the response i get is...
SMTP Error: Could not connect to SMTP host.
wat is d problem?? or is der any othe problem???
...
I want to shorten an array so it only contains 30 elements. If for example I have an array of 100 elements is it possible to take it and chop of (as to speak) 70 of those elements?
...
I am trying to create a user login/creation script in PHP and would like to know the best way to check if a username exists when creating a user. At the moment, I have the following code:
function createUser($uname,$pword) {
$server->connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);
$this->users = $server->query("SELECT * FROM u...
I'm a total newbie to Facebook programming and would like to know, as a follow-up to this question, whether the following is possible.
I have a collection of events on a web site. I'm fetching them from several RSS feeds, and have total freedom in how to output them - e.g. as single pages, so there is a permalink for every event.
I wou...
I'm new to cakephp, I've got a simple Users controller that corresponds to a users table. I have a created field in the table that I want to ouput on the view action using the niceShort() function. how do I use it in the view?
Current code is:
<p>Member since <?php echo $user['User']['created']?></p>
thanks,
Jonesy
...
Hi friends,
I have the two times like this
2010-08-09 11:16:06
2010-08-09 11:19:12
I need to find out the time difference between these two dates and also I need to store difference between these two.For example here the difference is 00:03:02 And if the user again start the timer and stop it for example the second starting time is
20...
How can I check if each value in the variable $c = 90,89,78,88; equal true I think you call it an array in my script one at a time?
This part checks the variable.
if($cat['id'] == $c){
$url = $parent_url . $cat['url'];
echo '<a href="' . $url . '" title="' . $cat['category'] . '">' . $cat['category'] . '</a>';
}
H...
I have run in to a slight problem. The story goes as follows:
I have a document archive system (written in PHP) which runs at multiple clients (23 at present). On their system they only have their documents. Every night, they all need to be 'synced' to a master database on site (central server). I have access to each MySQL database from...
We have a product developed in PHP Symfony framework. We have couple of clients right now for whom we are maintaining different code base and databases (MySql).
They access their respective code base using subdomain like client1.myproduct.com and client2.myproduct.com
Now we want to make a single code base for both the clients and onl...
MySQL is putting off the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS `badips` ( `id` int(10) NOT NULL auto_increment, ' at line 2
When I run the following PHP:
if (file_exists("../login/includes/confi...
I have used uplodify for multiple image upload .When i installed macromedia flash 8 in my system the uplodify is not working, it showing an error
Error calling method on NPObject
in swfobject.js.It was before i installed macromedia flash 8
can any one give any solution for this one
In my system i got this error, but in other syste...
I'm trying to replicate some C# code in PHP5 and am having some difficulties.
The C# code is as following, and it is important to note that it cannot be changed:
string s = strToHash;
UnicodeEncoding encoding = new UnicodeEncoding();
byte[] bytes = encoding.GetBytes(s);
SHA1Managed managed = new SHA1Managed();
bytes = encoding.Get...
Hi,
I've got a PHP page serving content into an Iframe on another website, and it needs to re-load content inside the Iframe according to user interaction on the host website. The page content that's inside the Iframe contains multiple URLs.
In order for the Iframe interaction to work, I was thinking of using a request parameter in the...
i like to appreciate if anybody like to help me??/
...