php

Populate values in Word Document with PHP

How do you open a word document, fill it with certain values in certain places and then echo it for download all in PHP? ...

simplexml failed to parse xml like this?

Is there a stronger reference? <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:nutch="http://www.nutch.org/opensearchrss/1.0/" xmlns :opensearch="http://a9.com/-/spec/opensearchrss/1.0/" version="2.0"> <channel> <title>Nutch: "php Developers" notdirectory:1 </title> <description>Nutch search results for query: "...

Is a site potentially not-logonable?

Hi, I'm having some problems logging on to a site via cURL (not just me but an outsourcer too). So I'm left wondering: Are some sites impossible to log onto via cURL? That's the question. Thx in advance for your replies! ...

XmlHttpRequest vs cURL

I was wondering if anyone has done any testing on the speed differences of cURL and XHR (in regards to the time it takes to complete a request, or series of requests). Specifically I'm wondering because I would like to use XHR to go to php script, and use cURL from there to grab a resource. The php page will ensure ensuring the data is ...

Integrate Doctrine with Zend Framework 1.8 app

I'm interested in using Doctrine as an ORM for a new Zend Framework app I'm writing. I'm trying to figure out the best way to integrate it as straightforward as possible. Every example I find is different, and a lot of them pre-date the new autoloading features in ZF 1.8. None of them have worked for me yet. Does anyone have a good way ...

Mysql not using my indexes

I am using 'explain' to view why my query is hitting every single row in my database, and I do not understand why it is doing so. Could someone take a look and give me a hint what I am missing? My database is MyISAM, and I am using Mysql 5.1, PHP5 Here is my table: -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXIST...

Are there Excel-like open source libraries with AJAX by PHP+DB

I'm lokking forward a library like google docs(speret sheet) I examine these structure on WEB, but there is not detailed explanation and is hard to understand it, and it is it to implementation in the long way off when I really become the part called the cooperation with DB. There are many introductions about a sort in particular and pag...

What should I learn? Python or Ruby?

Possible Duplicate: Should I learn Ruby or Python? Hi guys. I am a PHP developer so, mainly a web developer, and I'm used to work with MVC. I use CakePHP, which is a powerful PHP framework to develop web apps and such. I'm comming from the web scene and I really want to keep my work on the web but I also would like to learn a n...

Set width for the textbox + Cakephp

Hi, I m doing an app in CakePHP and JQuery,Mysql. In this in my homepage i m listing down all my forms name. On CLicking on this form name ,it will show the form. WIthin that view i m having a code like below, <?php echo $form->input($r['Attribute']['label'],array('type'=>'text','style"=width:'=>$r['Attribute']['size...

How to send an email to all users in php?

Lets say, I have 1000 subscribed users in mysql database. If I want to send an email to all users, what should i do? EDIT: What is (everybody talking) cron jobs? Can give example? ...

How do I check a MySQL column to make sure it contains a value?

I am trying to select all rows from a database where display = 'Y' and announcement != null. How can I check a column to make sure it contains a value? $qry = "select * from school where display='Y' order by name, announcement, last_update"; ...

Cakephp:Model linking problem

i am very new in cakephp, actually i want to show the all the list of subjects which is belong to one subject category , for this one i have made a subject model whic h code is below: subjects.php <?php class Subject extends AppModel { var $name='Subject'; var $belongsTo = 'Subjectscat'; } ?> and subject category model is: subj...

Posix/Perl regex in php

I have the simple regular expression: \{[0-9]*\} which works fine with PHP's ereg_ functions (Posix compatible), but I need to use the preg_match_all function, which doesn't have an ereg_ equivalent. My expression above doesn't seem to work with preg_ (perl compatible) functions. How can I go about "converting" it to be perl compatibl...

Migrating tiny C# console app to something running on Ubuntu Server 9.04

I'm a linux noob wanting to migrate this piece of C# code: using System; using System.IO; using System.IO.Ports; public class LoadCell { private static string configFile = Directory.GetCurrentDirectory() + "\\LoadCell.config"; private static string errorLog = Directory.GetCurrentDirectory() + "\\LoadCell.log"; private stati...

How to find & fix memleaks inside Apache + PHP + Win2k3

Alright folks, We've got Apache 2.2.11 running mod_php 5.2.9-2 on a Windows Server 2003 (Small Business Edition) box, and each request spikes somewhere around 4 to 8MB of RAM, followed by approximately 2 to 6MB of freeing. Basically, the amount Apache releases is always notably less (by megabytes) than the amount it allocates during the...

NuSOAP and response with Array

I've NuSOAP web-server: ... $server->register('getMembersEvents', array('date' => 'xsd:string'), array('Events' => 'tns:Events'), 'urn:my', false, 'rpc', false, 'Description' ); $server->wsdl->addComplexType( ...

Looping Through Set Number of Posts in Wordpress, Then running same loop again on next set, etc.

I have looked and looked and tried to find an answer for what I've been looking for, but I have yet to see an answer for this: I am trying to generate a Wordpress loop that takes all the posts from a single category and displays them three at a time inside <li></li> tags. Output should look like this: <li>My post title | Another Title...

Google maps showing a visitor’s location by grabbing their IP address ...

Hi there, I'm trying to replicate the following exemple : http://www.leigeber.com/2008/04/map-your-users-using-the-google-maps-api-and-php/ How to integrate this PHP source code with the following Java script (replacing lat/lgt with $latitude/$longitude above ??? Looks easy but I'm a bit lost in mixing PHP and Javascript together ! ...

PHP Excel creation - invalid file type

Hi, I am creating an excel file using php like this: header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=invoice.xls"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); echo "<table><tr><th>Test</th></tr><tr><td>...</td></tr></table>"; When I try open the file, excel...

Using Maven to setup a Drupal PHP project

What do I want to achieve? We are currently working on a PHP project that uses Drupal. I desperately want to learn how to create a One-step build for the whole project. Preferably by using something new (for me) that seems very powerful: Maven Basically I want to automate the following process: Checkout Drupal from the official CVS ...