We currently have a table setup to keep track of cache file names or memcached key references. The table exists so that when a comment is added or more content is added the system automatically purges those cache files/key-value pairs that are affected by the update so the rebuild the next time a user accesses the page the user sees the ...
Ex:
echo getMyUrl();
should echo:
http://localhost/myapplication
...
Ive recently implemented memcache on my site which has been under heavy mysql load (mysql was as optimized as I could make it). It solved all my load issues, and site is running beautifully.
The problem that Im facing now is stale cached values. I have 1hr auto expiration times on most pages, and Im also deleting the key when the value...
Like http:webmail.wipro.com#a:?b;
I want to break this url and store only webmail and wipro into my database. Can any one help me out with this please. Using php.
...
I wrote:
$im = imagecreatefromstring($im_string);
return imagegif($im,'a.gif');
The content of variable $im_string I get from a ZIP file.
It should work, but it returns '1'.
Why is the reason?
...
echo explode(' ','A B')[0]
What's the right version?
...
My url is something such as: "inventory.php?sorting=1" and so forth. Page loads fine but does not display the information properly.
mysql_connect("localhost","user","pass");
mysql_select_db("database");
if ($sorting == 1){
$result = mysql_query("select * from vehicles ORDER BY year DSC");
}
elseif ($sorting == 2){
$result = mysql_qu...
I'm working on syncing events from our project management DB into a google calendar using PHP.
Creating events in GCal works fine, but deleting them is proving to be a real pain, especially as there aren't any examples on how to do it.
Has anyone done this before in PHP (not on Zend Framework)?
Thanks
...
Is there any good rating and voting script tutorials that use PHP and MySQL? If so can someone point them to me so I can check them out.
...
Scenario:
Sending XML, generated using php, via cURL to an external server for parsing.
Problem:
The XML contains tag attributes which cause problems when being sent using cURL
Code:
$generated_xml =
-- NOTE: NOT THE SYNTAX USED IN THE CODE, SPLIT FOR EASE OF READING --
"<xconnect>
<report>
<id>contact_get</id>
<in...
Hi
I want to allow a dir list of certain directorys, but I want to block any downloads.
Basically the dir structure is
Nzbs
-> Alt.binaries.mp3
-> Alt.binaries.tv
-> Alt.binaries.multimedia
The files in the sub dirs are .zip files.
I want users to be able to view the contents of the sub dirs, but not allow any downloading.
Ive sea...
Assuming you have a constant defined in a class:
class Foo {
const ERR_SOME_CONST = 6001;
function bar() {
$x = 6001;
// need to get 'ERR_SOME_CONST'
}
}
Is it possible with PHP?
...
I have a script to convert to base 62 (A-Za-z0-9) but how do I get a number out of MD5?
I have read in many places that because the number from an MD5 is bigger than php can handle as an integer it will be inaccurate... As I want a short URL anyway and was not planning on using the whole hash, maybe just 8 characters of it....
So my qu...
Hi,
I am using Zend Server CE with windows XP. I am trying Virtual host.
My server port is 8080.
Server default document root is C:\Zend\Apache2\htdocs. and my project is on c:\workspace\projectname
My Virtual host file is as follows.
NameVirtualHost *:8080
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
<Virtua...
sending an email:
From: <...>
X-Mailer: SnowBoss
Reply-To: <...>
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
To: <...>
Subject: =?UTF-8?B?0JzQntCZIFNVQkpFQ1Q=?=
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----------A4D921C2D10D7DB"
This is a multi-part message in MIME format.
---------...
Hi,
I am confused on how to read a csv file in php ( only the first 4 fields) and exclude the remaining fileds.
Sno,Name,Ph,Add,PO
1,Bob,0102,Suit22,89
2,Pop,2343,Room2,78
I just want to read first 3 fileds and jump to next data. cannot figure out how to do through fgetcsv
any help?
Thanks,
...
Hi all,
I'm using the tiny mce editor in my website and I want to load some text from database in the text area that uses tinymce.
The javascript configuration for the editor is the following:
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
editor_selector : "mceAdvanced",
plugins ...
I am writing a lightweight logging class in php.
How do I automatically record the filename/function/line number where the function in the Log class is being called from and save the line number and time and stuff without making my users bother with entering $__LINE__ and $__FILE__ every time they call the function. Is there something ...
Hi good people once again
While busy traversing, iterating and manipulating my arrays from a mysql database i have stumbled on a problem, which i know you will be able to help me with - fellow geeks.
I have a COLUMN the contains city names and some cities appear several times on the COLUMN.
I'm using the following query to retrieve th...
I use fdf to fill online pdf form. Now I want to fill the same pdf form multiple times ( entries from a database) for multiple users and save this pdf document with all the entries ( same form multiple times for multiple users). My user wants to fill this form for all the users from a table and save this pdf document for future reference...