php

PHP function generate UL LI

hi.. i'm referring this address for function olLiTree http://stackoverflow.com/questions/753853/php-function-that-creates-a-nested-ul-li i have this array $tree = array("A"=>array("B"=>array("C"=>"C","D"=>"D"),"E"=>array("F"=>"F","G"=>"G"))); but not able to use this function function olLiTree($tree) { echo '<ul>'; for...

login problem with ajax

i have created login page which sends ajax request to a php page for login verification. On that php page i m creating session, and sending response as per login verification. if user is authenticated i m redirecting it to home page from java script from where i send ajax. but on that homepage i cant get that session object... why? can u...

Is it possible to call API's from the provided url using curl

i hv to call API's from a given url in my code. I try to call url using curl. now i want to use APi's provided by this url in my code ...

Calculate time from timezones in php

Hai I have the system with employees having different timezones in their profile. I would like to show the date according to their timezones specified. The GMT time zone values are placed in the database. could you guys help me ...

exception 'Zend_Controller_Action_Exception' with message 'Action "index" does not exist and was not trapped in __call() ?

Anyone know what this error means? after googling I found a bunch of sites that appear to have the same error? thanks exception 'Zend_Controller_Action_Exception' with message 'Action "index" does not exist and was not trapped in __call()' in /usr/local/zend/apache2/htdocs/pintsy/lib/Zend/Controller/Action.php:485 Stack trace: #...

When I create PDF in PHP, how do I get the browser to render it correctly?

I have used following code to create a simple PDF file. It executes fine in browsers, but I am not able to get the PDF file. It gives me some output when I am running the code in the CLI; my doubt is where I specify the PDF's filename. <?php require('fpdf.php'); $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Ce...

how moodle save user quiz response in database?

how moodle1.9 save user attempt quiz result in database and which tables are updated when any quiz has been attempted by user? Please guide me. If possible please updated me, which functions are used to insert user quiz attempted data in moodle1.9 database? ...

Crystal Report in php

How I can create a crystal report in php kindly guide me so that I can make it possible. I have tried a lot of code and tutorials but un-usefull for me. I have tried $COM_Object = "CrystalReports12.ObjectFactory.1"; $my_report = "C:\Report2.rpt"; $ObjectFactory= New COM($COM_Object); $creport = $ObjectFactory->OpenReport("c:\report2.rp...

parse/collator for php

I'm pretty much a newbie at php (at the "install an app and try to tweak it a bit" stage). Is there a tool anywhere which can take a script which is spread over many files and show you all the code which is processed (for a given set of arguments passed to the script) in a single output? For example, I want to make a call to zen cart f...

how caching is implemented using PHP GD

I want to cache the images of my gallery. Generating images every pages load using GD uses a lot of memory, So I am planning to create a cache image for the images generated by php script done with GD. What will be the best thing to create cache? ...

Why my Google endpoint is always the same?

always: https://www.google.com/accounts/o8/ud i got wordpress openid ok. so i think is is just discovery phase got some probelms.. <?php $ch = curl_init(); $url = 'https://www.google.com/accounts/o8/id'; $url = $url.'?'; $url = $url.'openid.mode=checkid_setup'; $url = $url.'&openid.ns=http://specs.openid.net/auth/2.0'; $url = $u...

Youbi key Integration with php

Hi , I am finding a problem during the youbi key integration: $apiKey = $youbekeyvalue; //this value is coming from my form. $message = 'id=1234&otp='.$key.'';//key has been i am saving in the database for a particular user. $signature = hash_hmac('sha1', $message, $apiKey, TRUE); $signature = base64_encode($signature); $url ...

javascript form validation - positioning

Dear Masters! I have little snippet for validatin' my form. I need help to position the error messages, because now all message appear in the filed, so the user can't see it, and so its very annoying. $(document).ready(function() { jQuery.validator.addMethod("lettersonly", function(value, element) { return this.optional(element...

php method for key retrieval

Is there any equivalent php method to 'urllib.urlopen()' for retrieving the public key from any public key server ...

Utf-16BE to ISO-8859-1 in PHP

Hi, i need to convert a Utf-16BE in ISO-8859-1 in PHP (i'm not an expert in encoding so i don't know if Utf-16 and Utf-16BE are the same thing). I've read somewhere to use the mb_convert_encoding function but i haven't that function because i don't have the multibyte extension installed. So do you know an alternative method to do this? ...

Is there any free CMS for screen reader compatibility for admin?

Is there any free CMS to operate a small business website/blog with screen reader compatibility where a blind person can update the content and other things via CMS administration using screen reader software and keyboard? ...

Need to upload files to google docs from my application and store reference to the uploaded file...

Hi guys - I'm working on a basic google applications based system. Like I earlier defined I'm building a simple ordering system and to each order placed I attach a file or document. I would like to be able to set it such that whatever file I upload is uploaded into google docs and I somehow am able to maintain a reference to that file fr...

can't read XML via PHP

I can't find the reason, only see the following error message. Input is not proper UTF-8, indicate encoding ! Bytes: 0x00 0x5D 0x5D 0x3E the followings are my php code $reader2 = new XMLReader(); $reader2->XML($xmlstring); $user_data=""; while ($reader2->read()) { if ($reader2->name == "user_id" && $reader2->nodeType == XMLReade...

cURL + HTTP_POST, keep getting 500 error. Has no idea?

Okay, I want to make a HTTP_POST using cURL to a SSL site. I already imported the certificate to my server. This is my code: $url = "https://www.xxx.xxx"; $post = "";# all data that going to send $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); c...

Problem with Xpath PHP

Im tring to access some links through Google using xpath. The below does works fine and all the links are shown. $query = $xpath->evaluate("/html/body//a"); for ($x=0 ; $x < $query -> length; $x++) { $href=$query->item($x); $url=$href->getAttribute('href'); echo $url."<br>"; } But when ...