I want to write a PHP script that can programatically grab a .wav file from a URL, auto-tune it, and then either save it as a new file or output it using an "audio/x-wav" header, but I don't even know where to start. Are there audio manipulation libraries in PHP that can accomplish that?
...
I'm trying to see if a CCK checkbox field is checked.
Is it something like:
if ($node->field_checkbox[0]['value'] = 'checked')
?
Thanks.
...
Hello!
How can I use str_ireplace (or something similar) to replace some text for formatting and then return it with the same caps?
Example:
$original="The quick red fox jumps over the lazy brown dog.";
$find="thE";
print str_ireplace($find,'<b>'.$find.'</b>',$original);
That will output:
thE quick red fox jumps over the lazy brown...
Hi!
I have some trouble viewing statistics (viewers, current song playing etc) with PHP and I can't find any information how to do this.
There is a couple of XLS files included with Icecast2 and I could include this files with PHP to my site but I wan't to update the DIV that the include is in every 5 seconds and that won't work with X...
I know it's such a basic thing, but a google search hasn't shown me how to resort the rows after clicking the 'th' links.
I've got this:
<table border="1">
<tr>
<th>Type:</th>
<th>Description:</th>
<th>Recorded Date:</th>
<th>Added Date:</th>
</tr>
<?php
while($row = mysql_fetch_array($result)){
?>
<tr>
...
started new thread to avoid confusion
...
I have two timestamp input one is the current time and another one is future
i.e.
Future time: 2010-8-17 23:00
Present time: 2010-8-15 11:00
I want to setup notification system which will display the time intervals between the above dates. i.e.
15 minutes before
30 minutes before
1 hour before
2 hour before
3 hour before
....
....
....
Hello world.
I am trying to create the silhouette of PNG image with transparencies.
Here is my code
//file that i am working with
$file='http://www.google.com/mapfiles/turkey.png';
$im =imagecreatefrompng($file);
imagealphablending($im, false);
imagesavealpha($im, true);
$imw =imagesx($im);
$imh =imagesy($im);
//turkey body ...
Can anyone help me here, when i run this code the page repeats its self. I also need it to refresh which it isnt doing.
Like this:
EDITED Code Below:
<?php include 'config.php' ?>
<script language="javascript">
function createRequestObject() {
var req;
if(window.XMLHttpRequest){
// Firefox, Safari, Opera...
req = ...
I have a simple site to develop and would like to learn PHP as I go. I want the site to be secure, scalable, and easy to maintain. Should I learn a framework and PHP simultaneously? If I build off of a framework there will be lots of unfamiliar code in play. Would you say this increases security risks?
...
i am using DoctrineExtensions\NestedSet
i am trying to render children nodes. i used
$node->getChildren();
array
0 =>
object(DoctrineExtensions\NestedSet\NodeWrapper)[218]
private 'node' =>
object(Application\Models\Post)[240]
protected 'id' => int 3
protected 'title' => string 'trying to use...
I've been doing some scraping with PHP and getting some strange results on a particular domain. For example, when I download this page:
http://pitchfork.com/reviews/tracks/
It works fine. However if I try to download this page:
http://pitchfork.com/reviews/tracks/1/
It returns an incomplete page, even though the content is exactly th...
Hi guys
im looking at the MVC pattern, and I can see in one example on phppatterns they're passing the model by reference - any benefit of doing this over a global var? Am I missing something obvious?
class MyView extends View {
var $model;
function __construct(&$model){
$this->model =& $model;
}
function productTable($...
I have a result set from a DB that returns the following array.... how do I implode this into a comma delimited string? Thanks!
Array
(
[0] => Array
(
[user_id] => 2
)
[1] => Array
(
[user_id] => 5
)
[2] => Array
(
[user_id] => 11
)
)
...
The query in the PHP code below works fine when I run it via Microsoft SQL Server Management Studio, but gives
Warning: odbc_fetch_into()
[function.odbc-fetch-into]: No tuples
available at this result index
at the odbc_fetch_into call (and does not have any rows).
$sql = "DECLARE @ValueList TABLE (CheckValue int)
INSERT INTO ...
Hi All,
Just a quick question here:
If I choose the object oriented style to interact with my database, ie...
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
And I then use $mysqli->close(); to close the connection at some point...
Can I reopen that connection by simply initiating another query $mysqli->quer...
I grab a webpage that is in Hebrew with the help of curl but do get fancy characters (ie. ЧђЧ§Ч©Чџ) instead of Hebrew. What should I do to receive it all in Hebrew?
...
I'm using PHPMailer to send emails with SMTP from my script. The emails in question are actually cell numbers utilizing email-to-SMS gateways. Now, ideally I want to build up a big BCC list to send everything in one batch instead of looping through a big list of addresses and sending them one at a time.
Should I completely trust BCC fun...
I know how to pass one argument to a menu callback
$items['someaddress/%'] = array(
'title' => 'title',
'page callback' => 'some_function',
'page arguments' => 1,
'type' => MENU_CALLBACK
);
I don't understand why the argument being passed is $_POST['nid'] but this works. It corresponds to page argument 1.
function...
I was just kindly helped to get the rows in a table to display using ORDER BY. Then I realized I also want to click the same link to decrement if desired. I tried to set up a conditional, but it's not working as I expected:
<?php
$orderBy = array('type', 'description', 'recorded_date', 'added_date');
$order = 'type';
if (isset($_GET...