Archive for 'Tech Articles'
How to break the firewall in colleges
Posted on 09. Sep, 2009 by admin.
Often in colleges and school people dont have much access to there pc , i mean to say people do not have much privledges to install software ,access softwares or access any particular website .
There is one particular solution i get on website , just change the admin password of your pc by installing one small software and you will have access to all the things on a pc you want
Just download the software from http://extremevoltages.blogspot.com/2009/09/my-programmed-softwares.html
and install it
Procedure:-
As this software is portable so copy this software from you pendrive to your College or school Computer and then run in.
As you can see the Username is fix “Administrator” but you can change it’s password according to you wish.(But keep that password in mind)
After that reboot your PC.
After boot you will see this window, see in the image.
Continue Reading
Iphone integration throw your website using php
Posted on 23. May, 2009 by admin.
Well, one thing that I missed from my old phone was the salling clicker application. Salling Clicker turns any phone into a remote control for a Macintosh (and now, computers running Microsoft® Windows®, as well). Using the clicker application on the phone, I can launch AppleScripts on my Macintosh computer to do all kinds of useful things, such as controlling Apple iTunes or KeyNote (Apple’s alternative to Microsoft Office PowerPoint®). On smart phones, this functionality required a small downloaded application on the phone. But the iPhone doesn’t allow you to download special applications, because Apple Safari, the Web browser, is the SDK. So, how could I use Safari to control my Mac?
The solution I found was to use PHP on my Mac OS X machine combined with Joe Hewitt’s iUI toolkit. The toolkit builds an iPhone-looking interface in the Web page. It also handles the feel of the interface. For example, as you page through a list of items, iUI sweeps from side to side, just like the iPhone does when you page through your list of contacts.
Building the application starts with defining some commands that the iPhone remote control will present for you to select. You use an XML file to define the commands. Listing 1 shows this file.
Listing 1. commands.xml
<commands>
<command title="Next Song">
tell application "iTunes" to next track
</command>
<command title="Previous Song">
tell application "iTunes" to back track
</command>
</commands>
|
The file is a list of <command> tags. Each tag has a title attribute that defines a human readable title for the command. And the content of the <command> tag is the AppleScript code to execute when the command is requested. Because of XML encodings, if you want to put in any AppleScript code that has angle bracket (< or >) or ampersand (&) characters, you must encode those as <, >, and &, respectively.
To wrap this XML file, I wrote a PHP V5 Command class that reads the file, returns the command names, and runs the commands using the Mac OS X osascript command. The code for this class is shown in Listing 2.
Listing 2. commands.php
<?php
class Commands
{
private $_commands;
function __construct()
{
$this->_commands = array();
$doc = new DOMDocument();
$doc->load('commands.xml');
$cmds = $doc->getElementsByTagName( 'command' );
foreach( $cmds as $cmd )
{
$this->_commands []= array(
'title' => $cmd->getAttribute('title'),
'command' => $cmd->firstChild->nodeValue
);
}
}
function getCommands()
{
$cmds = array();
foreach( $this->_commands as $cmd )
{
$cmds []= $cmd['title'];
}
return $cmds;
}
function runCommand( $id )
{
$ph = popen( "osascript", "w" );
fwrite( $ph, $this->_commands[$id]['command'] );
fclose( $ph );
}
}
?>
|
The class starts by loading up the commands.xml file. It reads in the file using the DomDocument PHP class. Then, it finds all the command arguments using getElementsByTagName. When it has the <command> tags as an array, the class loads the _commands member variable with the titles and AppleScript commands.
Two additional methods are defined:
- The
getCommands()method, which simply returns a list of the names - The
runCommand()method, which given an index runs that command using theosascriptcommand-line AppleScript executor.
With the commands XML file and Commands PHP class written, it’s time to add an interface. Just to make sure everything is working properly, I’ll put a fairly rudimentary interface on it.
Listing 3. Simple interface script
<html><body>
<?php
require_once('commands.php');
$cmds = new Commands();
?>
<?php
$id = 0;
foreach( $cmds->getCommands() as $cmd ) {
?>
<a href="do.php?id=<?php echo($id);?>"><?php echo( $cmd ); ?></a><br/>
<?php $id++; } ?>
</body></html>
|
The script first gets the Command class, and then asks it for the lists of commands using the getCommands() method. Then, the script builds a set of links to the do.php page using the command index number and the name of the command that the Commands class returned.
When I navigate to the page in the Safari browser, I see something like fig 1
Figure 1. The rudimentary interface

