I want to generate random numbers, but these numbers should be somewhat biased,
so that numbers in certain ranges appear more frequently than others.
For example, to spread out a series of banner ad impressions in proportion to the number of impressions remaining for each ad campaign.
...
I want to do searching for data using users' entry in a field. That is if user enters "D+t+y+g,k,j,h" want to search for values having letters "d and t and y and g or k or j or h". I tried the PHP str_replace function, but didn't like the result.
//kw is text field...
if($kw != "") {
//here we check for some data in field; if yes, c...
So that 335000 become 335,000?
...
I have a Drupal website where users are clicking on a link that initiates a file download from a content delivery network (CDN). A script is tracking the number of users who click the link to begin the download process. I'm looking for suggestions on how I might track the number of users who successfully complete the download process.
...
Is there a helper method/object/methodology for getting a reference to a Zend_Application's config resource?
I know I can do something like
$config = new Zend_Config_Ini($file, $environment);
but that's going to reload/parse the config file. I'm looking for a way to peek at the given configuration value for a running Zend_Applicati...
Hi,
I need to save this onto database(mysql) and show it back. (my database is utf_general_ci)
I αм iиvisibłє łiкє αiя---
I αм αs iмρøяŧαиŧ αs øxygєи---
I αм łiviиg iи ŧЋє wøяłd øƒ мy dяєαмz
I αм αłwαys ŧЋєяє ŧø Ћєłρ øŧЋєяz---
I αм busy buŧ иєvєя igиøяє αиy øиє
I αм ŧЋє øиє wЋø cαяєz---
I łøvє ŧø sєє øŧЋєя łαugЋiиg
I αм ŧЋє øиє wЋø bøя...
Hello Experts,
This is a two part question.
Q1: Can cURL based request 100% imitate a browser based request?
Q2: If yes, what all options should be set. If not what extra does the browser do that cannot bee imitated by cURL?
I have a website and I see thousands of request being made from a single IP in a very short time. These reque...
Im using PHP code to create a dropshadow effect on images.
I have this for-loop which basically gets an images size (width, height) and then adds a 1px drop shadow effect by using a for loop and its size.
for example:
for ($i=1; $i<=$height; $i++){
$display_table.="<img src='dropShadowLeft.jpg'><br>";
}
It works flawless on my c...
I am currently creating a dropshadow effect using PHP to send html to the clients computer, in other words, i display a 1px shadow image along the height and width of the image.
I want to do this with CSS! but how?
The shadow images for the left side are 4x1 px, and bottom are 1x4 px. Then I have 3 images for the three corners, top-lef...
Hello All,
What is the fastest and easiest way to get the last item of an array whether be indexed array , associative array or multi-dimensional array?
...
Hello, I have a php file that contains a HTML form, then PHP logic, then an HTML footer...in that order.
I am trying to get the values from the form into some php validation logic in the botton of the page (but before the footer) using <?php VALIDATION LOGIC HERE ?>.
the problem is when the validation finds an error, the php logic will...
I am developing a website and sometimes the browsers keeps loading, and I would like to know exactly what's making it load for so long. It gets stuck kindof.
So I wonder if there is any application or way to check what is getting loaded onto the page, so I can see what element or object it gets stuck on?
The website uses php/javascript...
Currently I'm developing high-loaded financial portal(we use LAMP to run our project). There are great number of incoming data to be processed and stored. So optimization tasks become very important for us.
Could you suggest books, articles or resources, that discover optimization questions (especially bboks).
NOTE: At the moment I'm ...
I have the following if statement
if (isset($part->disposition) and ($part->disposition=='attachment'))
Problem is the second part of that statement, i also need to include this;
($part->disposition=='inline')
The statement needs to work if the disposition is attachment or if its inline.
...
Hi,
We have a magento commerce site running on an IIS 6.0 server with PHP 5.2.11 running magento.
Whenever user tries to use the print to download pdf to their computer from the admin panel the download does not complete. I can see that the full file is downloaded to the computer but the browser still keeps on saying it is downloading....
I have a weird problem. i fetch some rows from database using:
while($tag = mysqli_fetch_assoc($tags))
{
$return['threads'][] = "<a id='showtag' href='answer.php?view=tag&id=" . $tag['id'] . "&name=" . $tag['name'] . "'>" . $tag['name'] . "</a><a class='addtag' id='" . $tag['id'] . "' href=''> +</a><br />";
}
this should provide 2...
Hi,
I am using joomla 1.0.15 version. I have to integrate my php application with joomla admin backend. Is it possible to pass the username and password of php application to joomla admin end, . Its username and password is admin and admin. I need to use the same username and password for administrator/index.php .Please help me.
...
Is to possible to submit two forms simultaneously with either javascript or a submit button?
Form structure is ok something like this:
<form name="form1" method="post">
.........
</form>
<form name="form2" method="post">
.........
</form>
And get the data from the two in a array?
...
This should be obvious, but I'm getting a bit confused about PHP variable scope.
I have a variable inside a Constructor, which I want to use later in a function in the same class. My current method is this:
<?php
class Log(){
function Log(){
$_ENV['access'] = true;
}
function test(){
$access = $ENV['access'];
...
I want to build a feature that enables the user to moderate questions and is similar to wordpress comment or typical email moderation that uses a checkbox to approve/delete many questions at once.
How would I modify the following code to check which the questions are checked and react to the delete buttons when pressed? You may notice f...