Hi, I'm choosing between AMQP (RabbitMQ) vs XMPP (eJabberd) for my browser-based flash-free javascript powered real-time turn-based game. I don't know much about AMQP and XMPP protocol. I would like to use PHP for user-authorization and some data store-retrieve with MySQL. As far as I found out, RabbitMQ has PHP clients but eJabberd not....
Is there an equivalent method to
$mail->MsgHTML($body);
for sending a plain text fallback email with the html email?
if that's how it works?
...
I am using xampp on localhost and when I use _SERVER["REMOTE_ADDR"] it returns ::1 (also does this in phpinfo()). Why does it do this? I want it to return a normal ip address like 127.0.0.1. My operating system is windows vista.
...
Here is a code:
<input type="button" id="array[1]" value="Value1" />
<input type="button" id="array[2]" value="Value2" />
<input type="button" id="array[3]" value="Value3" />
And I want to do something like that:
$('#array').click(function() {
id = this.id;
$.ajax({
here goes type, url, data and else
});...
I have a form on a website I'm working (you can see it here) on that allows my users to give feedback. It's an jQuery/Ajax popup form:
$('.contact_us').click(function(){
var boxy_content;
boxy_content += "<div style=\"width:300px; height:300px \"><form id=\"feedbacked\">";
boxy_content += "<p>Subject<br /><input type=\"text...
I have an action that renders two different view scripts based on whether the user is logged in or not.
class IndexController extends Zend_Controller_Action
{
....
public function indexAction()
{
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
...
I am facing an issue while uploading a formatted text/html to the db, things work fine under the WAMP but when doing in LAMP I an having the backslash added to the quotes
string(114) "<p>
<img alt=\"\" src=\"/ckfinder/userfiles/images/aboutkg.jpg\" style=\"width: 607px; height: 221px;\" /></p>
"
I am using a Zend_Form and ckeditor...
So, I have a lot of php files where I use jquery functions. Do I need to create a seperate .js file for all jquery functions or I can put it together with php files or it actually doesn't matter at all?
...
Where does $wpdb->options come from?
I can't see $wpdb-options() function or $this->options so how is this achieved?
...
I'm a big fan of OOP in php, but i feel like defining class methods gets disorganized so fast. I have a pretty good background in OOP in C++, and i am pretty comfortable with how it is handled there, and am curious if there are ways to do it similarly in php.
To be more specific, here is what i mean. I like how in C++ you can define a ...
I have a MySQL table that's being updated very frequently. In essence, I'm trying to grab 500 rows with multiple PHP scripts at once, and I don't want the PHP scripts to grab the same rows. I don't to use ORDER BY RAND() due to its server load with thousands of rows.
So, I thought of simply having each script set every row's status as "...
Is it possible to instruct GeSHi (http://qbnz.com/highlighter/) to generate link to single line. For example if I show highlighted code on 'example.com/my-code' URL, I would like to be able to have link like: 'example.com/my-mode#line-69' or something like that...
...
HI I do have image files in directory which is downloaded from several resources..
if I do have name of that image then how can I check existence of the same with PHP
...
Hi, I am a recent graduate and am looking to start a career in web development. Its kind of a catch 22 at the moment as I have a fair bit of programming experience from university but not really in web development and to get a job in web development a portfolio is typically required.
So, I am looking to start a building a few applicati...
I am having trouble making this seemingly simple MySql query work. Can anyone spot the problem?
<?php
include "config.php";
$offerid = $_POST["offerid"];
$ip = $_SERVER["REMOTE_ADDR"];
mysql_query("INSERT INTO voted (offerid,ip) VALUES (".$offerid.",".$ip.")");
?>
...
i want to create an api for my sites so that i allow other web developers to integrete my api for their user login and signup ..... how can i do that...
...
Hi,
I have a variable, $var, that contains a string of characters, this is a dynamic variable that contains the values from inputs.
$var could be 'abc', or $var could be 'blu',
I want to match the string inside variable against an array, and return all the matches.
$array = array("blue", "red", "green");
What is the correct syntax...
Hi everybody,
I have just installed the Mantis bug tracker to use together with Eclipse IDE and have started too found out the advantages of it. Really great.
Since Eclipse communicates with Mantis through an PHP soap API, I wonder if there's some documentation available on how I can myself make calls, from my PHP application to the AP...
I have installed ubuntu Lamp stack.But the curl is not enabled neither i can find extension listed in the INI file, i added manually but it didn't worked too.
How should enable Curl then ?
...
I have a few tables with the following relationships:
Company hasMany Jobs, Employees, and Trucks, Users
I've got all my foreign keys set up properly, along with the tables' Models, Controllers, and Views.
Originally, the Jobs table had a boolean field called "assigned". The following find operation (from the JobsController) successf...