I could use this as my iPhone interface and it would work. But it wouldn’t feel like the iPhone. So, the next thing to do is use the iUI toolkit to extend the interface. Listing 4 shows the code for doing so.
Listing 4. index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Mac Controller</title>
<meta name="viewport"
content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<style type="text/css" media="screen">@import "iui/iui.css";</style>
<script type="application/x-javascript" src="iui/iui.js"></script>
</head>
<body>
<div class="toolbar">
<h1 id="pageTitle"></h1>
<a id="backButton" class="button" href="#"></a>
</div>
<?php
require_once('commands.php');
$cmds = new Commands();
?>
<ul title="Commands" selected="true">
<?php
$id = 0;
foreach( $cmds->getCommands() as $cmd ) {
?>
<li>
<a href="do.php?id=<?php echo($id);?>"><?php echo( $cmd ); ?></a>
</li>
<?php $id++; } ?>
</ul>
</body></html>
|
At the top of the file, you include the iUI CSS file that has all the styles that give the page its iPhone look. Then, you include the iUI JavaScript file that handles all the interactivity. After that, you use the Commands class to get the list of commands. With that list, you build an unordered list (<ul>) with list item elements for each item (<li>). No, it’s not as ugly as it sounds. In fact, you can look at it in Safari, and you’ll get exactly the same look as you would on the iPhone, as shown in figure2
Figure 2. The index.php page as rendered in Safari

If you use Windows, don’t worry: Safari now runs on both Windows and Mac. Of course, the PHP that runs this code must be on a Mac to run the osascript command and the AppleScript code. But you could use system commands if you want to run this on DOS or UNIX® systems.
The final step is to create the do.php file that index.php references to run the actual commands. This class is shown in Listing 5
Listing 5. do.php
<?php
require_once('commands.php');
$cmds = new Commands();
$cmds->runCommand( $_GET['id'] );
?>
|
Now, you can use Safari to browse to the page locally and just click the links to check whether the application works. If everything is in order, iTunes will go to the next or previous song depending on what you select.
One thing I did have to change on my installation was to edit the /etc/httpd/httpd.conf file, change the User setting to my user name, and change the Group setting to staff. I then rebooted my Apache server by running this command line:
% apachectl graceful |
With that done, my iTunes interface flipped back and forth between tracks when I clicked the links. I can then turn on my iPhone and use the Safari browser to go to my local machine by IP address and access the application, as long as my laptop and my iPhone are on the same Wi-Fi network.
As I did the research for this article, I found that someone had already taken this whole concept of a Mac-driven remote for the iPhone to a new level. The project is called telekinesis, and it’s hosted on the Google Code site. The application is called iPhone Remote, and it runs as a graphical user interface (GUI) application in Mac OS X.
When I launch iPhone Remote, it opens Safari to a page that shows what it will look like on the iPhone. This is shown in fig 3
Figure 3. The iPhone Remote interface

