php

XAMPP for Mac cannot see PHP files

Hi, I am unable to see php files after I downloaded XAMPP. I am trying to write a php file, so I download and started XAMPP, but I cannot see PHP files show up. When I open anything as simple as: <?php echo "Hello World"; ?> Just shows up a blank firefox window. Can anyone please help, this is urgent! Thanks ...

Good numeric hashes

Hi, I'm looking to hash a string but I need the output to be an integer so I can't do md5. Do people here have any favorite numeric hashes that they might want to enlighten me with. I'm using PHP. Thanks! ...

Understanding parameters in Postgres Like command in PHP

How can you use parameters in Postgres Like command? I am reading this document. I am trying to search a word lorem in the table questions and in its column body. I run unsuccessfully the following code inside PHP $result = pg_query_params ( $dbconn, "SELECT question_id, body FROM questions WHERE body ilike '%$1%'", a...

PHP theres some Impact using long text in a associative array?

Im doing a database class in PHP and I want to make cache of the result of the querys in a associative array, My idea is to use the sql statment as the index of the cache array, its could be a good idea? or should I use a md5 from the sql? class DB{ const HOST = 'localhost'; //Your Database Host! const USER = 'user'; //Your Database Use...

How to deal with mutliple sites that access one 'brain' ?

Generally, my development has only covered small to medium size companies and e commerce sites. My next project will encompass say 30 sites - however, they'll have about 95% in common with each other. I want them to have 1 'brain' that means I can roll out changes, updates to the framework etc only once. I wonder if the Stack Overflow ...

PHP: Fatal error after a form POST

The following code throws an error in PHP 5.2.9 after submission, but not on the original load. Error: Fatal error: Only variables can be passed by reference in /home/golfcom/public_html/test.php on line 12 File: <?php include('connection.php'); $result = $dbc->query("SELECT subdivision FROM Residential"); $search['subdivision'] = arra...

Is there a PHP plugin for allowing login via major OpenIds and login APIs?

Is there a PHP plugin or an open project offering a simple login/connection system to most of the major sign in providers simply by providing an API key then storing the linked account information in MySQL? Or is there a system that can be extended to include various other login providers as they become available? Google Account / gmai...

Detecting if an Array is Indexed or Associative

Possible Duplicate: PHP Arrays: A good way to check if an array is associative or sequential? What would be the most performant way of checking if an array is associative or not in PHP? ...

Synchronize Data in Oracle with PHP

Hi Folks, the following "problem" : 2 Oracle Databases , Servers identified by their Names. If one attribute of the Server from Table X is different to Server in Table Y -> Update Table X. What is the best solution ? Fetch all Servers from both Databases and compare change them in an array ? Get first Server from Table X , get Serve...

Zend Framework how to set headers

Hi guys, I have a question, how can I do something like this: header("Content-Disposition: inline; filename=result.pdf"); header("Content-type: application/x-pdf"); With Zend Framework, I have tried: $this->getResponse() ->setHeader('Content-Disposition:inline', ' filename=result.pdf') ->setHeader('Content-type', 'applic...

How to Display module only front page in joomla 1.5.9?

I want to Display module only front page in joomla 1.5.9? in inner page it willl be invisible? ...

SQL SELECT DISTINCT ID from copies ORDER BY CID

Hi everyone, i want something like this: SELECT DISTINCT ID from copies WHERE timestamp < 1229444506 ORDER BY CID the problem is that this one only return ID and i need CID and other columns in the table. It may be that this is totally wrong for other reason aswell, so i will explain what i need. I have a table that "record" every r...

Trying to outpt vcard for download using zend framework - something wrong

Hi guys, I've added a download vcard option in my social networking system - however when I try to get it to download the vcard for some reason the vcard is downloaded as a raw file i.e. I need to rename it to be a vcf file in order to open as a vcard. I'm using the following code to send headers but for some reason its not working as it...

How to make fread blocking and read until the end ?

Hello, I am executing a TCL script from PHP using proc_open. I first open the TCL shell 2) Send a command using fwrite 3) What I need is fread to wait/block until the command sent by fwrite is complete and get all the contents .The command may take some time to complete. (I am able to read just 2 lines and then it is going off to th...

PHP remember file field contents

I have a form with text inputs and file inputs; the text fields are being validated. Is there a way to have the form remember which files the user has already selected if they hit submit but need to go back because one of the text fields didn't validate? ...

How to make signature generator save in folder?

The upload script in this page is currently uploading the images to the same folder as the script. How do i make the script save all the images in another folder? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <meta http-equiv="Content-Type" content="text/html; cha...

simplexml_import_dom - does not work

Hello, if (file_exists('http://something_from_a_url.xml')) { $xml = simplexml_import_dom('http://something_from_a_url.xml'); print_r($xml); } else { exit('Failed to open xml file.'); } when I execute this code it says failed to open, I fail to understand why.. ...

PHP Obfuscator for use with Code igniter code

Hi, I am looking for an obfucator for my PHP code, the code which I am trying to obfucate uses the codeigniter framework. The obfuscators that I have tried, don't seem to be able to do it. Any suggestions greatly appreciated! ...

how to create rss reader with php?

i am creating rss reader application with php.it is basicly getting rss url's from user and with php i am creating an rss reader.But i have some problems how to get rss content with php i try to use pear extension but i had some problem with that.it would be good that seeing some sample code or example application source code which not s...

Blacklist of words on content to filter message.

Hi, For a website that takes input from kids we need to filter any naughty / bad words that they use when they enter their comments in the website (running PHP). The comments are a free field and users can enter whatever comments they want. The solution I can think of is to have a words list like BLACKLIST: bad,bad,word,woord,craap,cr...