Dropbox Api

Posted: January 8, 2013 in Uncategorized

stdClass Object
[hash] => f92bfa39d10c75c3913ddc7a603e8ce4
[thumb_exists] =>
[bytes] => 0
[path] => /
[is_dir] => 1
[size] => 0 bytes
[root] => dropbox
[contents] => Array
[0] => stdClass Object
[revision] => 6
[rev] => 60ce1f030
[thumb_exists] =>
[bytes] => 249159
[modified] => Mon, 07 Jan 2013 06:57:24 +0000
[client_mtime] => Mon, 07 Jan 2013 06:57:24 +0000
[path] => /Getting Started.pdf
[is_dir] =>
[icon] => page_white_acrobat
[root] => dropbox
[mime_type] => application/pdf
[size] => 243.3 KB

[1] => stdClass Object
[revision] => 1
[rev] => 10ce1f030
[thumb_exists] =>
[bytes] => 0
[modified] => Mon, 07 Jan 2013 06:57:24 +0000
[path] => /Photos
[is_dir] => 1
[icon] => folder_photos
[root] => dropbox
[size] => 0 bytes



CI – Htaccess

Posted: August 29, 2012 in Uncategorized

RewriteEngine On
RewriteBase /epub_validator

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#’system’ can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn’t in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename ‘application’ to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn’t true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

# If we don’t have mod_rewrite installed, all 404’s
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php


Posted: August 12, 2012 in Uncategorized



Posted: June 26, 2012 in Uncategorized

1) Difference between PHP4 and PHP5
2) In PHP5 if we use PHP4 type and PHP5 type constructor, which will be called
3) How to call destructor in PHP4
4) What are design patterns in PHP
5) Write a singleton class
6) Write code for autosuggest/autocomplete
7) How to get string literal from array with and without for loop
8) CSS selectors
9) What is important in CSS
10) Doc types in HTML
11) Steps to be taken for developing Web-Service
12) How to access web service via CURL
13) How to prevent SQL Injection (PDO)
14) How to prevent Session hijacking.

2) What are different MySQL Engine
3) What the difference between MyISAM and InnoDB
4) What the data structure behind these DB Engines.
5) Write down the standard HTML Doc (Semantic HTML).
6) Create 3 cols Layout with header and footer (Detail Q&A for the layout)
7) How to give different font size on mouse over and mouse out
8) What are different methods for adding event to elements
9) How to find child of DOM
10) Create a function using JS which will capitalize the first letter of string. This should be access like this str.Capitalize()
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);


Posted: June 26, 2012 in Uncategorized

1) Explain Semantic HTML with example
2) CSS selectors? Explain with example
3) CSS Grouping
4) What is z-index
5) Float property
6) CSS precedence order
7) What are the different ways to apply style in a document? Which is the best approach? Why?
8) What is media property in css?
9) How to map an image and how to place one image on top of that mapping?(Like Weather image on top of each state in India map)
10) What is Ajax?
11) What is the different type of Ajax responses?
12) How to parse JSON object?
13) Is JavaScript an object Oriented language?
14) How to declare public and private variables in JS?
15) How to create JS class?
16) How to create Objects in JS?
17) What is prototype?
18) How to inherit class using prototype in JS?
19) Design an interface with 3 tabs?
20) Difference between visibility: hidden and display: none
21) Difference of Include and require in php? Which is the preferred method?
22) File upload process in php?
23) What is abstract class and interface?
24) What is singleton pattern? How to write singleton pattern?
25) What is class constructor? How to write?
26) What is subclass in php?
27) How call parent constructor from subclass?
28) Write one sql query and find second largest score from one table.
29) Gave one scenario and asked me to write queries using group by and order by
30) What is left join?
31) Write query to list employee name and his manager from the following table using query.
EmpID Employee ManagerID
5 Ram 2
6 Raj 5
7 Dan 6
8 Afsal 5
9 Sunil 8
10 John 7
11 Deepak 5

1) Write code to get sorted unique values from the array
Example Array: 5,3,5,98,34,2,3,……….n
(I tried bubble sort algorithm, but they asked me to try different sorting algorithm)
2) Design one shopping cart project.
a. They asked me to draw high level architecture diagram and explain each module.
b. They took one module and asked me to explain the implementation approach.
c. How to secure user credential while passing from client to server.
3) In which scenario GET method is preferable.
4) Difference between POST and GET
5) Explain the latest project. What was the approach and role?
6) Is https a statefull protocol? How to maintain state?


Posted: June 26, 2012 in Uncategorized

2.Have you worked on php4 and php5.Difference between php4 and php5 in detail.
3.When uploading a image file,how to restrict for duplicate enry.
4.Explain destructors in php4.How to call the function automatically.
5.what are the different types of selectors and which one has highest priority.
6.The process of web page.
7.What are the web optimization techniques.(give server side in detail).
8.What are the design patterns you have used.write a program on singleton pattern.
9.Write the regexpression to extract the string between paragraph–“

some text

10. what you know about webservices.what the protocols supported by CURL.
11.If you are downloading a file, how do you check that the file is downloaded or not?
12.A table has userid and the corresponding records. you want to insert promocode column with 6000 records to that table.how would you do that.
13.Difference between MYISAM and INNOBDB engines.
14. what you know about sql_injection?what are the ways to prevent other than mysql_real_escape _string,htmlentities,htmlspecialcharacters,addslashes,stripslashes.
Ans is thu PDO in php we can prevent sql_injection.

Dictionary using curl

Posted: February 17, 2012 in PHP


$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec ($ch);
curl_close ($ch); Read the rest of this entry »