php

PHP - Get variables from another PHP file without executing the code?

Hi All, I'm trying to create a script to extract the variables from a file on the same server. The problem is, I don't know what else is going to be in the file all of the time (the script is for other people to use), so I don't really want to load all of the contents or execute any of the code. I've thought of using file_get_contents...

Is PHP's extended CHM manual gone?

Where can I find an updated version of the extended PHP manual (with user comments) for download? The usual URL redirects to the general docs download page, was this version discontinued? ...

How to import photos from Facebook?

I noticed when I visit photo printing websites, they ask you if you would like to import your photos from Facebook. How do they do it? Does Facebook provide API to import users' photos? I am mostly using PHP. ...

Zend beginner: undefined index: HOME when using Zend_Tool

I've just installed Zend Framework and am running through a tutorial, but have hit a small stumbling block. Using the Zend_Tool to create new actions gives me an error: > zf create action add index PHP Notice: Undefined index: HOME in C:\apps\zend\bin\zf.php on line 51 PHP Stack trace: PHP 1. {main}() C:\apps\zend\bin\zf.php:0 PHP ...

Creating subdomains dynamically for an application

I want to create subdomains dynamically through a PHP script or something similar. I've seen lots of sites that create subdomains for individual users, or for new forum spaces. I'm just wondering how that works, and how I can implement it in my system. Thanks for your help! ...

How can I compare my PHPASS-hashed stored password to my incoming POST data?

Here's a better example, just a simple checking..stored value in database has password: fafa (hashed with phpass in registration) and username: fafa; i am using the phpass password hashing framework public function demoHash($data) //$data is the post data named password { $hash =new PasswordHash(8, false); $query = ORM::factory('user...

Running a PHP through Ajax on Unload

I'm trying to have a php script run when the user navigates away from the page. This is what I'm using currently: function unload(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ...

Wordpress per-category feeds have generic titles

I'm actually not sure if this is a configuration issue (with the theme) or a PHP issue (in which the relevant template simply is buggy)... I have a Wordpress-powered blog in which I make extensive use of categories to group posts. However, the per-category syndication feeds produce items whose titles are just the name of the blog and the...

how to implement a login system under php?

Are there any good tutorials on how to create your own registration, authentications using php/mysql/or javascript. ...

How useful would be a Smalltalk source code browser for other programming languages?

I'm working on an IDE for python, ruby and php. Never having used Smallltalk myself (even it was very popular when I was at university) I wonder if the classic Smalltalk Browser which displays only one method is really an improvment or to classical file editing or not. I myself like to have the overview of as much as possible in a cla...

PHP exec on Windows Server 2008

I have installed PHP as a module in IIS on Windows Server 2008, am am having great difficulty trying to execute command-line programs from within a PHP script. I can execute the PHP code fine using php-cgi.exe and php-cli.exe, which leads me to believe that it might be a permissions issue. However, I can execute some commands, like shu...

How do i email the results of a wget download via linux mail command?

I am required to write a script that would download a file (based on a provided url to that file) using wget and then pipe the result to the mail command so that it can be mailed to a provided email address. This will be used in a php based project. "Piping the result" preferably would be a built link to the file on the server, so that...

How to break up reports by month with php and mysql?

Hi everybody, I'm trying to do something relatively simple here. Basically I have a table with a bunch of rows in it marked with a timestamp (format: 2009-05-30 00:14:57). What I'm wanting to is do is a query which pulls out all of the rows, and splits them by the month so I'm left with a final result like: February rowID name order d...

What does !== in php mean ?

I saw if($output !== false){ } It almost works like not equal. Does it has any extra significance? ...

Curl error Could not resolve host: saved_report.xml; No data record of requested type"

<?php error_reporting(E_ALL); $url = 'saved_report.xml'; define('XML_HEADER', '*RWRESPONSE*RESPONSE*DATA*HEADER*COLUMN'); define('XML_ROW', '*RWRESPONSE*RESPONSE*DATA*ROW*COLUMN'); $headers = array(); $rows = array(); function startTag($parser, $data) { global $current_tag; $current_tag .= "*$data"; } function endTa...

Eclipse behavior in Netbeans

I love Netbeans but there is one thing I really like about Eclipse that I can't do in Netbeans: If I have started a function that takes a string i.e. someFunction("Some string here") Both netbeans and eclipse will autocomplete the ending doublequote and parens. In Eclipse, if I hit enter at the end of my string, the cursor will move...

Restricting access to ASMX web service

There id this existing ASP.NET (2.0) web service that's called from PHP. Runs fine. Now the need arises to restrict access. Constraint: I currently don't have access to IIS/Windows account management to implement something robust,. I'm thinking about adding a SOAP header to the PHP call, containing a secret key, and then checking the c...

How to use Prolog with PHP?

I want to use Prolog with PHP. Is it possible? ...

php and server side javascript

Hi All, I am dealing with a problem where I need to do few thing at the SERVER SIDE using JAVASCRIPT (I am using php + apache combination )- read source of url using curl run it through some server side JavaScript and get DOM out of it traverse and parse the DOM using pre-existing java script code.This code works fine in a browser. ...

Encapsulating and inheriting methods

Hi all I'm wondering if it's possible to encapsulate the methods of a class, but then expose them within a consuming class. For example (JFTR, I know this code is wrong) class Consumer{ public function __construct($obj){ $this->obj = $obj; } public function doCommand(){ $this->obj->co...