php

PHP: line charts

I can manage to build a line chart like in pic 1, but would like to know how to build one like in pic 2. I need the graph to be filled with color (like in pic 2). How would I do that? ...

I am receiving output if i "ALERT" some text else i didn't receive any o/p while using ajax with javascript and jquery

Hi all, I am receiving a different type of error in my application. In my project most of the functionality are in ajax. Now my prob is if i "ALERT" something i am receiving the output. Else i am not. I am totally confused with this issue and don't have any idea to solve it. What will be the solution? Any answers will be helpful and ...

Encrypt Data using Public Key

$key = file_get_contents('http://keyserver.pramberger.at/pks/lookup?op=get&search=uid'); after getting public key in '$key' variable i need to encrypt the data using this public key. the key must be start with ----Begin pgp block ---to end pgp block----. How this can be done in php? ...

Why session_start is needed when using session?

Why I can use setcookie without any preparation while need a session_start() before using $_SESSION?And I think works they do are similar. ...

How to count html tags and contents

Hi! I have a problem with regular expressions! How can i count html tags with regex? ...

Do static methods affect the size of a php object?

If I have a class called myclass does having static methods within the class affect its size in memory? class myclass{ public $instancevar; public static function method1(){} public static function method2(){} } Will the addition of more static methods make instances of myclass larger? I know that static methods are shared between in...

PHP CSV upload files

hi, I have asked a question regarding updating a csv file's contents to the db @Question Now I want to add this functionality, like my db will contain url to images that are stored on a prespecified folder on the server. The csv files will contain the urls as to where these images reside on the client side. Now when I click an upload ...

jquery tabs with form help

Hello, I am implementing jQuery tabs on mysite, one of the tabs holds a form and this is my problem, the form is loaded in via ajax as it is used multiple time throughout the site. My issue is that when the form is submitted the page leaves the tabbed area, whereas I need to stay within the tabbed system. Below is the code I am using ...

Allowed memory size of 33554432 bytes exhausted (tried to allocate 93 bytes) error in php

I inserted the following code: $counter = 1; while($_POST['additional_contact1'] != '' || $_POST['additional_contact2'] != '' || $_POST['additional_contact3'] != '') { if($_POST['additional_contact' . $counter] != '') { $_SESSION['contact'][$counter]['additional_contact'] = $_POST['additional_contact' . $counter]; $_SESSION['c...

what difference between NULL, blank and empty in php?

i have one form which have some input box and some select box. i want to apply that nothing can be empty or blank before further activity, so i use below condition foreach($_POST as $k=>$v) { if($v=='' || $v==NULL || empty($v)) { $_SESSION['errMsg']=' Please fill all the fields properly'; header("loc...

Can't upload from my php form to google docs - getting error...

Hi guys I'm building a form that uploads documents to my google docs account however its not working I keep getting an error - the following is my code; $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($username, $pww, $service); $docs = new Zend_Gdata_Docs($client); $newDocumentEntry = $do...

how to code a PHP function who will check whether the mode of Apache is on safemode or not ?

how to code a PHP function who will check whether the mode of Apache is on safemode or not ? ...

How to turn off default HTTP status code errors in Zend Server?

Every time I return some status code in my PHP code, Zend Server gives me following error appended on the bottom of my website (with the message of HTTP code I returned). So for example, if I return 401, it gives me another 401 error appended to my 401 page: Is there any way to turn it off? I use Zend Server Community Edition 5.0 with...

equivalent method of gnupg.GPG and gpg.import_keys(pub_key).summary() in php

gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True) print "Import the Key :", gpg.import_keys(pub_key).summary() this two lines of code gives me public key exract which i further used in encryption. i need to get the equivalent metods in php . ...

JanRain PHP OpenID: How to check if a provider supports AX programmatically?

Ok, my problem is that some providers support SREG and some support only AX I need to know how it is that I can request from the provider which methods they support.. I tried looking through the documentation here http://openidenabled.com/files/php-openid/docs/2.1.3/ but I didn't see anything. ...

Filter list of phone numbers using php

I have a list of phone numbers that start with the below numbers and in different formats...i need to grab the numbers that start only with the below numbers/format using php...... 020 8 07974 +44 (0) 20 +44 0 440203 any help will be appreciated.. ...

php paging class

Can anyone recommend a good PHP paging class? I have searched google, but have not seen anything that matches my requirements. Rather than "rolling my own" (and almost surely reinventing the wheel), I decided to check in here first. First some background: I am developing a website using Symfony 1.3.2 with Propel ORM on Ubuntu 9.10. I ...

PHP - While loop

print "<ul>"; foreach ($arr as $value) { echo("<li>" . $value[storeid] . " " . ($value[dvdstock] + $value[vhsstock]) . "</li>"); } print "</ul>"; Will output •2 20 •2 10 •1 20 •1 20 •1 10 I was wondering how I would adapt this loop so it outputs the total values for each &value[storeid] •1 50 •2 30 Thanks very much :) ...

.htaccess for hiding url details

Options +FollowSymlinks RewriteEngine on RewriteRule ^WR-(.*)\.html$ WR.php?act=show i have created .htaccess file to rewrite WR.php?act=show to .html extension and save this file in a folder where my source file are residing. but it is not working can anybody help me please.... ...

Apache .htaccess: ErrorDocument and RewriteEngine not working together

Please take a look at the following .htaccess ErrorDocument 404 /404/ RewriteEngine On RewriteRule (.*) index.php [L] With this setup, I am using header('HTTP/1.1 404 Not Found'); in PHP to redirect to the error handling page and send the appropriate HTTP status code. The correct 404 status code is sent, but the browser shows a blank...