php

NuSOAP PHP Web Service

I am using NuSOAP to try to consume a Web Service built in Java. I have this code so far: <?php require_once('lib/nusoap.php'); $wsdl="http://localhost:8080/HelloWorldWS/sayHiService?WSDL"; $client=new nusoap_client($wsdl, 'wsdl'); $param='John';#array('name'=>'John'); echo $client->call('Hey', $param); unset($client); ?> but when t...

Is there a realtime apache/php console similar to webrick or mongrel with ruby on rails?

Is there a realtime apache/php console similar to webrick or mongrel with ruby on rails? I want to be able to monitor what the heck my server is doing. edit: but I don't want to grep the log Thanks! ...

Wordpress: How do I fix my post class?

I seem to have somehow messed up when wordpress calls the post class. I looked in "Main Index Template" but that just says "<div <?php post_class() ?> id="post-<?php the_ID(); ?>">" So I don't know what to do. ...

Struggling with hidden form field basics (PHP)

Hello, I'm having difficulty using hidden forms with PHP data. I've searched Google endlessly and checked my book and cannot for the life of me figure out what I'm doing wrong. My code should Check to see if an attack succeeded; If it succeeded, subtract damage from health; Rewrite the $health variable. Use the new $health value for t...

Comparing a value with previous row in a while loop?

I'm a newbie in PHP, so forgive me for a basic question. In a While statement, is there a way to know if a value in a row is equal to a value in the previous row? ...

Email queue system for massive mailing.

Hi All I am developing email queue module for my php application. So all emails(user notifications, password reminder ...) will be put into the queue and will send by cron process based on the priority of emails. But i will have news letter module soon. so my question is either to keep newsletter in seperated queue or can be used the c...

Smarty not rendering images and css

So I made myself a little html/css template. And now I'm trying to actually use it with some PHP code however, it only renders text. The images and css arent there. Everything is in the templates/Default directory. Do i have to do something funky with my paths in the template? ...

PHP mkdir(), chmod() and Windows

Hello, I am using the PHP function mkdir($path, 0777) to create a new directory on an Apache server (running on Windows). When I create this and view the folders, Windows has set the dir as read only. Is there a way of changing this without using exec() to cacls.exe? The PHP documentation states that chmod() doesn't work on Windows bu...

How do I simplify Form Processing in PHP?

I'm been a PHP developer for quite some time now but until today I've not found a simple way to process (aka normalize, sanitize, validate, populate and display forms and it's respective field errors). I know that most of the PHP frameworks nowadays make this job easier but somehow I don't feel like porting all my code to one of these f...

Enumerating tables used in mysql query?

Is there any way to enumerate tables used in mysql query? Lets say I have query : SELECT * FROM db_people.people_facts pf INNER JOIN db_system.connections sm ON sm.source_id = pf.object_id INNER JOIN db_people.people p ON sm.target_id = p.object_id ORDER BY pf.object_id DESC And i want in return array: $tables = array( [0] => 'db...

MySQL: Reorder/Reset auto increment primary key?

Hi, I have a MySQL table with an auto increment primary keys... I deleted some rows in the middle of the table. Now I have, for example, something like this in the ID column: 12, 13, 14, 19, 20... I deleted the 15, 16, 18 and 19 rows.... I want to reassing/reset/reorder the primary keys so I have continuity... make the 19 a 15, the 20 a ...

MySQL: Database Design problem

I have a table called 'movie2person' with 3 columns: movieID, personID and role. I use this table to connect betwen the 'movies' table and the 'persons' table... many-to-many relationship.. I have selected movieID and personID both as primary keys... The problem is that sometimes I need to enter the same personID for the same movieID se...

Facebook Framework

What PHP Framework does Facebook use ? Can it be downloaded from anywhere ??? ...

Unable to get Id of draggable divs in jquery. (using jqery ui)

For some reason the script below is unable to get the id of the draggable divs using attr('id'), but it works on the other static elements on the page. I am totally confused as to why this wont work and if anyone has a solution for me it would me much appreciated. $(document).ready(function(){ //$(".draggable").d...

PHP : Can I get document.cookie without using javascript ? alternate in PHP

hi I was doing something but I can't use JavaScript in it ... i want to get the cookies but without using javascript Is there is any way to get cookies without using javascript ? i want to get the same output of document.cookie thx ...

parse an XML with SimpleXML which has multiple namespaces

Hey there :) I have this ugly XML which has alot of namespaces on it, when I try to load it with simpleXML if i indicate the first namespace I'd get an xml object ,but following tags with other namespaces would not make it to the object. How can I parse this XML ? <?xml version="1.0" encoding="UTF-8"?> <soap-env:Envelope xmlns:soap-e...

What are the problems associated with retrieving email using CURL?

A new feature I wish to add to our local network is the ability to retrieve email from free email services such as Gmail, Yahoo and Hotmail using PHP. There are services we can pay for but I would rather hack it up myself! I find that Google only has an API but the rest do not. What are the problems associated then with me just retrievi...

PHP: Does sleep time count for execution time limit?

Hello! I have two questions concerning the sleep() function in PHP: 1) Does the sleep time affect the maximum execution time limit of my PHP scripts? Sometimes, PHP shows the message "maximum execution time of 30 seconds exceeded". Will this message appear if I use sleep(31)? 2) Are there any risks when using the sleep() function? Does ...

How can I escape complex sql in Zend Framework?

I have the following sql (a simplification of the real problem): SELECT * FROM t WHERE myname LIKE '%{$input}%'; How do I escape the $input? I can't use the quoteInto (unless I miss something). As $sql=$DB->quoteInto("SELECT * FROM t WHERE myname LIKE '%?%'",$input); Will give me SELECT *...

Assigning random colors per session, for chat

I have an AJAX chat system that I'm working on and so far I have it working. One thing I want to do is have it so when the user name is displayed on screen, it is a unique color (like in an AIM window). How would I generate a random color to assign to the user's name for the particular session they are logged in for? The color would hav...