Hi. I have a small project for which I need to offer a CMS UI/storage system.
I am guessing that I can have my computer-fearing client use the Wordpress UI to store a set of images for her gallery page, and a set of text for her testimonials page. And then, through a Wordpress function, or raw SQL query into the database, I can get the...
I was wondering how would go about displaying five images in a row using lists. For example, how would I generate the following XHTML code below using PHP & MySQL?
Here is the XHTML code.
<ul>
<li><a href="#" title=""><img src="" /></a></li>
<li><a href="#" title=""><img src="" /></a></li>
<li><a href="#" title=""><img src=...
Everywhere I have seen people talking about storing passwords in a database, they have almost always used MD5.
What is wrong with AES, or SHA1?
...
when we deploy our app, we simply create a new folder and point a symbolic link to it, so apache will always find its way to the latest build.
However, we get strange errors when we deploy and continue testing without first rebooting the apache server. We also have APC running and have a feeling that caching has something to do with thi...
Hi folks!
So I've put together this CodeIgniter library to encrypt stuff into Base62 and decrypt it back again.
Just before anyone asks, the file is application/libraries/Basecrypt.php
Here's the contents of Basecrypt.php:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Basecrypt
{
funct...
Basically I have an issue. I am posting to my users facebook statuses using a cron job, but when i run the cron from the browser I get an error after about 30 seconds. I have edited the .ini file to allow max execution time but it dont seem to work.
It updates the statuses of the first 700ish users but after that it stops.
Can I run it...
I've used my server for testing PHP & MySQL Applications long time ago.
Suddenly, When i try to execute any query on the any table in any database, i get only the first row in the result of the query !
I checked the configuration file, and didn't see anything strange there.
OS: Linux / Ubuntu 10.04 64bit Server Edition,
Web Server: Ap...
I'm having a strange problem with the Google Calendar API (through PHP with Zend_Gdata.) On the calendar in question I have several recurring events starting in March:
2010-04-19 9:30 - 16:00
2010-04-20 10:00 - 15:30
2010-04-21 9:30 - 16:00
2010-04-22 10:00 - 15:30
2010-04-23 9:30 - 12:30
Each of these repeats indefinitely but h...
What's the best method to use to notify javascript client's of changes that occur in a game asynchronously (i.e. moves made by other clients). As an example, assume a turn based board game. Should I just have the client poll the PHP backend every second or so for new moves, or is there a better way to send an asynchronous notification to...
Please, can somebody give me link to php_xsl.dll for this php version:
PHP Version 5.3.1 Build Date Nov 19
2009 10:16:45 Compiler MSVC6 (Visual
C++ 6.0) Architecture x86
in my AMP was no xsl module, and I cant find in google link to my php version php_xsl.dll
...
I'm running PHP on a shared Apache web server. I can edit the .htaccess file.
I'm trying to simulate a file file structure that is not actually there. For example, I would like for the URL: www.Stackoverflow.com/jimwiggly to actually display www.StackOverflow.com/index.php?name=jimwiggly I got halfway there by editing my .htaccess fi...
Hi.
I hope someone could help me.
When i load an external php that generates a set of fields, i have no problems, but then i send the generated form, i can not access the vars.
There is the code i user:
For load the external file:
$.ajax({
type: "POST",
url: "product-insert.php",
contentType: "application/x-www-for...
I'm looking for a PHP class or script that i can use the calculate a students GPA from a Grade point scale.
Example: http://www.williams.edu/registrar/records/gpa.html
Also, need to take into account Honor and AP classes. (If class is chosen as honors assign additional .5 points to letter grade. If chosen as AP or IB assign 1 addition...
Hey guys,
I'm trying to load this module: php_mcrypt.dll'
Everything in the php.ini file is correct, see for yourself:
extension_dir = "C:/PHP/5.2.13/ext"
extension=php_mcrypt.dll
The file exists in this path. And other modules are in there as well and are loaded successfully. It only has a problem with this particular module.
I hav...
Sorry for the terrible title, best I could think of at the time! Say I have a 'path' array like so;
array('this', 'is', 'the', 'path')
What would be the most effective method to end up with the array below?
array(
'this' => array(
'is' => array(
'the' => array(
'path' => array()
)
...
Hi all, I have a query that I want to sort alphabetically, but the trick is that I want the sorting to treat two columns equally. For instance, if the first row of first_col equals apple and the second row of second_col equals aardvark I want the value in the second row of second_col to be listed before the value in the first row of fir...
array(2) {
[0]=>
object(stdClass)#144 (2) {
["id"]=>
string(1) "2"
["name"]=>
string(5) "name1"
}
[1]=>
object(stdClass)#145 (2) {
["id"]=>
string(1) "4"
["name"]=>
string(5) "name2"
}
}
I want to add key and value (for example [distance] = 100;) to the objects in the array. After this I want...
I need to be able to generate an effectively unlimited number of datasets, so what I want to do is something like this;
<input type="hidden" name="items[]" value="{id:1,name:'some-name'}" />
I tried JSON.stringify to convert my array in javascript and store it in the current hidden input element, but it wraps all the keys and values i...
I have been using PHP's DOM to load an html template, modify it and output it. Recently I discovered that self-closing (empty) tags don't include a closing slash, even though the template file did.
e.g.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"`"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equ...
i'm searching for keywords in a string via a regular expression. It works fine for all keywords, exept one which contains a forward slash in it: "time/emit" .
Even using preg_quote($find,'/'), which escapes it, i still get the message:
Unknown modifier 't' in /frontend.functions.php on line 71
If i print the find pattern, it shows ...