php

Amazon S3 Integration

Hello, I am trying to integrate S3 with one of my content management systems. The idea is that I want to have document control features. The system is quite unique in that it handles thousands of sites, then each site can have any number of contributors or authors who have permission to upload documents and files to the document contro...

how to disallow history in vb.net web browser

I have a vb.net program that allows you to access webpages in my localhost. Now, my problem is that, when I try to list records in mysql by using tables, it remembers history and the previous data that you listed will appear like a ghost even if the data you inputted does not correspond to the data that it is showing. How can I avoid th...

How to get the last path in the url ?

Hi, I would like get the last path segment in a URL: http://blabla/bla/wce/news.php or http://blabla/blablabla/dut2a/news.php For example, in these two URLs, I want to get the path segment: 'wce', and 'dut2a'. I try to use $_SERVER['REQUEST_URI'], but I get the whole URL path. ...

Custom section-based cache for wordpress site

I'm rewriting a template for a wordpress based site which has some issues with load speed and I'm looking for the best way to speed things up on the code side first. Since the site uses many "boxes" (like headlines, most views, recent comments, post of the week, and so on) which are reused in many different pages, I thought about a syst...

Hwo to get blog entries from blog namespace show on a DokuWiki start page

A while back I even created a dokuwiki plugin. How do I get blog entries from the "blog" namespace shown on my start page? Does anyone know that? ...

Help with a SQL syntax error message

switch($_GET["action"]) { case "add_item": { AddItem($_GET["idc"], $_GET["qty"]); ShowCart(); break; } case "update_item": { UpdateItem($_GET["idc"], $_GET["qty"]); ShowCart(); break; } case "remove_item": { RemoveItem($_GET["idc"], $_GET["id"]); ShowCart(); break; } default: { ShowCart(); } } function AddItem($itemId, $qty){ $result...

how to create an analytics tool?

hi! what should i learn in order to develop a (good and realtime) analytics tool? i think i should learn a lot of javascript, but i need some guidance... and i think i should also learn php... could you help me? which languages are better to capture, process and display analytics data (such as ip adress, country, date, time, os, brows...

Codeigniter Unit-testing models

I'm new to unit-testing, so this is maybe a little dumb question. Imagine, we have a simple model method. public function get_all_users($uid = false, $params = array()){ $users = array(); if(empty($uid) && empty($params)){return $users;} $this->db->from('users u'); if($uid){ $this->db->where('u.id',(int)$id); ...

Creating a multilevel array using parentIds in PHP

I'm trying to setup a list that can have multiple levels, using parentId to define its parent. The first item's parentId is NULL. Example of some entries: id parentId name 1 NULL item1 2 NULL item2 3 1 item3 4 2 item4 5 3 item5 6 3 item6 So, 1 and 2 are main items; 3 is a child of ...

trying to update mysql database in php

I'm trying to have an html form which updates mysql data. Now , I have this code(which is also a form action) and I'm trying to also use this as a form for my update. Because I will need the data that this form would show, so that it will be easier for the users to update only what they wish to update. this is the form that will try to...

How to install wkhtmltopdf on a linux based web server

I have tried in all ways to get wkhtmltopdf installed on our web server but unfortunately it is not getting installed. I cannot access user/bin folder as stated in a tutorial on installation. On the server in public_html folder there is a sub folder _vti_bin, I copied the file wkhtmltopdf-i386 from wkhtmltopdf-0.9.1-static-i386, but I a...

CodeIgniter: A Class/Library to help get meta tags from a web page?

Hello all, I am using codeigniter. I guess it doesn't matter which php framework I am using. But before I write my own class is there another that has already been written that allows a user to get the page title and meta tags (keywords, descriptions) of any sit...if they have any. Any sort of PHP class that does that would be great. ...

What is the php @ sign for

Possible Duplicate: What is the use of @ symbol in php? Hello all, an easy one for you, what does the @ sign mean when placed before a php function call? Thanks! ...

Create charts ready for print

I'm looking for a solution for creating charts dynamically, that will be ready to be used in a newspaper or similar printed media. I've got data that is updated regurarly, stored on a server. What I need is a script that takes the data and creates a (good looking) chart, and exports the chart as PDF or EPS (or a high resolution pixel i...

PHP SoapFault not WSDL Schema compliant in soapUI?

Hi all, I came across a strange one today, it goes like this: I'm setting up test suites for QAing a web service of mine, which is written in PHP5 - making use of the class SoapFault among others. I use the class to return error message to the clients. Example: if (!$this->CheckHost(getenv('REMOTE_ADDR'))) { return new SoapFault(...

Are there any length limits on PHP echo?

Hi, I have this script that fetches some data from mysql and then uses echo to output it. But, as the page have grown and gotten longer all of a sudden i have this weird behavior where it cuts of the end at 65535 chrs (when using strlen to check) The data is all saved in MySQL, beyond the 65535 chrs showing when using echo. EDIT: Sorry,...

How do I rotate two images in wordpress sidebar?

I think (hope) my question is simpler than how I've phrased it, but this is also why I'm coming up empty on Google. It's similar to this, but I need to handle some HTML with it and am a little unclear: http://stackoverflow.com/questions/1080787/random-image-display In the sidebar of my Wordpress install I have two images in this order: ...

PHP/LDAP Authentication Using a VPN

Hello all, I have an interesting situation, and Google doesn't appear to have any information regarding the issue. I develop a web-based software written in PHP. Most of our clients have some sort of CAS server setup for authentication, and we simply point our site at their authentication server. We have a new client that does not have...

Is there something in PHP similar to Option Explicit in VB

I am doing a big project in PHP. In PHP you do not need to declare variables. This is causing a lot of problems for me. In Visual Basic 6, the Option Explicit statement makes it mandatory to declare variables. Is something similar available in PHP? ...

PHP - Problem with ImageCopyResampled

Hello. It's my first time using the function ImageCopyResampled. I just followed the code written in the PHP manual. There seemed to be no errors when I ran the code. The problem is my code just basically copies the original image and did not follow the dimensions as it was defined in the parameters passed in the function. Below is my c...