php

Game Server Language Selection

I am planning to make a online-multiplayer game with my friends. The game is a browser card game (so, players act in turns) and players could host rooms in a lobby. Flex + actionscript will be used to write for the client side. We are discussing what should be used for the server side. I suggested C#/Java and my friend suggested PHP. I...

2 dimensional array

we have these arrays.... $cities = array("nagpur","kanpur","delhi","chd","Noida","mumbai","nagpur"); $names = array("munish","imteyaz","ram","shyam","ankit","Rahul","mohan"); now i want a 2 dimensional array with name of city as key and all the corresponding names as its values. <?php $cities = array("nagpur","kanpur","nagpur","delhi...

soap enumeration value in php

Hi all, I want to create a soap enumeration value in php. Here is the complex object type customer and CustomerStage <complexType name="Customer"> <complexContent> <extension base="platformCore:Record"> <sequence> <element name="customForm" type="platformCore:RecordRef" minOccurs="0"/> <element name="entityId" type="xsd:string" minOccur...

Codeigniter Active record help

Hello, I am trying to increment a INT column by 1 if a certain field is not null on an update request, currently I have this update too columns, public function updateCronDetails($transaction_reference, $flag, $log) { $data = array ( 'flag' => $flag, 'log' => "$log" ); $this->db->where('transaction_refere...

Hudson + gitolite + virtual host on staging server

I have a Ubuntu server which I want to be my continous integration server (for the Zend Application based projects) and the staging server as well. The team is pushing source files to the repository: /home/git/repositories/testing.git Then Hudson does the build, and the master branch is exported (maybe cloned is a better word) by git...

What is the best way to convert a doctrine nested set to an li-structure?

Hi, I'm using Doctrine NestedSet behavior. I'd like to render the tree using php to <ul>'s and <li>'s Here's an example of what the output might be: <ul> <li>Node 1</li> <li>Node 2 <ul> <li>Child 1 of Node 2</li> <li>Child 2 of Node 2 <ul> <li>Another Child</li> ...

Quickest way to find the max frequency element in PHP

I have an array of ids like 127415157,31323794... (range not known). What is the quickest way to find the max frequency ID in PHP? $array_ids = array() ...

Need help debugging a PHP 5 SOAP hello world application

I've been trying to get PHP 5 SOAP extension to work after reading every tutorial there is on the web, but to no avail. This has been very frustrating and i would really appreciate it if someone could point out where i am going wrong and why. Thanks for your help in advance, and any more details needed i'll oblige. The WSDL is as follo...

Fatal error: Allowed memory size exhausted...

HI, I upload my php testing script to online vps server just now. The script used to parse a big size XML file(about 4M, 7000Lines). But my IE explorer show the online error message below. Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 77 bytes) in /var/www/test/result/index.php on line 26 I am sure I ...

Website using open source Forums,Wikis and CMS (Single site)

Hi, I want to develop a site using all three FOSS i.e. Forum,wikis and CMS.But i have few doubts. 1.Can you suggest which is the best software for each of the three(Forum,wikis and CMS).? 2.How should i make the front end preferably(i.e should i use Dreamweaver or just use the CMS for the front end too) 3.How do i integrate all the thr...

Create database in Shell Script - convert from PHP

I have the following PHP code that i use to create a database, a user, and grant permissions to the user: $con = mysql_connect("IP.ADDRESS","user","pass"); mysql_query("CREATE DATABASE ".$dbuser."",$con)or die(mysql_error()); mysql_query("grant all on ".$dbuser.".* to ".$dbname." identified by '".$dbpass."'",$con) or die(mysql_error()...

latin1/unicode conversion problem with ajax request and special characters

Server is PHP5 and HTML charset is latin1 (iso-8859-1). With regular form POST requests, there's no problem with "special" characters like the em dash (–) for example. Although I don't know for sure, it works. Probably because there exists a representable character for the browser at char code 150 (which is what I see in PHP on the serve...

How does PHP interface with Apache?

Hi, I've almost finished writing a HTTP/1.0 compliant web server under Java (no commercial usage as such, this is just for fun) and basically I want to include PHP support. I realize that this is no easy task at all, but I think it'll be a nice accomplishment. So I want to know how PHP exactly interfaces with the Apache web server (or ...

Add a element to a PHP associative array.

1=>america,2=>India,3=>england Above is my associative array. How can I bring 3=>england to front of the array? ...

SQL: Using a CASE Statement to update 1000 rows at once

Ok, I would like to use a CASE STATEMENT for this, but I am lost with this. Basically, I need to update a ton of rows, but just on the "position" column. I need to UPDATE all position values that are great than the position value that was removed to position - 1 on a per id_layout and id_layout_position basis. OK, here is a pic of wha...

How to get modified time and size of any file using PHP?

How to get modified time and size of any file using PHP? ...

Need some help to determine the amount of recursive calls in PHP

Hi all, I've got a, I think fairly easy question, but this is bugging me for a while now. So I figured, maybe I can get some help here. Since recursive functions are always a bit tricky, and sometimes a bit unclear to me, I keep struggling to create a nice working solution to get my menudata. In one of my classes I have this function,...

How can i make my own template/programming engine in php

Ive been working some time on own template engines but i alwais get stuck in strucktured documents like <block : block1> <table> <block : row> <tr> <td> {value} </td> <td> {value2} </td> </tr> ...

Microsoft Word to HTML in PHP script

I want to know the PHP code for Word to HTML conversion. When we retrive the Word document from the database and display in the frontend, the Word document should display as HTML page. ...

Regex Remove Images with style tag from Html

Hi I am new to Regex, however I decided it was the easiest route to what I needed to do. Basically I have a string (in PHP) which contains a whole load of HTML code... I want to remove any tags which have style=display:none... so for example <img src="" style="display:none" /> <img src="" style="width:11px;display: none" > etc... ...