I've had this noted down on some of my code for a while:
/**
* Add a BCC.
*
* Note that according to the conventions of the SMTP protocol all
* addresses, including BCC addresses, are included in every email as it
* is sent over the Internet. The BCC addresses are stripped off blind
* copy email only at the destination email serve...
I use ODBC to connect to SQL Server from PHP.
In PHP I read some string (nvarchar column) data from SQL Server and then want to insert it to mysql database. When I try to insert such value to mysql database table I get this mysql error:
Incorrect string value: '\xB3\xB9ow...' for column 'name' at row 1
For string with all ASCII chara...
I currently use md5_file(); to run through about 15 URLs and verify their MD5. Is there a way I can make this faster? It takes far too long to run through all of them. Sorry if this isn't a good question, I just realized its only three (four if you count this one) sentences long.
...
Hi There
i want to get the latest threads/messages
i made my code
then
i made function
that calls the code to show last messages in specific board
it works great
now
i want to get latest messages from 2 boards or more in the same function
this is the part that chooses the board
AND b.id_board = t.id_board' . (empty($vars) ? '' : '...
Hi
I am considering using TinyMCE to handle the textboxes on sites I develop. I have the production version downloaded.
At first I will be using it for the backend of a client's site on a deadline and I need it to work out of the box initally. In the future I also like the customisation options.
Basically, does TinyMCE work, is it sta...
Ive gotten some great help here and I am so close to solving my problem that I can taste it. But I seem to be stuck.
I need to scrape a simple form from a local webserver and only return the lines that match a users local email (i.e. onemyndseye@localhost). simplehtmldom makes easy work of extracting the correct form element:
forea...
Is there a way to find out if Cron Jobs are available on the server?
I mean I want to detect this in a PHP script..
...
I need to enable pdo_mysql in my EasyPhp environment, so I went to php.ini file and uncommented the following line:
extension=php_pdo_mysql.dll
Unfortunately I still have the same problem.
I'm using the CLI so I suppose I need to locate the php.ini file used by the CLI. How can I find it?
...
I have a PHP script on Linux in which the sticky bit is set, so it gets executed as the file owner. How can I get the user id of the calling process, for authorization purposes?
Context: I have two applications on a server, and want one to request some info from the other. For this reason the other offers a script with setuid, but I wan...
The following is a part of an upload class in a c# script. I'm a php programmer, I've never messed with c# much but I'm trying to learn. This upload script will not handle anything except images, I need to adapt this class to handle other types of media also, or rewrite it all together. If I'm correct, I realize that
using (Image image...
Hi, I'm creating a project in which a server receives operations from clients to apply to a local server document. The server and client both share the same document and therefore each message the client sends contains an MD5 hash, which the server compares to after generating its own hash to ensure the server and client documents are sy...
i'm using this function to highlight the results from mysql query:
function highlightWords($string, $word)
{
$string = str_replace($word, "<span class='highlight'>".$word."</span>", $string);
/*** return the highlighted string ***/
return $string;
}
....
$cQuote = highlightWords(htmlspecialchars($row['cQuotes'...
I've created a form that submits data to a MySQL database but the Date, Time, Year and Month fields constantly revert to the exact same date (1st January 1970) despite the fact that when I submit the information to the database the form displays the current date, time etc to me. I've already set it so that the time and date fields automa...
My users can send links from popular file hosts like Rapidshare, Megaupload, Hotfile and FileFactory. I need to somehow find out what filehost they sent the link from and use the correct class for it appropriately.
For example, if I sent a Rapidshare link in a form on my web page, I need to somehow cycle through each file host that I al...
Running on Ubuntu LTS 8.04, PHP 5.2.8, ImageMagick 6.6.1-5 installed from source, and Imagick 2.3.0 installed from pecl.
ImageMagick's 'convert' command sets fonts properly, and ImagickDraw::setFont properly complains if an invalid path to a font has been specified. However, specifying a valid font has no effect in changing the appeara...
Hello,
I searched through Google and there was little to no information about how to integrate Smarty 2.x into Zend Framework 1.10. Can anyone teach me how to do so?
...
UPDATE statistics'
SET money = money + '$money'
WHERE member_id IN ((SELECT member_id FROM races WHERE l_id = '$mem_id'), $other_id)
What's wrong with that? I want to retrieve all member_ids from races and also include to member_id $other_id. Without $other_id it works.
By the way, it gives me "Subquery returns more than 1 row" error....
I'm testing the code by changing an option in Firefox's options: "Options -> Choose your preferred language for displaying pages"
This is the code:
lang.php:
<?php
function dlang($Var) {
if(empty($GLOBALS[$Var])) {
$GLOBALS[$Var]=(!empty($GLOBALS['_SERVER'][$Var]))?
$GLOBALS['_SERVER'][$Var]:
(!emp...
Hello,
I want to know how to echo a string that have a $ sign from a database. At this time, the value on database 'Buy one for $5.00' converts to 'Buy one for .00'.
Let's say the name of the field is title and the value is Buy one for $5.00
<?php
$body_tpl = file_get_contents('tpl.html'); //Title is: %title% blah blah %title%
$row ...
Say a php file has include_once("$CONF/blah.inc") in it. Where is this $CONF and the default location?
...