php

Manage a simple private area with Wordpress

I'd like to have ideas on how to manage a simple private members area with wordpress. I have to access this area with a simple login form on the homepage. This will be a one user authentication (one username/pass for all the users). In this private area the user can download some pdf and misc files uploaded in some way using wordpress. ...

How to Use Zend Library without installation of Zend Framework

How to use zend library without using zend framework installation? I am trying to use zend library(Mail and Mime) without zend framework installation, its not returning any error messages... but for my project i'm using Mail and Mime library only, How to use Zend Library without installing zend framework .. Thanks, Vinoth S ...

Can Lucene in Zend search an array with data, and return a stripped array?

I've got an array with data. For example $data = array( 'test', 'test2', 'tost', 'testing', 'another', 'search' ); I wanna do a search on this array. lets say "test~" with lucene. I would for that way want to have the first 5 results in the array, and as feedback i need an array with those 5 items. Is this poss...

Generating a proxy for a WCF Service in Java and PHP Duplicate Message Error

I get the following output error when trying to generate a proxy for a WCF Service using both PHP and Java: with Java I am using wsimport with Jaxws and JaxB with PHP I am using wsdl2php The error that I get is the following: [ERROR] duplicate "message" entity: "IWcfRequestProcessor_ProcessRequests_InputMessage line 1 of http://xxxx...

how to find Page id inwordpress

i need to get page ID in wordpress throught php? ...

Execute multiple sql delete query in mysql for php

For some reason, i want to delete some of records in my table using php mysql query function. Here's what i've write $sql = "delete from progress where first_date='2010-01-01' and last_date='2010-01-31'; delete from progress where first_date='2010-02-01' and last_date='2010-02-28'; delete from progress where first_date='2010-03-01' and ...

Content of form element not being saved to database while others are

I am working with a CMS like system, phpBMS, which defines a certain way of making forms, and defines the form elements to be used in such forms. This is an example of the form template, and these are the fields that are defined. Generally, it is pretty simple. If you have an inputField with the id of say, 'name', the content of that f...

Using a LGPL'ed library with my MIT/X11 licensed PHP script

Hi, After having read several posts regarding the inclusion of LGPL'ed libraries with software that is licensed under another license than GPL or LGPL, there is still one point that confuses me. The way I understand it, there should normally be no problem to include the .php-files (and the README and the LICENSE files) in my distributi...

PHP help with password reset and token expiry

I'm looking to set up a php password recovery script, using an token which expires after 24 hours, but i'm not sure how to go about it. I have SHA1 encrypted user passwords at the moment, all i want to do I think is append a token to the url which is sent to the user when they request a password reset,but how do i go about doing this pro...

Fetching mail from a POP3 server using php

I am trying to fetch a mail from POP3 (I am using POP3 mail server and I am trying to fetch the mail content and store into a database table for my project.), but I can't find any PHP script for that, all are only for IMAP. Do you know how to fetch mail from a POP3 server? Thanks. ...

[php] ODF document load

Is there any quick way to read/write an ODF file from PHP? ---- edit ----- I needed this for an ODS(spreadsheet) file http://www.opendocumentphp.org/ seems to be unmaintained so i didn't even bother. http://www.phpcraparchive.org/browse/package/4398.html (ods-php) gives an fatal error(tries to allocate more than 512Mb) when opening t...

Does zend framework have html parser like simple html dom?

Hi, Does zend framework have html parser like simple html dom? Thanks ...

Simplexml_load_string($string) returns an empty object but $string contains xml? code below

Hello I retrieve some information using cURL in xml format. .... $xml = curl_exec($ch); $data = simplexml_load_string($xml); print_r($data); //out put - SimpleXMLElement Object ( ) if I try - print_r($xml); and view page source I get <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns7:users xmlns="http://www.examp...

way to specify class's type of an object in PHP

Is there a way to specify an object's attribute's type in PHP ? for example, I'd have something like : class foo{ public bar $megacool;//this is a 'bar' object public bar2 $megasupercool;//this is a 'bar2' object } class bar{...} class bar2{...} If not, do you know if it will be possible in one of PHP's future version, one day ? ...

Member Function and a non-object

I have created a simple function for fetching xml: function meteor(){ $request_url = "http://site.com/xml.xml"; $xml = simplexml_load_file($request_url) or die("feed not loading"); return $xml; } But I cant call to this function: $xmls = new meteor(); echo $xmls->Kemo->Area; I have not any output because meteor in not ...

Saving memory when fetching large result sets with PDO

Hi everybody. I have written a tool for database replication in PHP. It's working fine but there's one issue: I'm using PDO to connect to the different databases to keep it independent of any specific RDBMS, which is crucial to this application. The tool does some analysis on the tables to decide how to convert certain types and some ...

Convert html entities into charactes problem

Hello link Im having trouble converting the html entites into html characters, (&# 8217;) i have tried using al the different php functions (html_entity_decode, htmlspecial characters etc...) None seem to be working, any ideas what function i need to use? Thank you! ...

php class identification for IDEs

Hello, Let's say i have a function that returns an object of type SomeClass. And i have code like this: $test = function_to_return_someclass(); Now i want to use the $test variable in an IDE, but i want it to understand that $test is of type SomeClass. I can do it easily with class variables by using the /** @var */ comment, but this...

redirection problem with Twitter Library for Codeigniter.

Hi there, I'm using Elliot's Twitter Library for Codeigniter framework (http://www.haughin.com/code/twitter/), the setup went well. But after clicking on allow button on the twitter auth page, it redirected back to the twitter auth page again. I think the problem is with the .htaccess of my server but I cannot get it to work. This is w...

Rendering Zend_Form (white screen)

Hello everyone! I create simple form in forms/user.php: class Form_User extends Zend_Form { public function __construct() { parent::__construct(); $this->setName('form_user'); $username = new Zend_Form_Element_Text('username'); $password = new Zend_Form_Element_Password('password'); $em...