php

Live Video Streaming with PHP

I have a PHP/AJAX/MYSQL chat application. I want to add video chatting to my application. How can I create live video streaming to be used for live video conferences/chatting in a PHP application. What are the key-terms I need to know if I wanted to build such a system? Is it a good idea in the first place to use PHP? Is there something ...

How do you debug SugarCRM problems/learn how SugarCRM works?

I'm in the process of trying to move our company from SalesForce to SugarCRM, but I've run in to a nasty bug (the moment I add a custom field to Accounts, all accounts stop showing up). We've paid for support from the SugarCRM people, but they only have take-forever-then-get-a-worthless-response-level tech support for the open-source ve...

Is there a Entity Attribute Value (EAV) framework out there for PHP/MySQL?

Is there a Entity Attribute Value framework out there for PHP/MySQL? I'm starting to write my own, but I feel like its been done already. Any suggestions? ...

Appending to an array variable in a parent class in PHP

How do I extend my parent's options array for child classes in PHP? I have something like this: class ParentClass { public $options = array( 'option1'=>'setting1' ); //The rest of the functions would follow } I would like to append to that options array in a child class without erasing any of the parent opt...

Using PHP variables on multiple pages

Is it possible to use a variable from one page in a piece of code on another? e.g. submit a form on one page and on the second page use a PHP script to add the data from the form to a MySQL table Thanks for all the help ...

How do I get count of duplicated values and join the table to retrieve each value's name?

I have two tables, one that contains volunteers, and one that contains venues. Volunteers are assigned one venue each. The id of the venues table (venues.id) is placed within the volunteers table in the venue_id column (volunteers.venue_id). I know I could get a count of how many matching values are in the volunteers.venue_id column by...

Return total number of files within a folder using PHP.

Is there a better/simpler way to find the number of images in a directory and output them to a variable? function dirCount($dir) { $x = 0; while (($file = readdir($dir)) !== false) { if (isImage($file)) {$x = $x + 1} } return $x; } This seems like such a long way of doing this, is there no simpler way? Note: The isImage()...

PHP + WSDL + SOAP - how do I display a webservice result on screen

I'm just starting out in PHP and would like some advice as to how to get a webservice result to display in an array. For example I would like to print the currency codes into an array from the following WSDL $wsdl="http://www.webservicex.com/CurrencyConvertor.asmx?WSDL This is what I have so far but nothing really happens: $proxy...

Decrypt PHP encrypted string in C#

I have a string encrypted in PHP that I would like to decrypt in C#. I used the tutorial below to do the encryption, but am having problems decrypting. Can anyone post an example on how to do this? http://www.sanity-free.org/131/triple_des_between_php_and_csharp.html ...

How to make search engines find my AJAX content.

I have a page which dynamically loads a section of content via AJAX. I'm concerned that this means the content will not be found by search engines. To show you what I mean, the site is at http://www.gold09.net and the dynamic content is at /speakers.php - Normally no one would visit that second link, it's just loaded into the first page...

Bitwise Flags abandoned ?

I've noticed that plenty of opensource project doesn't use BITWISE flags anymore, even if it's fully supported by programming enviroment common for web ( php/Mysql). It's that a "lost practise" for some effective problem, or is just that a lot of php programmers don't know how to handle this type of implementation? Nothing too important...

Wordpress Admin Plugin

I'm wondering how I can make a plugin to output some data via the admin panel. Just to get me going what code would make a page in the admin panel (for only administrators) to display time()? ...

How to compare two arrays and remove matching elements from one for the next loop?

How else might you compare two arrays ($A and $B )and reduce matching elements out of the first to prep for the next loop over the array $A? $A = array(1,2,3,4,5,6,7,8); $B = array(1,2,3,4); $C = array_intersect($A,$B); //equals (1,2,3,4) $A = array_diff($A,$B); //equals (5,6,7,8) Is this the simplest way or is there a way to ...

Is there a PHP function to remove any/all key/value pairs that have a certain value from an array?

I think questions like this are the reason why I don't like working with PHP. The manual is good, if you can find what you are looking for. After reading through the Array Functions, I didn't see one that provides the functionality I need. I have an array (in my case, numerically indexed) that I want to scan for a particular value and, ...

How do insert data into two different tables?

I have a form which takes both the user details and an image uploaded by them. I want to write the data to a user table and an image table but i am pretty sure that it cannot be done with just two separate insert statements. Any help would be much appreciated. ...

Can I reliably create Excel documents from a PHP application on a Linux server?

What is the state generating Excel documents from a PHP application on a Linux server? I am interesting in creating Office 97 (xls) Excel files. My limited research on the subject has turned up this Pear package. It appears to be in beta status since 2006. Can you share your success or failures in generating Excel files from PHP? Is...

Grabbing Domain Name With Include In PHP

I know how to find out the current domain name in PHP already, the problem is when I put this code into a file and then include it from another server it shows the domain name of where the file is located. Is there any way for it to find out the domain or the site containing the include() code? ...

What do PHP stream contexts do in relation to file operations?

In the PHP manual, the file operations reference an optional context (e.g. for copy). How do these contexts affect basic file operations? ...

What's the best way to manage php sessions in an LAMP cluster?

I've been reading up on this subject for a while. Suddenly the day has come where this solution is a necessity, not just a dream. Through my reading, I've seen the popular differences being (file based, memcached, shared memory (mm), sql table, and custom). The idea we originally thought of was using a ZFS or AFS mounted on each of the...

tableA HABTM tableA - cakePHP DB Design Question

I have the need to create the functionality to allow my registered users to associate themselves with other uses and create a family. My database tables look something like this: db.persons - (Bob, Jane, Timmy, etc) id name email db.persons_persons id person__id_parent person_id_child relationtype_id db.relationtypes - (spouse, ...