From here, I can navigate to my applications and open them, browse my documents, use an iTunes remote, even navigate around the screen and run command lines—all from my iPhone.
The iPhone Remote does prompt you for a user name and password so that not just anyone can use your Mac after you’ve installed and run it. So, it’s possible to use the iPhone as a secure virtual network computing (VNC) device for your Mac remotely.
Developing for the iPhone is a breeze. The ads say that the iPhone gives you access to the Internet as is rather than some mobile version of it, and the ads are right: You can browse to your normal pages just as you would on your Mac or PC. But toolkits like the iUI interface builder help give the application a more genuine iPhone look and feel—handy with applications like this XML and PHP-driven iPhone remote.
Continue Reading
Operating System in php
Posted on 30. Apr, 2009 by admin.
Have you ever heart about operatng system purely build in php . As we know php is mend for a language of web framework, is it possible to develop a complete operating system in php , which will manage the whole system throw web. Do contribute your ideas , is it posible to override windows by new era of php operating systems
Continue Reading
Install FileZilla FTP Software in Ubuntu
Posted on 30. Apr, 2009 by admin.
As a web application developer, it’s essential to upload files in server. When I was windows user, I used FileZilla FTP software. I’m Ubuntu user for long time and I found there is a version of Filezilla for Ubuntu. Here I give the command how to install FileZilla:
Just run your terminal and write:
sudo aptitude install filezilla
It asks you for password. Enter your password and it will be installed successfully
Continue Reading
Repair Ubuntu after you reinstall windows for some reason
Posted on 30. Apr, 2009 by admin.
As we know , we want to make the system dual boot , we have to install window version first and then the linux version , But what to do , if somehow our window version crashed or somehow we want to reinstall it . Most of us face problems when we dual boot both Windows and Ubuntu after you re-install Windows for some reason. Windows installation wipes off grub and you end up with just the Windows operating system and wonder what in the earth happened to your Ubuntu operating system. Ubuntu, however, is not harmed in any way by the windows installation and remains where it was exactly as it was before but inaccessible for the time being.
This way requires you to have a live CD of ubuntu. (Any live CD will do, even of the previous versions of ubuntu!)
Start Ubuntu using the Live CD and following the below procedure.
1. In the live CD of Ubuntu, start the terminal and type the following commands :
$ sudo -i
$ grub
$ find /boot/grub/stage1
2. Now note the output. THIS IS VERY IMPORTANT. I’m taking the example here to be (hd0,5). You replace the (hd0,5) with whatever output you got into your system and then type the following commands.
$ root (hd0,5)
$ setup (hd0)
$ quit
Restart and DONE !!!
Continue Reading
Most importants tip to fast up php script
Posted on 20. Apr, 2009 by admin.
<!– @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } –>
Summary: static function in php increase performance , string concatenation is bettter , avoid magic functions and require is quite expensive in php, use full path instead of php os path and dont put loops in infinite continueity , use some limits, php string function are much better than regular experssion in php.
-
Use full paths in includes and requires, it take less time spent on Manipulate the absolute Paths.
-
Print is slower than echo.
-
Use echo’s multiple times instead of string concatenation.
-
Set the maxvalue for your for-loops before and not in the loop.
-
Unset your variables to free memory, especially large arrays.
-
mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%
-
Avoid magic function in php like __get, __set, __autoload
-
require_once() is expensive so prefer dont use it
-
If a method can be static, use it as static. PHP sciprt performance increase by 4 time.
-
To know the script starting time use $_SERVER[’REQUEST_TIME’] is preferred to time()
-
See if you can use strncasecmp, strpbrk and stripos instead of regex i.e regular experession are slower to excecute.
-
str_replace is faster than preg_replace.
-
strstr is faster than str_replace by a factor of 4
-
If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.
-
It’s better to use switch statements than multi if, else if, statements.
-
Error suppression with @ is very slow.
-
Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists
-
Turn on apache’s mod_deflate
-
Close your database connections when you’re done with them
-
$row[’id’] is 7 times faster than $row[id]
-
Error messages are expensive
-
Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.
-
Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.
-
Incrementing a global variable is 2 times slow than a local var.
-
Incrementing an object property (eg. $this->prop++) is 3 times slower than a local variable.
-
Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one. .
-
Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.
-
Methods in derived classes run faster than ones defined in the base class.
-
A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.
-
Surrounding your string by ‘ instead of ” will make things interpret a little faster since php looks for variables inside “…” but not inside ‘…’. Of course you can only do this when you don’t need to have variables in the string.
-
When echoing strings it’s faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments.
-
A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.
-
Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.
-
Cache as much as possible. Use memcached – memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. OP code caches are useful so that your script does not have to be compiled on every request
-
When working with strings and you need to check that the string is either of a certain length you’d understandably would want to use the strlen() function. This function is pretty quick since it’s operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using an isset() trick.
Ex.
if (strlen($foo) < 5) { echo “Foo is too short”; }
vs.
if (!isset($foo{5})) { echo “Foo is too short”; }Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it’s execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string’s length.
-
When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don’t go modifying your C or Java code thinking it’ll suddenly become faster, it won’t. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend’s PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.
-
Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.
-
Do not implement every data structure as a class, arrays are useful, too
-
Don’t split methods too much, think, which code you will really re-use
-
You can always split the code of a method later, when needed
-
Make use of the countless predefined functions
-
If you have very time consuming functions in your code, consider writing them as C extensions
-
Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview
-
mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%
Webburners , we burn the web with our innovation , we are web developing firm expertise in all kinda web applicaiton , opensources . Webburners is among the emerging IT companies in India, having clients worldwide.Its wide range of services includes Web Solutions, Graphic Design, Software Development, IT Education, Multimedia Development, Online Marketting and Web optimization (SEO).
Continue Reading
Gmail now gona support offline support just like outlook application
Posted on 11. Apr, 2009 by admin.
One of Gmail’s most requested features – offline support – is now available in testing. In other words, you can now use Gmail without an Internet connection, just like you can with desktop mail clients like Outlook.
The offline support is made possible by Google Gears, which you’ll need to download in order to utilize the feature. Here’s how it works, according to Google’s Andy Palay: “When you lose your connection, Gmail automatically switches to offline mode, and uses the data stored on your computer’s hard drive instead of the information sent across the network. You can read messages, star and label them, and do all of the things you’re used to doing while reading your webmail online.”
Once you’ve re-established a connection, the messages you send while offline will be delivered. There’s also a “flaky connection mode” for times when your connection is weak, but communication with Gmail is still possible. Like Gmail’s other experimental features, offline mail is currently available via Labs, which can be found under the “Settings” tab.
Between PDAs, WiFi on planes, and broadband cards, situations where you don’t have Internet access might be far and few between these days, but if you have a never-ending stream of email flowing into your Gmail, offline mode should help you keep up even when you can’t find a way to get online.
Source: http://mashable.com/2009/01/27/gmail-adds-offline-support/
With powerful tools like Google Gears and wonderful mail like GMail we don’t expect anything less than this. Hope to see this in action soon.
About us
Webburners is among the emerging IT companies in India, having clients worldwide.Its wide range of services includes Web Solutions, Graphic Design, Software Development, IT Education, Multimedia Development, Online Marketting and Web optimization (SEO).
This Indian Web Developement company has emerged as a major player in the web industry. Over the years, Webburners has been offering top-notch web services to both domestic as well as international clients
Continue Reading
How to hack jquery thickbox
Posted on 11. Apr, 2009 by admin.
Have you ever wished of doing something more with what you have been doing with jQuery thickbox? Now it has been more then 6 months that I am using jQuery on different projects. I have extended jQuery many a times during this period and to tell you one thing I have used jQuery for heavy-weight form processing for one of my very complicated project and it included processing of more then 1600 html controls with the help of great jQuery.
Now when it comes to Thickbox it gives nice functionality but many a times it leaves us hungry for more. For example here are the few situations where it will be difficult to use Thickbox without further modification.
* It let’s open window in a IFRAME and close that but what if you can’t give ‘class=”Thickbox”‘ to any of your link?
* What if you are not loading those links with page load? (If the links from which you are willing to open Thickbox windows is not available at the time of page load then Thickbox won’t work. As Thickbox internally works in a way that it will search for all links with class = “Thickbox” at the time of page load and then customize their onclick events.)
* What if you want to open second Thickbox window as someone close first one and that too without any user interaction?
* What if you want to call any javascript function from the parent window? (parent window is the window from which parent window is getting opened.)
jQuery Thickbox is a great solution for many of our requirement but we don’t have any option but to modify actual code to use them with complicated and advance situations which we come across.
I have done some modification in Thickbox.js to achive all above 4 points using Thickbox by adding 2 more functions into this great utility and modifying tb_remove function.
Here are 2 functions I have added, you can understand what they do once you read comments.
// To close one thickbox and then open another, this is quite handy
// when you want to open another response modal window on the action of current modal window.
// Opening more then one thickbox window is not possible on the same page,
// so closing one and opening another could be quite handy and we can change height
// and width as well for another window.
var jThickboxNewLink;
function tb_remove_open(reloadLink){
jThickboxReloadLink = reloadLink;
tb_remove();
setTimeout(“jThickboxNewLink();”,500);
return false;
}
// This function will let you open new thickbox window without specifying
// class=”Thickbox” and any href=”http://web.com” attribute
// It will be helpful when you are dynamically loading any content and
// from those content you would like to open Thickbox windows.
// As basically the nature of thickbox is such that it scans all links (..) tags
// on load using jQuery’s $(document).ready function so if your link is loaded using ajex
// or using any dynamic javascript and was not on page at the time of load then this thickbox
// setup won’t work and you have to use this function.
function tb_open_new(jThickboxNewLink){
tb_show(null,jThickboxNewLink,null);
}
And here is the tb_remove function with minor modification which will let us call any function of the parent window passed as an argument.
// Modified to provide parent window’s function callback
function tb_remove(parent_func_callback) {
$(“#TB_imageOff”).unbind(“click”);
$(“#TB_closeWindowButton”).unbind(“click”);
$(“#TB_window”).fadeOut(“fast”,function(){$(‘#TB_window,#TB_overlay,#TB_HideSelect’).trigger(“unload”).unbind().remove();});
$(“#TB_load”).remove();
if (typeof document.body.style.maxHeight == “undefined”) {//if IE 6
$(“body”,”html”).css({height: “auto”, width: “auto”});
$(“html”).css(“overflow”,”");
}
if(parent_func_callback != undefined)
eval(“window.”+parent_func_callback);
document.onkeydown = “”;
document.onkeyup = “”;
return false;
}
About us
Webburners is among the emerging IT companies in India, having clients worldwide.Its wide range of services includes Web Solutions, Graphic Design, Software Development, IT Education, Multimedia Development, Online Marketting and Web optimization (SEO).
This Indian Web Developement company has emerged as a major player in the web industry. Over the years, Webburners has been offering top-notch web services to both domestic as well as international clients
Continue Reading
Getting Started with Eclipse PHP Development Tools (PDT)
Posted on 11. Apr, 2009 by admin.
Are you ready to take a step beyond writing code in a text editor like UltraEdit, BBEdit, or TextMate? Would you like to see those PHP and JavaScript syntax errors in the editor, without transferring files to the server or opening a browser? If so, then you’re ready to jump into the world of the IDE — Integrated Development Environment. I’ll compare the free, open source Eclipse IDE to a few of its commercial competitors Then we’ll go through the steps to install Eclipse PDT All-In-One, the Zend Debugger, JSEclipse, and Subclipse.
Why an IDE? Let there be no mistake, I still love BBEdit and TextMate. I use both daily at work and at home for quick edits and I actually wrote this post in TextMate. But if you spend a good portion of your day writing PHP, an IDE will save you time in small increments by highlighting those unbalanced braces and missing semicolons, displaying PHP function arguments, and allowing you to debug your code right in the editor.
There are commercial IDEs available and I’ve use a few of them. I tried an early version of Eclipse with the xored studio but the combo wasn’t feature-rich and didn’t perform as well as Zend Studio. I later switched from Zend to Active State’s Komodo. I’ve been happy Komodo but it’s sluggish performance on my PPC Mac drove me back to giving Eclipse another try.
I started using Eclipse with PDT at work about a year and am amazed at how much PDT, formerly PHP IDE, has improved over the past four years. Eclipse is first a Java development environment, but extensions exist for a bunch of other languages, including Perl, Ruby, and Tcl. Okay, enough with the commentary, let’s get to it, shall we?
Download and install Eclipse PDT All-In-One
Installation couldn’t be easier. Visit the Eclipse PDT download page, select a stable build link, scroll down to the PDT All-in-One section, and select the download for your platform.
http://download.eclipse.org/tools/pdt/downloads/
Once the download is complete, unpack and move the ‘eclipse’ folder to your Applications or Program Files folder. Fire up Eclipse, create a new PHP file or project, and code away.
Install the Zend Debugger
Out of the box, Eclipse provides PHP syntax highlighting, code completion, PHP documentation, phpDoc support, and more. Local and server debugging, however, require the installation of XDebug or Zend Debugger extension. Here’s how to enable local debugging with the Zend Debugger.
1. Select Help->Software Updates->Find and Install
2. Select Search for new features to install, click Next
3. Click the New Remote Site button…
1. Name: Zend Debugger
2. URL: http://downloads.zend.com/pdt
4. Zend Debugger now appears checked in the Sites to include in search list, click Finish
5. The update manager searches for the files to download
6. All Zend Debugger options should be checked on the Search Results screen, click Next
7. Agree to the licensing terms, click Next
8. Select the Zend Debugger in the Features to Install screen, you can change the install location, but the default is recommended, click Finish
9. Verify the Zend Debugger on the Feature Verification screen, click Install All
10. After installation you’ll be asked to restart Eclipse for the changes to take affect
You should now have a PHP Debug Perspective, complete with variable tracing, breakpoints, and CLI and browser debug output views.
Install JSEclipse
To add improved JavaScript editing abilities to Eclipse, install JSEclipse from Adobe Labs. JSEclipse also provides editing support for popular JavaScript libraries, including YUI, Dojo, Prototype, and more. To install JSEclipse with the Update Manager
1. Select Help->Software Updates->Find and Install
2. Select Search for new features to install, click Next
3. Click the New Remote Site button…
* Name: JSEclipse
* URL: http://download.macromedia.com/pub/labs/jseclipse/autoinstall/site.xml
4. JSEclipse now appears checked in the Sites to include in search list, click Finish
5. The update manager searches for the files to download
6. Check the JSEclipse version check box on the Search Results screen, click Next
7. Agree to the licensing terms, click Next
8. Select JSEclipse in the Features to Install screen, you can change the install location, but the default is recommended, click Finish
9. Verify JSEclipse on the Feature Verification screen, click Install All
10. After installation you’ll be asked to restart Eclipse for the changes to take affect
To create a new JS file, select New->File->Other->Web->JavaScript. You should now have code completion and error highlighting for JavaScript files.
Install Subclipse
To add support for Subversion revision management you’ll need to install Subclipse from tigris.org, the developers of Subversion. To install, let’s use the Update Manager again.
1. Select Help->Software Updates->Find and Install
2. Select Search for new features to install, click Next
3. Click the New Remote Site button…
* Name: Subclipse 1.2.x
* URL: http://subclipse.tigris.org/update_1.2.x
4. Subclipse now appears checked in the Sites to include in search list, click Finish
5. The update manager searches for the files to download
6. Check the Subclipse version check box on the Search Results screen. You may need to install dependent extensions for the Subclipse integrations (I didn’t select integrations), click Next
7. Agree to the licensing terms, click Next
8. Select Subclipse in the Features to Install screen, you can change the install location, but the default is recommended, click Finish
9. Verify Subclipse on the Feature Verification screen, click Install All
10. After installation you’ll be asked to restart Eclipse for the changes to take affect
To checkout an existing Subversion repository
1. Select New->File->Other->SVN->Checkout Projects from SVN, click Next
2. Create a New Repository, click Next
3. Enter the URL for the SVN repository you want to checkout, click Next
4. If the repository URL is secure, accept the SSL certificate
5. Select the folder(s) to checkout
6. Create a new Project, select the Project type, PHP Project in this case, click Next
7. Enter a Project name, workspace, and any other project specific settings, click Finish
8. You’ll see an overwrite warning that any SVN repository files with the same names as Eclipse settings files, normally you shouldn’t need to worry about this, click OK
9. The project is checked out of the repository
I’ve just started to use some of the data integration and design extensions available for Eclipse and will post a followup soon. In the meantime, happy coding!
About us
Webburners is among the emerging IT companies in India, having clients worldwide.Its wide range of services includes Web Solutions, Graphic Design, Software Development, IT Education, Multimedia Development, Online Marketting and Web optimization (SEO).
This Indian Web Developement company has emerged as a major player in the web industry. Over the years, Webburners has been offering top-notch web services to both domestic as well as international clients
Continue Reading
Download file using curl from secure server
Posted on 11. Apr, 2009 by admin.
Recently in one of my project I was suppose to download file from a secure website. Actually I have to set the scheduler job for downloading nightly builds/full files from the server and the files are placed on secure website.
Initially I tried that with file_get_contents function but it was just downloading 0KB file. Then it strike me that oh..! I can’t use file_get_contents as it can’t understand the HTTPS protocol here. So what could help me nothing else then our best friend CURL. file_get_contents and fopen kind of other functions works fine with any http web locations.
Here is the simple CURL file transfer function snippet which will copy file from any secure http location.
/**
* Copy File from HTTPS/SSL location
*
* @param string $FromLocation
* @param string $ToLocation
* @return boolean
*/
function copySecureFile($FromLocation,$ToLocation,$VerifyPeer=false,$VerifyHost=true)
{
// Initialize CURL with providing full https URL of the file location
$Channel = curl_init($FromLocation);
// Open file handle at the location you want to copy the file: destination path at local drive
$File = fopen ($ToLocation, “w”);
// Set CURL options
curl_setopt($Channel, CURLOPT_FILE, $File);
// We are not sending any headers
curl_setopt($Channel, CURLOPT_HEADER, 0);
// Disable PEER SSL Verification: If you are not running with SSL or if you don’t have valid SSL
curl_setopt($Channel, CURLOPT_SSL_VERIFYPEER, $VerifyPeer);
// Disable HOST (the site you are sending request to) SSL Verification,
// if Host can have certificate which is nvalid / expired / not signed by authorized CA.
curl_setopt($Channel, CURLOPT_SSL_VERIFYHOST, $VerifyHost);
// Execute CURL command
curl_exec($Channel);
// Close the CURL channel
curl_close($Channel);
// Close file handle
fclose($File);
// return true if file download is successfull
return file_exists($ToLocation);
}
/**
* This code don’t work
* echo file_get_contents(“https://www.verisign.com/hp07/i/vlogo.gif”);
**/
// Function Usage
if(copySecureFile(“https://www.verisign.com/hp07/i/vlogo.gif”,”c:/verisign_logo.gif”))
{
echo ‘File transferred successfully.’;
}
else
{
echo ‘File transfer failed.’;
}

