php

What is the simplest way to check if PHPSUEXEC or SUPHP is enabled, with a php script.

I need to check if PHPSUEXEC or SUPHP is enabled. How can I do that within a php script? ...

PHP Write to file on different server

I need to write to a file that is located on a different server using php. So, I get user data from a form on one server, and then need to write to a text file that is located on another server. Do I need to authenticate or something similar? The second server that I need to write to is a windows server. Is this an issue? Thanks! ...

How do I make a request using HTTP basic authentication with PHP curl?

I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service. How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself? If so I've got some other questions - Is there a REST library for php? or is there a wrapper for curl that makes it a bit ...

Is there a way for codeIgniter to output html rather than xhtml?

I'm just mucking around with codeIgniter, doing the video tutes etc. was wondering if you can specify markup output to follow strict html, I've noticed that helper form inputs etc. have a closing slash, that is contradictory to HTML 4 Strict. Is it a case of just using xhtml for this framework because that's what it's mostly geared towa...

Wordpress: if (url is mysite.com/sitemap) do this...

Previously, I've been creating my sitemap page with site.com?action=sitemap That allowed me to easily test on my index page for a sitemap request with... $_REQUEST['action'] However, I'd like to instead create the link to the sitemap with site.com/sitemap And I'd like to know how I can parse the request for the appearance of "/sitem...

How to merge subarray in PHP most easily?

$arr[] = array('A','B'); $arr[] = array('C','B'); ... I need to get the merged result of all sub array of $arr . And for duplicated entries,should fetch only one. ...

mysql_fetch_* function does not return any NULL columns in the array

When I call mysql_fetch_row() or mysql_fetch_array(), any column that is NULL is not in the returned array. Is this a feature? Context: I am using CakePHP to get data using Model::find(). EDIT The issue is that when I use the SQL statement: SELECT col_1, col_2 FROM table where col_1 is defined as VARCHAR NOT NULL and col_2 as VARC...

Reading filenames in a folder and storing them in XML using PHP?

Hi, I would like to know how one can write PHP code to read filenames from a particular folder and save the extracted filenames in an XML document? An example of any part of this would be HIGHLY appreciated. Thanks ...

How to simulate more than 1 request(i.e. 4000 or more) on a single page to test performance?

Suppose I have a page called mysql_query_performance.php which contains code to select some records from table and echo it. But I want to know how can I simulate more than 1 request to test the performance of that query? Is this Possible? If yes, How? ...

URL Rewriting on a ISAPI shared server (using PHP)

I need to rewrite URLs. The problem is that I am developing in PHP on an ISAPI server. An additional problem is that I am not the owner/manager of the server. Is there any way to rewrite URLs for PHP on a shared ISAPI server? ...

Change MP3 frequency on the fly somehow?

Does anybody know a purely PHP based way to alter the frequency of an MP3 file? I am on shared hosting with this, so installing ffmpeg or something similar is out of the question. If this requires actually altering the audio data, then I guess it is not possible nor feasible to do with PHP, but I was thinking maybe this is just a heade...

Problem with inserting data in Oracle database using PHP

The following error: "Warning: oci_execute() [function.oci-execute]: ORA-00911: invalid character in F:\wamp\www\SEarch Engine\test1.php on line 69" is being generated by this code: <?php include_once('config.php'); $db = oci_new_connect(ORAUSER,ORAPASS,"localhost/XE"); $url_name = $_POST['textfield']; $keyword_name =...

how to use phpdoc webinterface?

i have phpdoc through mamp. and i followed their tutorial, typed this in the Terminal. pear config-set data_dir /path/to/document_root/pear of course i changed the /path/to/document_root to my web space folder. but then what? how can i access phpdoc through webinterface? ...

Is zend framework stable?

I need a framework for php. I've got few suggestion to use Zend Framework. What worries me is the Zend Framework api stability. Do you know how stable ZF is? Is there any change list/migration plan from previous version. So that I can check how many breaking changes were introduced? I need something so stable as django: The relea...

Save Images from email using PHP

Hi, How do I save images sent as attachment in email, using PHP. Something like Posterous but only for image attachments. Thanks in advance :-) ...

PHP/PDO - Flush privileges

Hi, I'm doing some mysql server management with a script that flushes the MySQL users privileges when new privileges are added to a MySQL user. I'm using the PDO class to do my queries, but when I do a simple FLUSH PRIVILEGES; I get, for $connection->exec('FLUSH PRIVILEGES;'); and $connection->query('FLUSH PRIVILEGES;'); S...

Xampp. Php script displays a blank page!

The php script is calling four functions that scrape different websites for data. $returnData[0]=getWebsite1Data($description); $returnData[1]=getWebsite2Data($description); $returnData[2]=getWebsite3Data($description); $returnData[3]=getWebsite4Data($description); The script displays the web-page correctly if I disable the call to an...

How I can Get value of nth row from mysql ??

I tried below code $sql=mysql_query("SELECT * FROM `user`"); $result=mysql_result($sql, 6); echo $result; It returns the value of first field of 7th row. But Its works fine till 9th row. And after that it returns again from 1 . So anyone please help .. how I can get value of n-th row from mysql. Thanking You. [email protected]...

How to redirect myurl.com/targeturl.com to to myurl.com/?site=targeturl (PHP/Apache/Linux)?

Hi, I'm writing a website that allows people to asses a web page's readability (Flesch-Kincaid Reading Ease, thank kind of thing). Ideally I'd like the user to be able merely to preceed the target URL with mine (like many mirror sites do), and hey presto they can see the results. I'm guessing it's got to be done with mod_rewrite, but...

Incremental Output - Jquery and PHP

I have an application that rates a large set of items and outputs a score for each one. In my php script I'm using ob_start and ob_flush to handle the output of data for each rating. This works great if I directly load the script. But when I try to use .get via jquery, the entire content loads and then is placed into a container, instea...