php

Calling a php file everytime when i click the button in Flex.

The problem i am facing right now is a filename.php generates filename.xml.... and this filename.xml is called in my Flex Tree. Now everytime i update my DB, the values are not getting reflected into filename.xml unless i call the filename.php Now how would i call filename.php from flex which will make the update of xml... I have tri...

Create a php webservice

Hello, My question is needed for some basic understanding off webservices and more specificly in conjunction with php I would like to know, if it is neccasary to have a wsdl file for the creation off a webservice or is that just something that is usefull to third party's that want to access the webservice? Also, it's generated automati...

What are the prerequisites for Facebook stream.publish?

Hi, I'm wondering if someone would help me troubleshoot my test for stream.publish. I thought I had all the right pieces. Here's the code: <?php require_once 'facebook.php'; $appapikey = 'xxxxxxx'; $appsecret = 'xxxxxxx'; $facebook = new Facebook($appapikey, $appsecret); $user_id = $facebook->require_login(); $message = "Will this sta...

How do I dynamically populate the <title> tag in a PHP page?

My code looks like: index.php: <html>.... <title>My page</title> .... <?php switch ($_GET['id']){ case "tips": include("tips.php"); $title = "Tips"; ... How do I get the title varible to the html title tag? All pages pass through index.php. ...

*FIXED* Good with PHP arrays? HELP!

I know there are a lot of smart people, so prove me right! I want to combine arrays where similar named keys merge together to form a single array. See example: [Bob] => Array ( [BobsDetails] => Array ( [Title] => Mr ) ) [Bob] => Array ( [BobsDetails] => Array ( [Surname] => Smith ) ) How do ...

preventing outside linking to a page

I have a download script that processes my downloads: download.php?file=file_refrence_here How can I prevent someone from putting a link on their site such as: http://www.mysite.com/download.php?the_file_refrence Apparently $_SERVER[HTTP_REFER] is not secure. Although I am just worried about general linking not people smart enough ...

What is PDO scrollable cursor?

What is "Fetching rows with a scrollable cursor" all about? ...

Simple CMS (php/python)

I am looking for an easy to use CMS that can be used to host a multilingual website with photo galleries and few forms. I am open to php/python excluding wordpress/joomla/drupal. ...

Process a block of HTML, ignoring content within specific tags

On a blog I wish to pass all of the text for a blog entry through a PHP script to process quotes and some other items into nice typographic characters. The blog text in question contains HTML, and in particular will highlight code snippets contained within <pre><code> ... </code></pre> blocks. The code blocks can appear randomly and in ...

Using php to ping a website

I want to create a php script that will ping a domain and list the response time along with the total size of the request. This will be used for monitoring a network of websites. I took a pass at it with curl. Can you think of a better option? This is mostly all from comments on php.net and more of a proof of concept then anything else...

Query multiple custom taxonomy terms in Wordpress 2.8?

I created a custom taxonomy named 'technologies' but cannot query multiple terms like I can with categories or tags. These querys DO work: query_posts('tag=goldfish,airplanes'); query_posts('technologies=php'); However, neither of the following work correctly: query_posts('technologies=php,sql'); query_posts('technologies=php&tech...

calculating a top 5 in php and mysql

Hey I've made a rating system in php and mysql and now I want to select a top 5, I've made something but if a user adds a rating (with the max) it's nr 1 ranking. How do you guys do it in php and mysql ? the table looks like this: -- id -- mid -- uid -- rating The rating is a number from 1 to 5 Thanks in advance! ...

How to properly indent PHP/HTML mixed code?

When mixing PHP and HTML, what is the proper indentation style to use? Do I indent so that the outputted HTML has correct indentation, or so that the PHP/HTML mix looks properly formatted (and is thus easier to read)? For example, say I have a foreach loop outputting table rows. Which one below is correct? PHP/HTML mix looks correct: ...

unit testing datastores in PHP

I'm using PHPUnit but find it difficult to make it create good mocks and stubs for objects used as datastore. Example: class urlDisplayer { private $storage; public function __construct(IUrlStorage $storage) { $this->storage = $storage; } public function displayUrl($name) {} public function displayLatestUrls($count) {} ...

What's the best way to send JavaScript array to PHP script using GET?

I have an interactive web application powered by jQuery where users can manipulate visual objects on the screen. When done, the "state" of JavaScript objects should be sent to PHP to store into database. I'd prefer to use GET for this, but solution that uses POST to submit the data is also viable. I'm currently thinking to serialize al...

Free Chart Libraries for PHP

I'm looking for a Free chart drawing library/service that allows me to make things like line, bar, or pie graphs. I know there are some ones like Fusion Charts, but most of those cost money to use. I know Google Charts is also one of them. If you recommend Google Charts over any other, than could you provide a link to a library that mak...

add five minute to filemtime function (php)!

hi , i have the flowing code $LastModified = filemtime($somefile) ; i want to add ten minute to last modified time and compare with current time then if $LastModified+ 10 minute is equal to current time delete the file . how can i do that ?! i'm little confusing with unix time stamp . ...

What can change the include_path between php.ini and a PHP file.

I've inherited some code on a system that I didn't setup, and I'm running into a problem tracking down where the PHP include path is being set. I have a php.ini file with the following include_path include_path = ".:/usr/local/lib/php" I have a PHP file in the webroot named test.php with the following phpinfo call <?php phpi...

eclipse pdt >> publish from workspace

I'm learning Eclipse PDT for PHP development. In pretty much all tutorials I've read they put the eclipse workspace inside the document root of the webserver (htdocs in my case). Is this common practice? I mean; I don't like the configuration files on my (test) webserver. Isn't there a way to publish the changes to webserver's folder fr...

PHP - proxy from live server to internal mapping server

Hi I've got a live PHP4.2.x server which I control fully. I'd like to access our companies internal mapping server on 10.1.1.5 They don't want to open up to world, however are happy for my webserver to access it. The 10.1.1.5 mapping server runs Mapserver 4 Windows. http://www.maptools.org/ms4w/index.phtml?page=home.html Have looke...