Hi,
I'm trying to implement SwfUpload in my web page, and I'm using php to save files on server. As is the first time I use this component, I choose to run the algoritm is suggested from the SwfUpload team (http://swfupload.org/forum/generaldiscussion/214): I've put it in a file and I've said the control to use it as code file.
It did...
Hello.
So i have this script:
<?php
$query = mysql_query("
SELECT meetup AS text, id AS theID, dato FROM member_meetups WHERE username = '$pusername' UNION
SELECT navn AS text, id AS theID, dato FROM member_film WHERE username = '$pusername' UNION
SELECT title AS text, id AS theID, dato FROM member_tutorials WHERE username = '$puserna...
There is much mentioned on ebay site. Maybe there's someone on SO who ever worked with ebay api. Could you please help me?
...
Hello,
I want to store information (sessions and a lot of strings) in RAM and I don't know if I should use a tmpfs or a memcached server. Someone did some benchmark and knows which one is faster? It's needed for some ajax scripts that requests informations every 1-5 seconds per user who is logged in, like a webchat in PHP. So PHP has to ...
I'm using CodeIgniter with codeigniter sessions that are stored in a MySQL database.
I need to do a multi page redirect as shown below:
some_form.php -> processing.php -> another_form_based_on_processing.php
Everything's okay going from some_form.php -> processing.php
But when I redirect the page from processing.php -> another_form_...
I'm looking for some advice on whether or not I should use a separate database to handle my sessions.
We are writing a web app for multiple users to login and check/update their account specific information. We didn't want to use the file storage method on the webserver for storing session information, so we decided to use a database...
Hi I want to analyze HTML page by following example.
I can put url page to textfield then press enter.
I get some text from HTML page such as title, h1, div id="do" or so on.
How I can do it by using PHP?
Thanks!
...
I have a ZF app and am saving times as UTC in MySQL db. When I retrieve, them I'd like to tell Zend_Ddate that they are UTC rather than the timezone set in php.ini of 'America/Los Angeles'.
Currently, I'm instantiating like this:
$date=new Zend_Date($item['created_on_utc'],Zend_Date::ISO_8601,'en_US');
but feel like there should be a...
How can I write this in such a way that $counter value is 1 on its first iteration and 0 on each following cycle?
$counter =1;
foreach($result):
$number = $result['value'] + $counter;
db->update($result['value'] => $number);
$counter--;
endforeach;
Essentially my goal is to get $number to be $number+1 on the first loop and the...
I am dissolving a rather big old library with various PHP helper functions that have amassed over time. I'm looking for Zend Framework based replacements for as many of these functions as possible.
My first candidate is a function that returns the users's most preferred browser language from the huge list that can be http_accept_languag...
I have been dabbling in programming/scripting languages since I was a kid. I started off with HTML and CSS, then went on to PHP (which I got quite good at) and then to Python, Perl, and C(++). I've recently done a lot of work in PHP (along with MySQL).
After spending so much time learning these languages, I now want to do something with...
could someone help me with the regex pattern that i could use to match the text "Cats" within the link element?
<A HREF="http://www.catingale2?subject=10023">Cats</A> forum
Thanks in advance!
...
Here's a piece of code from the xss_clean method of the Input_Core class of the Kohana framework:
do
{
// Remove really unwanted tags
$old_data = $data;
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
}
while ($ol...
I am attempting (and failing) to write a PHP regex that will match a Windows product key in the form XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (where X is an uppercase letter or a number).
I have come up with the following, but it is not doing quite what I expect (provided it actually can do what I expect!). I consider myself pretty well versed in ...
I'm starting to get to grips with CodeIgniter and came across it's support for the Active Record pattern.
I like the fact that it generates the SQL code for you so essentially you can retrieve, update and insert data in to a database without tying your application to a specific database engine.
It makes simple queries very simple but ...
I have some pages, which work fine locally(using WAMP and error_reporting E_ALL in php.ini), but once I upload them, I get the following error:
Fatal error: Call to undefined method DB::exists()
The method is there, and I don't know why it can't be seen.
Do you have an idea what went wrong?
...
if(isset($_POST['remember'])) {
if(!isset($_COOKIE['tracker_id'])) {
setcookie('tracker_id', $_SESSION['id'], time()+2592000);
setcookie('tracker_username', $_SESSION['username'], time()+2592000);
setcookie('tracker_rsn', $_SESSION['rsn'], time()+2592000);
}
}
I know the code works, because I check to se...
php -v gives this
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20060613
PHP compiled wi...
My team currently has a development web/database server and a live deployment web server and a live database server. We use SVN with the repository stored on the development server but the problem is our deployment process.
Currently when we need to deploy an update to the live application we simply use SFTP to transfer from the reposi...
Hello,
I am on a MediaTemple Dedicated Virtual server and have enabled Pear using the instructions found at:
http://kb.mediatemple.net/questions/514/Enabling+PEAR+by+setting+your+open_basedir+and+include_path
Here's the problem...
In my PHP script, I have this:
require_once 'Crypt/HMAC.php';
When I execute the script, I get this me...