I wrote this PHP script to retrieve my form results via email. Everything works great, but I don't know how to add a time and date stamp of the results. Here is my current code:
<?php
$name = $_REQUEST['name'] ;
$carenumber= $_REQUEST['carenumber'] ;
$email = $_REQUEST['email'] ;
$topic = $_REQUEST['topic'] ;
$message = $_REQUEST['mes...
Hi Guys
I try to run SOAP client in PHP to call rampart axis2/java.
// Create message with request payload and options
$reqMessage = new WSMessage($reqPayloadString,
array("to" => "http://localhost:9090/axis2/services/SecureService",
"action" => "http://php.rampart.apache.org"));
But...
Hey guys. So my question is just like in the title. How to extract postimage url from wordpress post? So for example if wordpress postimage() function outputs something like:
<img src="some_img_url.jpg">
I'm only interested in some_img_url.jpg.
...
I have the following db for a fitness club calendar and booking system. I get omc_courses details which joined to omc_date,omc_week etc.
Now I also want to display total booked numbers for each course.
I thought two ways to do it and I'd like to know your opinions which way is better or if there are any better ways to do it.
My metho...
Hello
I have downloaded LightOpenID (http://gitorious.org/lightopenid) few hours ago but still can't figure out how to make it work.
I got this google example saved in test.php file
<?php
require '../lib/init.php';
require '../lib/openID/openid.php';
try {
if(!isset($_GET['openid_mode'])) {
if(isset($_GET['login'])) {
...
Hello.
My Problem: Linked to my Employees table I've got an Address table containing a virtual field called full_name (I guess you can imagine by yourself what it does). I added the Containable Behaviour and this function
function beforeFind() {
$this->contain('Address.full_name');
}
to my Employees model, so that I don't have to...
The result of a soap client call is an object that contains 2 properties and an array of objects.
The array of objects is mapped as stdclasses.
Is there any way to fix this?
Update:
I need the proper mapping : object with an array of objects not array of stdclasses.
...
Hello All,
I have this function I created to give my wordpress site a body tag...
function give_body_class( $print = true )
{
global $wp_query;
$c = "";
// Generic semantic classes for what type of content is displayed
is_archive() ? $c = 'archive_page' : null;
is_date() ? $c = 'date_pag...
Hello all
I am trying to create a constant name dynamically and then get at the value.
define( CONSTANT_1 , "Some value" ) ;
// try to use it dynamically ...
$constant_number = 1 ;
$constant_name = ("CONSTANT_" . $constant_number) ;
// try to assign the constant value to a variable...
$constant_value = $constant_name;
But I find th...
I got this Doctrine query:
select upper(substring(e.name, 1, 1)) first_letter
from Application\Models\Exercise e
group by first_letter
order by first_letter asc
But it throws an exception with the message:
Error: 'first_letter' does not point to a Class.
If I leave out the group by and the order by,...
I need to create thumbnails for all the jpg images in a folder. When I compile it, the error message pops out:
Parse error: syntax error, unexpected T_VARIABLE in /volume1/web/CAL1/thumb.php on line 6
and here is my code:
<?php
$pathToImages = "./images/";
$pathToThumbs = "./images/thumbnails/";
$thumbWidth = 110;
...
Hey... so I attempted to run the query below and it just won't do it. I've checked:
The number of fields in the form matches the number of fields in the table.
The number of session variables matches those numbers too.
That the actual query contains the data to be input with an echo.
That the table name is correct.
That queries work wi...
What is quicker, for camelCase to underscores;
using preg_replace() or using ord() ?
My guess is the method using ord will be quicker,
since preg_replace can do much more then needed.
<?php
function __autoload($class_name){
$name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $class_name));
require_once("some_dir/".$nam...
I would like to use JSON, however, the security issues related to using JSON are holding me back.
There are two main issues CSRF (Cross Site Request Forgery) and the JSON/Array hack.
I have read that Double Submit the Cookie expanding from Secret Hidden Fields are possible solutions to the CSRF problem.
I wonder if there are any co...
This question is more logic than programming at the moment.. once I understand what algorithm(s) I need to use I'll be looking into how to implement it.
I've got a list of items in a database that need to be voted up or down by users to determine if they are correct or not. The aim is to provide a % for each item to show how reliable th...
I need to access the header to implement methods for a self written client on a mobile phone. The page should be accessible from J2ME without complete Request/Response Headers (Uses less traffic. For Example: J2ME sends only "G i\r\n\r\n"). Is there a way to get this working? (no matter how)
...
Can anyone suggest a PHP IDE (preferably built in Cocoa/ Objective-C, not Java) that also has native support or an excellent plugin for Git?
I am currently using NetBeans but I am not happy with the speed and the patchy Git plugin. I have previously used Zend Studio for a long time but that had stability issues.
...
Hi,
I have a controller action that uses a sql query:
$tag = $this->params['tag'];
$this->set('projects', $this->Project->query('SELECT * FROM projects INNER JOIN projects_tags ON projects.id = projects_tags.project_id INNER JOIN tags on projects_tags.tag_id = tags.id WHERE tags.tag LIKE $tag'));
As you can see at the end I ...
I've uploaded an MS powerpoint file to my server, and I'm trying to use Google Docs viewer (http://docs.google.com/viewer) to display it on a webpage.
The file is available here:
http://elgg.wamped.org/test.ppt
If I invoke the docs viewer with the above URL, it is working as expected, see:
http://docs.google.com/viewer?url=http%3A%2F%2...
I have a module in Php which will take in a request from an Authenticated User (digest), do some processing to the request and then fsockopen to the same local apache web server with a path mapped to a weblogic server.
fsockopen results keep returning me a 401 unauthorized. How should I go about getting the forwarding to work ?
...