I have an implementation of the Zend Search (Lucene) framework on my website that contains an index of products with prices.
I am trying to allow customers to search for something, while contsraining the prices. Eg. Search for "dog food" between $5-$10 dollars.
My search index looks like this:
Keyword('name')
Keyword('price')
Lets sa...
Hay guys i need help on a regex.
I'm using file_get_contents() to get the source of a page, i want to then loop through the source and find all the and extract all the HREF values into an array.
Thanks
...
I have cron job - php script which is called one time in 5 minutes. I need to be sure that previously called php script has finished execution - do not want to mix data that's being processed.
There are three approaches I used to apply:
Creation of auxiliary text file which contains running-state flag. Executed script analyzes the co...
Here is an example of my problem: http://idea-palette.com/pdf/
I'm using FPDF to write some text on a PDF. I'm displaying 8 different cells of text. The Cells are being displayed, but after two cells, it puts the next cell onto a new page as If I had asked for a new PDF page to be made, but I did not. I'm guessing it is somehow pushing ...
Hey
Does know how to or can provide a demo or script which will allow multiple files to be uploader to a web server WITHOUT using flash or anything which needs to be installed on the client machine.
Ideally providing a status with how the uploads are doing ie 27% etc.
It would be great if I could select multiple files then hit upload...
how can i redirect to another action passing 2 or more parameters? this code:
$this->redirect('input/new?year=' . $year . '&month=' . $month);
results in URL:
http://.../input?year=2009&month=9
...
I've created PHP application for Facebook. It uses MySQL, Memcached and works on Lighttpd on Centos 2,6 Ghz and 2 GB RAM.
it's basically one PHP file that after first run is cached and every next time it's served in 0,8 ms directly from Memcached.
What more can I do to shorten this time?
...
The following view code produces html code as follows.
Q1. what is the first line doing?
<?php $ci_uri = trim($this->uri->uri_string(), '/'); $att = ' id="active"';?>
Q2. Why
producing id="active"?
Q3. What are the purpose of
<?= substr($ci_uri, 0, 7) == 'example'? $att: ''?>
<?= $ci_uri == $this->config->item('FAL_login_ur...
Hay all, i need a little hlep.
I'm trying to connect to my localhost MySQL server via php in the terminal.
It's outputting that it cannot connect to the host through my socket. My PHP ini install says this
MYSQL_SOCKET /tmp/mysql.sock
so i used
mysql_connect("/tmp/mysql.sock","root","","");
And i get errors
Any suggestions?
...
I have a PHP file that gets HTML from Memcached and serves it to user. When I test it like this:
ab -n 1000 -c 100 http://website.com/test.php
It does 22 requests per second.
But when I put the same HTML to a html file and do this test:
ab -n 1000 -c 100 http://website.com/test.html
I get like 4500 requests per second.
I n...
I would like to map this:
`http://www.example.com/index.php?param1=value1&param2=value2&param3=value3` (etc. ad infinitum)
to
`http://www.example.com/index.php?param1=newvalue1&param2=value2&param3=value3` (etc.)
ie. just change the value of a single parameter in the querystring. I know what the old value is, so I a...
What do
$categories[$id] = array('name' => $name, 'children' => array());
and
$categories[$parentId]['children'][] = array('id' => $id, 'name' => $name);
mean?
Thanks a lot.
...
I'm trying to compare the content of 2 arrays, basically I'm using a shopping cart and I need to check the prices of submitted forms against a database, the problem is when I have one incorrect price in the shopping cart it gives me an error message but when I have 1 correct price and 1 incorrect it continues with the checkout, I don't k...
Hello All,
I need to upload a file of ethereal capture into the MySQL database.
The problem is , it is not done manually through a html form .
Hence I can't use enctype="multipart/form-data" and $_FILES to upload a file.
Is there a way to upload a file just using PHP in to the MySQL database.
Regards,
Mithun
...
Hello everybody,
I am using the latest Janrain openid library example and the discovery process seems to work well with Yahoo, myopenid.com and others...
But I am stuck with Google endpoint (https semicolon //www.google.com/accounts/o8/id). Consumer.php just returns a 406 apache error, before I am redirected to google's page.
All my i...
Here is my JSON data :
{"Liste_des_produits1":[{"Added_Time":"28-Sep-2009 16:35:03","prod_ingredient":"sgsdgds","prod_danger":["sans danger pour xyz"],"prod_odeur":["Orange"],"prod_nom":"ceciestunproduit","prod_certification":["HE • Haute Efficité","Certifier Ecologo","Contenant recyclable"],"prod_photo":"","prod_categorie":["...
Hi, I got this error when I'm uploading the image into the folder:
Warning: fopen(images1/image.jpg) [function.fopen]: failed to open stream: Permission denied.
i gave read/write permissions. but its not working.How to rectify this error? Anyone can help me please?
Regards,
padma.
...
Hai
I want to read content from a Txt file and down load it into a pdf file using PHP object orientation, How I Read content from a file, IS it same as simple PHP...
Please Help me in urgently
Thanks in advance..............
...
I cannot get this to work. I want to use str_to_date to convert a date string. Here is my insert statement.
INSERT INTO cars(carno, color, date) VALUES ('1', 'brown', STR_TO_DATE('$date', 'm%/%d/%Y'))
Can someone please tell me where I am going wrong? The date in my variable is 12/12/2002
Anyone???
...
"Feedback works now - open incoming port 2196
Sep 26, 2009 6:57 AM
Be sure that your server has port 2196 open for INCOMING data, not just outgoing. This was after I had my server support guy open 2196 for incoming data.
This works - I un-installed the app, sent a push to it, and then checked feedback:"
It's feedback on appleforum.
S...