php

binary to string converter in php?

binary to string converter in php ...

locking a lucene folder

I am writing a wrapper around Zend's lucene implementation and wanted to add a function rebuildIndex() which reads all relevant fields from the database and re-creates the index file in a temporary folder. When the operation is finished, I want to replace the original folder with the new one. How can I lock the original lucene folder whi...

get page source after filling the value in text box

Hi Friends i develop a webpage in that i have a registration form that allow users to enter their personal information . After filling the form , user can click the button , i need to create a PDF as same as in the Registration form [including colour , picture,Entered value etc..] Please help me to solve this issue . Thanks in advance . ...

Pre-installed Linux for Web Developers?

Does anybody know an ISO image of a up-to-date Linux distribution aimed at web developers with one, some or all of the following features: LAMP stack readily set up (Readily installed Apache 2, virtual sites directory structure (hosting), PHP installed, mySQL installed) Ruby/RoR set up for a beginner to start with Subversion set up for...

How should I include a remote page fragment in php in a performant way?

Hi there, I'm working on a site in Drupal which will reside at http://sub.clientdomain.com, pulling in an static html fragment from a server on at http://clientdomain.com/path/to/fragment.html, which I need to display in a page, to give a parent menu for a site. I'm working on a VPS, so I have access to curl, wget and pretty much anyth...

mod_rewrite empty REQUEST_FILENAME

I have this in my .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule !\.(gif|jpg|png|css|js|ico|flv|php|txt)$ index.php Now i need to add another rule that will forward to index.html if no REQUEST_FILENAME is found. So www.mysite.com would forward to index.html and www.mysite.com/file.html would forwar...

How to code an external login for Woltlab Burning Board 3?

Hey, I am looking for a way to make my own login formular in PHP to log in with my extisting Wbb3 account. The login will be on the same server, so i've got access to the database and the salts, but I'm missing the way how to encrypt the password. Any tutorials? ...

Perform this query when something doesn't exist in another table.

Hello, This is a really tricky question to ask as its very hard to explain what I'm after. Here goes though! SELECT Stock.*, REPLACE (Description, '&', '&') as Description, PRD1.RuleValue AS Price, PRD2.RuleValue AS WasPrice, PRD2.RuleValue-PRD1.RuleValue AS Save FROM Stock INNER JOIN StockCategoryMem...

Upgrading PHP in XAMPP for Windows?

Hi, I would like to know how you upgrade PHP in Xampp for Windows? I tried to download the latest PHP version from the main PHP site but when I check (phpinfo) I still get that the previous version is still in use. Please advise. Thanks ...

How do I keep track of the subcategory I am in using PHP?

I have seen it many times, but I'm not sure how it is done. I am referring to sites like online catalogues where they have a legend(or a map) to your subcategory. it looks like: Electronics > Laptops > 15" > Under $500 Can someone tell me what it is called so I can Google it? ...

Using PHP to generate screenshots from an HTML source

I've got an idea for a site that would generate png or jpeg screenshots of webpages on the fly. The end user would never see the pages, but the HTML would be turned into a screenshot instead and the end user would see that screenshot. How can I get started on this? I guess what I'm looking for is some kind of PHP function that takes the...

Why is Magento trying to call in the Mage namespace rather than my custom namespace?

I’ve created a module within the local code folder in our custom namespace. The block isn’t displaying on the frontend, and on checking the exception log, it turns out Magento is looking in the wrong place. exception ‘Mage_Core_Exception’ with message ‘Invalid block type: Mage_MyCompany_ForthcomingProducts_Block_List’ in /var/www/html/...

A 'who has used it' problem

Okay... So, I came across the following problem: I have one table that works properly - it holds users' IDs, posts' IDs, posts' content, time that post was made. I use it to have the following printed out: the content of the post, who is the author of the post and when the post was made. So far everything works just fine. Now... I have...

token_get_all whitespaces behaviour

I don't know if someone can help me, but i'll ask anyway. I'm creating a function like the php token_get_all written in javascript. This function should "tokenize" a given php code, but i have some problems with whitespaces. Executing the token_get_all function in php i see that only some whitespaces are considered tokens, the other one...

PHP: Loop thru all months in date range?

if I have a start date, say 2009-02-01 and an end date say 2010-01-01. How can I create a loop to go through all the dates (months) in the range? Thanks!! ...

How to redirect to the current page with form in php?

Hello, I tried to redirect to the current page with form in my php application. Now i have met a problem. <form name="myform" action="?page=matching" method="GET"> <input id="match_button" type="submit" name="button" value="button" onClick="func_load3()" /> </form> action="?page=matching" means the current page, because i use the s...

Sorting multi-dimentional array by more than one field.

Hi. I have the following data: Array ( [0] => Array ( [filename] => def [filesize] => 4096 [filemtime] => 1264683091 [is_dir] => 1 [is_file] => ) [1] => Array ( [filename] => abc [filesize] => 4096 [filemtime] => 1264683091 [is_dir] => 1 ...

dynamically add a name anchor tag within dynamic content page

I have a page that lists over 100 items and I need to dynamically add a name="" tags to the beginning of each new section of items that starts with the next alphabet. For example: <a name="a"></a> <h1>Amazon River</h1> <h1>Arrow Heads</h1> <a name="b"></a> <h1>Bear Claws</h1> <h1>Bee Traps</h1> <h1>Dodge Ball</h1> <a name="f"></a>...

CodeIgniter: Use get_post with XSS filtering on entire $_POST array

Is there an easier way than foreach($_POST as $x=>$y){ $arr[$x] = $this->input->get_post($y, TRUE); } to just have the entire $_POST array cleaned with CI's XSS filter. Looking at the input library it seems though get_post() only accepts an individual variable rather than being able to clean the entire array and then return the arra...

delete grid row

Hi, i have a simple grid with data from mysql db. When delete a record actually refresh the page. When i am at last page and start delete records after delete all records when refresh i get no data because i dont have any records on that page. So some how i must find a way when i am on last page and all record deleted refresh to prev...