php

php function defined in xsl

I have this XSL file: < ?xml version="1.0" encoding="utf-8"?> < xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl script" xmlns:script="script"> < msxsl:script implements-prefix="script" language="C#"> < ![CDATA[ public string...

Calling a php webservice from .net with a cert

I'm using this code from c# to call a php web service that is secured by user/password and certificate: string wsurl = ConfigurationManager.AppSettings["Url"]; string wsuser = ConfigurationManager.AppSettings["User"]; string wspass = ConfigurationManager.AppSettings["Pass"]; string url = string.Format(wsurl, param1, param2); System.Ne...

how do i set the time in php?

<?php date_default_timezone_set("Spain/Madrid"); $date=date("H:i:s"); echo $date; ?> how can i set the date to my location? i get this when i run the script Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID 'Espana/Madrid' is invalid i know Spain/Madrid is not recognized, but how can i fix it? ...

PHP- share class variable with a child class.

This is a follow up from yesterday's scope question. stackoverflow.com/questions/3301377/class-scope-question-in-php Today I want to share the "$template_instance" variable with a child class. How is this accomplished? require_once("/classes/Conf.php"); require_once("/classes/Application.php"); class index extends Application { p...

Missing validation message in cakephp application

I'm trying to add a layout for a cakephp application but now my validation message is no longer being displayed. When validating a comment on a blog entry, the validation message thats suppose to be at the top is not displayed. ...

implement a button to send information to another php file?

Hey guys, I've got the following php code printing out the contents of a SQL table. $query="select * from TABLE"; $rt=mysql_query($query); echo mysql_error(); mysql_close(); ?> <i>Name, Message, Type, Lat, Lng, File </i><br/><br/> <?php while($nt=mysql_fetch_array($...

Add Up All Mysql Values PHP

Hey, I have a tables called downloads, and in that table it stores the total amount of downloads for each day, so like downloads date 586 07-16-2010 906 07-17-2010 1019 07-18-2010 287 07-19-2010 15 07-20-2010 639 07-21-2010 337 07-22-2010 How could I retrieve the total number of downloads, so add them all up from every singl...

html, css, execute javascript from a gif file .

I would like to know if it's possible to execute javascript from embedded .gif file . I can make rewrite to a php file to seem as a gif file and execute the code from there but I'm not faimilar with css/html therefore I was wondering if there is any trick to make seem there is embedded a picture but to execute javascript . I tried img sr...

Best place to purchase site templates?

I'm looking to buy professional looking site templates. I love coding but design is not my forte. I also am working on a site for my company and I'd like for my users to be able to log in and edit the content instead of me doing it for them (CMS?). Templates that work in php and asp.net are preferred. Anyone have a best kept secret w...

Emails sent from PHP not arriving to non-gmail.com addresses

I have a problem sending HTML emails from a PHP form. My goal is to send an email in HTML format with a picture embedded in it. It works perfectly if the destination address is a gmail.com email, but it doesn't seem to arrive to any other address. What am I doing wrong? $header = "From: Private PictureBank MDC <[email protected]>\n"; $h...

Harvest two pictures from open Facebook profiles

I want to grab 2 pictures from say - 200 FB profiles. The users can be random, but the photos should be profile pictures - not just from a random album. Has anyone written anything like this or got any tips for rolling my own in PHP or C# ? Thanks ...

Issue Caching Resultsets using PHP and APC on Windows

Hi, Just for the record, I'm using Windows Vista with XAMPP (PHP 5.3.1). I'm trying to use APC to cache a database result. I did a simple APC test on string variables and it seems to work ok. However, when I try to do the same thing with a database result resource, I get a complaint the data in the cache 'is not a valid MySQL result re...

Whats the mechanism of data caching in web?

I used to think that cache is browser driven and browser dont request the same file again if they think data is being repeated but reading some text on web, I realize that it is website that tell browser for which files should be not requested twice. Can anyone clarify me on this? ...

Drupal - How do you add a region in comment-wrapper?

When you want to create a region in a node.tpl template, you simply put function xnalaraartbasic_preprocess_node(&$vars) { $vars['your_region'] = theme('blocks', 'your_region'); } in template.php. But how do you put a region in comment-wrapper.tpl? I couldn't find a hook for comment. ...

random rowcount in PDO

how would i get a random rowcount using PDO? i'm still learning how to use PDO so this is what i tried, but it didn't work because it doesn't randomize the quotes: $sql = "SELECT COUNT(*) AS rows FROM thquotes;"; try { $query = $this->_db->prepare($sql); $query->execute(); ...

Causing timer to reset to specific amount only after xxx time remains (PHP)

I have a php script I'm trying to alter. The original code is written to increase the countdown timer by a value pulled from SQL anytime a button is pressed. What I've been trying to do is change the code so that the time doesn't increase but actually resets to a specific remaining time ONLY WHEN the timer is under a certain amount (sa...

PHP $_SESSION Expiry

Does the $_SESSION expire at any time point? Obviously you can call session_destroy() or close the browser. I just had a application fail because it was relying on the session and the browser had been open for 2 days. I guess the session must have expired. ...

Is share point working for php

Hi, is it possible to working with share point with php? I want to keep a application developed in php on share point is it possible ? Regards Prabhakar ...

PHP tags in URL

So I made a landing page for all these forms that the marketing department at my work makes. One of the fields they pass is a URL that I redirect to after I'm done processing - a thank you page. Recently, I discovered a URL that looked like this: http://www.oursite.com/folder/thank-you.php?thankyou=free-guide&amp;amp;adgroup=&lt;?php e...

how to unblock browser when using while loop?

i make an ajax request to a php file that runs a while loop that looks for new data in the database, but i cant give it new data because the browser is blocked while waiting for the new data. does anyone know how to not block the browser? ...