Hi,
I am using reCAPTCHA on this page but when I submit I get following error in my apache log:
This started happening after I set ssl to true (i have to use it, becouse website is SSL)
[Wed Jul 28 18:47:54 2010] [error] [client X.X.31.80] PHP Fatal error: Uncaught exception 'Zend_Http_Client_Adapter_Exception' with message 'Unable to...
Whats the best way to keep track of how many users and guests are online? Im making a forum for fun and learning
Right Now I have a 2 fields in the users table called is_online and last_access_time.
If current time is 5 minutes or more than last_access_time i set is_online it to zero. And if the signed in user refreshes browser i set i...
When I add the string below to an array in PHP and output it,
$spineArray[$i]="<itemref idref='part-$i' linear='yes'/>";
It looks like this when outputted. Why is the closing tag automatically added and can I stop it? Thanks.
<itemref idref='part-$i' linear='yes'> </itemref>
...
I'm using methods from a PHP class all over my code and I don't want to do "require_once" in every file I'm using that class. Is there a way to include the class in a single file, and then access it from everywhere in the code?
Thanks!
...
I'm working on my first website using php. I came up with a good way, or so I thought, to deal with including the css sheet depending on where I am. For example, I have a form that I submit to with this code:
$root = '../';
function died($error)
{
include '../includes/header.php';
echo "We are very sorry, but there were erro...
I need to compare a very large number in php (30 digits long) with 2 numbers in my database. Whats a good way to do this? I tried using floats but its not precise enough and I don't know of a good way to use large numbers in php.
...
I have a blog where people can post their comments. My problem is that I need to enable people to be able to use math formulas using latex syntax. I cannot make any changes to the server. I can only embed a script in my HTML page.
Kindly help.
...
So I am thinking of doing my PHP in OO way. Can someone tell me the advantage/ disadvantage of this? I think one advantage will be that my codes will be cleaner and easier to maintain. What about performance? How does doing PHP in OO way compare to just writing codes in non-OO way.
My idea of an OO style is, for example, when handling e...
I have two PNG files, "red.png" and "blue.png"; they are both mostly transparent, but there is a few pixels of red or blue splotches in various places.
I want to make a PHP script that merges the two; it should be as simple as something like:
$original = getPNG('red.png');
$overlay = getPNG('blue.png');
imagecopymerge($original, $over...
Hi,
PHP:: How can be taken charset value of webpage with simple html dom parser (utf-8, windows-255, etc..)?
remark: its have to be done with html dom parser http://simplehtmldom.sourceforge.net
Example1 webpage charset input:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
result:utf-8
Example2 webpage ch...
Maybe I'm going about this in the wrong way, but I have some pages in our homegrown CMS that I want to convert to using pretty permalinks. Currently, their page URLs look this this:
http://ourdomain.com/articles/?permalink=blah-blah-blah
I want to convert these to:
http://ourdomain.com/articles/blah-blah-blah
I have a column in the d...
how to generate embd code/blgger like widget with CodeIgniter? please give me the idea how to make
...
I have the following types of titles in a table in my db:
Topic 1 blah blah
Topic 2 blah blah
Topic 3 blah blah
...
Topic 10 blah blah
Topic 11 blah blah
etc...
The select query will always return the results like this:
Topic 1 blah
Topic 10 blah blah
Topic 11 blah
...leaving out Topic 2, Topic 3 etc... until after all the teens...
I know I know, a database would be the better idea with what I want to do, but I don't want the hassle of dealing with a database and learning stuff.
I have a CSV that has something similar to
TestUser,2010/07/27 13:26:25,2010/07/27 13:26:29,0.0011,0.0006,0.06
TestUser,2010/07/27 14:22:12,2010/07/27 14:22:24,0.0033,0.0027,0.27
TestUse...
Hi Stackoverflow,
I was thinking about implementing a logic similar to observer pattern on my website, for implementing hooks.
What I am looking for is something similar to this http://stackoverflow.com/questions/42/best-way-to-allow-plugins-for-a-php-application
However the code there is too limited, as I cant attach multiple hooks t...
Hi Everyone!
I need to call via Ajax a routine on my PHP server from my clients site on his server. If my client has PHP, I have a short PHP script used to call a PHP from one server to another and avoid cross-scripting issues using CURL:
<?php
$q=$_GET["q"];
$q=str_replace(" ","^",$q);
$ch = curl_init();
curl_setopt($ch, CURLOPT_U...
I want to count the number of all *.png requests on my site. Where/what files do I modify? Both 'success' and 'Not found' results should be counted.
...
I was reading some code that a consultant provided us. It's a bit convoluted, and at the end of a function, it reads:
return (int) 1;
Instead of:
return 1;
PHP has a lot of magic in it; is this as bone-headed as it looks, or is there a valid reason to cast an integer as an integer?
...
My drupal site gets very heavy and slow as new modules are loaded. Some of these modules aren't needed except for the store section of the site.
I'm thinking to create a store sub-domain and somehow load those modules only in that sub-domain.
Does that mean that I have to install drupal twice, once on store.mydrupalsite.com and once ...
Hello,
I have been given a new task from the client which is basically creating a CMS for actors/singers and the like that client will be selling out to them.
It will basically be a package and would work out-of-box pretty much similar to WordPress, you just hand over to whoever buys it but of course this is not going to be a blogging ...