php

Is there a 'best' Google charts API for PHP?

Is there a "best" one? Does it offer as much flexibility as the Google API? I am wary of using such wrapper, as I would need to take the time to evaluate each individually, so I am asking here if anyone has already done this. Are there any benefits in a wrapper? The Google API seems clear enough. And what guarantee is there that a wra...

Explode PHP string by new line

Simple, right? Well, this isn't working :-\ $skuList = explode('\n\r', $_POST['skuList']); ...

PHP Googlebase Get the products without user login

Hi, This is my requirement ( I searched a lot but I could not find a solution) I have a merchant account in google base where I added my products. In my site I want to list those products by querying the googlebase feeds. And the customer should be able to get those products without any authentication. I tried the sample code given in...

Is it possible to write an Apache protocol handler in PHP?

Hello, I wonder if and how it is possible to write a custom "protocol handler" (listening at a custom port) for Apache 2 in PHP? In C and mod_perl you can write so-called "protocol handlers", which intercept the early Apache stage (after a client socket connection has been accept()ed, but before any content has been written to it) and ...

PHP: idea of making viewed notification

I have a notification page. If you get new notifications (viewed column in the database is "0") then it gets highlighted. I just need an smart way to know that the user has seen the notifications. Right now it sets all the user´s notifications to viewed "1" (user has seen them) after the first time you go to "My notifications" page. H...

Passing parameters through form to Controller (CakePHP)

Okay, so I'm fairly new to CakePHP. This is the setup: I've got a Model (Reservation), and a controller, (ReservationController). I'm trying to provide a simple add() functionality. The request url is: www.example.com/reservations/add/3 Where 3 is the ID of the event this reservation is for. So far, so good. The problem is, the form ...

Web OS final year project

Hi guys. i m a final year student and planning for my project. i have given my thought on devoloping a web operating system using HTML,JS,CSS with linux support. Do provide me some suggation and tutorial or sourcecodes(if any) thank u. ...

Facebook status update with rest api and php

Iam trying to post an status update from my Facebook APP (no IFRAME). This works so far, but i have no Idea to set something like. "user posted via my_app_name" with an link to the application?" and how to add an picture to the update? Iam using the old rest api with php5. $this->facebook->api_client->users_setStatus($message); ...

What Constitutes a Retry in the Job Queue?

I originally posted this question over at the Zend Forums but figured it would also be wise to post here. What has to happen, exactly, for a job to retry? I've tried timeouts, 50x response codes, and setting the status to "FAILED". I have a simple script that creates a job... $job_url = 'http://localhost/consumer.php?time=' . microtim...

How do I create a dynamic increasing value?

I want to create and display a value which is increasing by a fixed amount per second. I have the following variables in my PHP file: $AccountValue=220000; $IncreasePerSecond=15; So for example when the page loads the value would be 220000 after one second the value would be 220015 after another second 220030 ....etc thanks in advanc...

Posting PHPBB Forum Thread/Post info in a website

Hey there I am trying to extract, say, the latest/most recent 5 threads in the X section of my Forums and have it 'posted' on my website with a link so the viewers can go directly to the thread instead of having to browse the forum or what not. I've seen and read some tutorials online but...in all honesty, phpbb seems like a mess to me...

Why can't PHP create a directory with 777 permissions?

I'm trying to create a directory on my server using PHP with the command: mkdir("test", 0777); But it doesn't give full permissions, only these: rwxr-xr-x ...

Can I use MySql Create Select on two different servers with PHP?

Hi, I am trying to use PHP and MySQL's Create Table Select between two different MySQL servers. I am not sure this can be done like this with SQL. I get no errors but I get nothing done either: <?php $dbname = 'cms'; $dbmaster = 'cmsms'; $db1 = mysql_connect('localhost', 'root', 'secret'); if (!$db1) { echo 'Could not connect to ...

PHP include/require a different extension file as .php

I have a .js file with code compatible for both php and js languages. The file is read and edited by php and then fetched by JS. so the extension is JS, is there any way that i can require this file in my php script and the file may execute normally as a require/include would work on a .php file. I dont want to Eval the file contents in...

PHP possible to lock downloaded content?

Hi There, I am currently working on a project that will work on a membership system. The theory behind the website is that you can download electronic (PDF) versions of a magazine, if you are a paying member of the website. The problem arises in that after downloading the PDF it can be sent to anyone and accessed by anyone. Is ther...

PHP: Why isn't it possible to extend more than one class?

I've faced a situation when I want to extend two parent classes, but php does not allow this. Why I can't extend more than one class, but can implement more than one interface. What's wrong with extending many classes? It seemed to me like a pretty obvious thing, until I got parse errors. Is it a bad practice? If so, what are the alterna...

PHP/PostGres regexp to match only if a word in the string has 2 or more capitals, and only has letters

This seems like a simple expression, but all of my tinkering has failed in one place or another. I am pulling data out of a PostgreSQL database. I would rather filter in PostgreSQL, but if I need to do it in PHP that is fine too. The column will have a string, and I need to search for matches where any word (defined by spaces) has two...

$.post() jQuery and PHP

Hello! Here is a piece of code : $username="anant"; $name="ana"; echo $username; echo $name; Now if using jquery $.post() i want to retrieve $username and $name ,how would I do it ? Thanks! ...

Is something wrong with my down counting in php and javascript?

Hi. I have a function in my game that you only can use every 2 min. So I have this code $next = strtotime ("+2 minutes"); This function to check if 2 minutes has passed: if(time() <= $next){ Here I find the time when you can do the function again: date( "00:i:s", $next - time()) What I need is the number of seconds until you can...

[zend 1.10.8] custom router using database items

I am using a custom Router to enable pages like: mytutorialsite.com/category/:categoryname # added to application.ini resources.router.routes.categorynameOnCategory.route = /category/:categoryname resources.router.routes.categorynameOnCategory.defaults.module = default resources.router.routes.categorynameOnCategory.defaults.controller ...