Tuesday, July 2, 2013

Admin Panel : Download wordpress adminimize plugin



Adminimize is a WordPress plugin that lets you hide 'unnecessary' items from the WordPress. 

This Plugin can do the below task.
  1. the admin theme can be set per user. To change this go to user settings
  2. currently you can use the theme together with the color settings for the Fresh and Classic themes
  3. more colors can be easily added
  4. new menu structure: on the left hand site you find classic menu points for managing and writing, while the right part is reserved for settings, design, plugins and user settings
  5. the dashboard has been moved into the menu itself but this can be deactivated if its not desired
  6. the menu is now smaller and takes up less space
  7. the WRITE menu has been changed as follows:
  8. it is no longer limited to a fixed width but flows to fill your whole browser window now
  9. you can scroll all input fields now, no need to make certain parts of the WRITE screen bigger
  10. categories moved to the sidebar
  11. tags moved to the sidebar if you are not using the plugin "Simple Tags"
  12. the editing part gets auto-scrolled which makes sense when using a small resolution
  13. the media uploader now uses the whole screen width
  14. supports the plugin "Admin Drop Down Menu" - when the plugin is active the user has two more backend-themes to chose from
  15. supports the plugin "Lighter Menus" - when that plugin is active the user has another two backend-themes to chose from
  16. two new color schemes are now available
  17. the width of the sidebar is changeable to standard, 300px, 400px or 30%
  18. each meta field can now be deactivated (per user setting) so it doesn't clutter up your write screen
  19. you can even deactivate other parts like h2, messages or the info in the sidebar
  20. the part of the user info you have on the upper - right part of your menu can be deactivated or just the log-out link
  21. the dashboard can be completely removed from the backend
  22. all menu and sub menu points can be completely deactivated for admins and non-admins
  23. most of these changes are only loaded when needed - i.e. only in the write screen
  24. set a backend-theme for difficult user
  25. you can set an role to view the areas on link page, edit post, edit page and global
  26. you can add own options for set rights to role
  27. it is possible to disable HTML-Editor on edit-area, only Visual-tab
  28. remove widgets in widgets settings for different role
  29. remove admin bar for different role
  30. remove admin bar items for different role
  31. remove items on custom post types for different role

For Download This Plugin : Click here 

LoginRadius : Social Login and Share


LoginRadius provides effective single social login api, social sharing plugins and free registration software. It allows visitors to easily connect with your site.

LoginRadius For Social Login :

  • yahoo
  • google
  • facebook
  • linkdin
  • twitter
  • myspace
  • etc...
LoginRadius PHP SDK is a development kit that lets you integrate Social Login such as Facebook, Google, Twitter and over 20 more on a PHP website.
 
It also provide social login as well as social sharing for all programming script and opensource like joomla,wordpress,magento,drupal etc.
 
for demo click here :  Demo
for Login In LoginRadius : Click here
Developer Api : View

Display Fancy Date Format for Wordpress Post

Hello Friends,

 Today we learn how how to convert seconds into a fancy format.that is done by a Simple Php Function to convert Seconds into human readable format like month,day,hour,minutes.This function used in anywhere like wordpress,joomla,magento or simple php script.
 first you have to provide a second in function.

Example code :

$seconds=137267; 
function seconds2human($ss) 

  $s = $ss%60;
  $m = floor(($ss%3600)/60);
  $h = floor(($ss%86400)/3600);
  $d = floor(($ss%2592000)/86400);
  //$M = floor($ss/2592000);
  return "$d days, $h hours, $m minutes, $s seconds";
}

echo seconds2human($seconds);

//output : 1 days, 14 hours, 7 minutes, 47 seconds



Monday, June 24, 2013

Get Web Browser Height and Width by Javascript

Get the Browser height and width using javascript.you can provide dynamic width or height of any element by using javascript.

 See the example for it :

<html>
<head>
<script>
function getload()
{
var all=document.body.offsetWidth;
var final=all-1000;
document.getElementById('test').style.width=final+"px";
}
</script>
</head>
<body onload="getload()">
<div id="test" style="border:1px solid blue;">hello
</div>
</dody>
</html>


here get the document body width it provide the current document width by browser resolution. 



Thursday, June 6, 2013

Free Codecanyon - Jquery Smart Alert Popup

Smart Alert aims to replace standard dumb alert with fully configurable alternative, while maintaining its ease of use.Jquery and css base stylish fancy popup or fancy alert box.



Smart Alert Functionality :
- Easy to user
- Three Creative Styles
- Crossbrowser
- Fully themeable
- Fully configurable
- Localization Support
- Retina Ready
- Compatible with every Layout

For download Source code : Click Here


 

Themeforest : Photomin - Responsive HTML Template


Free download Themeforest Photomin - Responsive HTML Template.
Photomin is the perfect responsive template designed in a clean and minimalistic style. This template is very flexible, easy for customizing and well documented, approaches for personal and professional use. Photomin has been coded in HTML & CSS3 and jQuery.

Template Features :

  • Awesome Camera Slider
  • Filterable Portfolio
  • 2 Porfolio Layouts with Pretty Hover Effects
    • 4 Columns
    • 3 Columns
  • Unique Blog Style
  • Blog Post Formats (image, gallery, video, audio, link, aside, quote)
  • jQuery Powered
  • Cool CSS3 Features
  • Responsive Layout
Free Download Templates : Click Here

Wednesday, June 5, 2013

File Download using Codeigniter Framework

 Download File using Codeigniter Framework is very easy.for download any file or document by Codeigniter use Codeigniter " Download Helper ".


First you have to load this helper in you controller class.i will you how to do this.just see the below code or step.

Load Helper :
$this->load->helper('download');

User Function of Helper : force_download('filename', 'data')

Parameter :
filename = filepath or filename
data=put data into file or apply new filename

Example :
$data = 'Here is some text!';
$name = 'mytext.txt';

force_download($name, $data); 



 

Tuesday, June 4, 2013

File Upload by Codeigniter Framework

Codeigniter File Upload Class provide Many Settings.You can set various preferences, restricting the type and size of the files.
  • Allow Type
  • Max Height
  • Max Width
  • Max Size
  • Validation
  • etc...

Creating the Upload Form

Using a text editor, create a form called upload_form.php. In it, place this code and save it to your applications/views/ folder:

The Success Page

Using a text editor, create a form called upload_success.php. In it, place this code and save it to your applications/views/ folder:

The Controller

Using a text editor, create a controller called upload.php. In it, place this code and save it to your applications/controllers/ folder:

The Upload Folder

You'll need a destination folder for your uploaded images. Create a folder at the root of your CodeIgniter installation called uploads and set its file permissions to 777.

Redirect with Timer in PHP Script

Hello Friends,


Today we learn about how to redirect or refresh or reload page using php function.
Its very easy to do this just one php function and nothing else.I show you how to do this task.Here We use Php Header function for page redirect.



Example :
Syntax : header ('Refresh:time; URL=http://your website url');

Like below........
header('Refresh: 10; URL=http://yoursite.com/page.php');

Top 10 SEO Companies in India

Hello Friends ,

We Provide the list of  top 10 SEO(Search Engine Optimization) companies in india.




Sno Search Engine Name
1
Indazo Solutions
2
SEOValley Solutions Private Limited
3
PageTraffic
4
SeoTonic Web Solutions Private Ltd.
5
Outsource SEO
6
Profit By Search
7
SEO Novus
8
SEO Peace
9
Samyak Online Services Pvt. Ltd.
10
AdLift

List of Top 10 Search Engines in the World

Top 10 Search Engine In the world as below : 


Sno Search Engine Name
1 Google
2 Yahoo
3 Bing
4 Ask
5 Teoma
6 Duck Duck Go
7 EntireWeb
8 Blekko
9 Srub The Web
10 GigaBlast

Tuesday, May 28, 2013

SEO Tips & Tricks

Hi Friends,
Today we learn about Seo Marketing and how to increase our website rank.Here some for getting the best way to popular your website by seo.

Some Rules For SEO :

(1)Title Tags & Meta Description
Title tags & meta description are extremely important for SEO, not just because the search engine spider gives them big attention, but also because search engine users do the same. The average person will usually pick the most attractive result among the first 3, so to get your webpage a better CTR, make sure to follow these points:

    Make an Eye-Catching title & description: Remember that the average user will choose the most eye-caching title and description among the first 3 results!
    Include your main keyword: This is repeated everywhere because it’s really important. Make sure to include your primary keyword in the title and also in description, but also don’t write it more than once on each(twice maximum if you had to).
    Limit title to 65 characters: Though the limit in Google is 69 characters, other search engines like Yahoo shows only the first 65 characters and cut the rest, so try to aim for a 65-characters title or less.
    Limit description to 160 characters: For the same reason above, also limiting your meta description to 160 characters is important for a better SEO and a better CTR.
    Title structure: Put your webpage title at first, then put your brand name. Just like WizIMS do, for example “All On-Page SEO Tips | WizIMS”

(2) Alt Tags

Another important thing you can do to show Google’s spider that your content is related to the desired keyword(s), is by adding alt tags to your images. Make sure to put your primary keyword in one alt tag, and it’s even better to include your secondary keywords in the other images alts.

Pay attention : Do NOT over use this with the same keyword. Putting the same keyword in all your images in the same page may rise a red flag to Google, so make sure to put different keywords for each image.

If possible, it’s even better if you put an alt tag which actually explains the image. Because they can bring you targeted visitors via Google images. (If your image is unrelated to the alt tag, people won’t click it in the Google images for the specific keyword, and it’ll just drop in the SERPs).

So bottom line, if it’s possible to add an alt tag which is both a keyword and an explanation of the image, then go ahead and add it. (It’s fine to have 3-4 words alt tags).

How to add the alt tag to images ?

For those who don’t know how to add an alt tag to the image, here’s an example:

alt=”Internet Marketing”>

(3) Headings (H1 / H2)

headings h1 h6

Another important factor for your on-site SEO is how you use the headings. Again, you want to show Google what are the keywords your page is about (primary keywords), and what also can be found in your webpage content (secondary keywords).

To do this, put your primary keyword(s) in the H1 tag- e.g.
Buy Online Shoes

and try to include your secondary keywords in the H2 tags- e.g.
Buy Cheap Shoes Online

Make sure not to do this in a spammy way because it’ll just look suspicious to search engines and crappy to your readers, so put efforts to make it look good for both humans and spiders.

(4) Keyword Density

keyword density

Most people think that the more they throw their keyword in their article the better it is for SEO, and that’s totally wrong.

If you repeat your keyword(s) too often, it will just annoy your users and raise a red flag to the search engines. But in the other hand you should mention you keyword(s) in the article when it’s suitable so that search engines could at least know what your webpage is about.

To make this balance, make sure to have the keyword density in your webpage between 3% to 8%.

(5) Keywords’ Similarities

It’s obvious that Google can recognize the keyword’s synonyms, slangs, and different forms of the word.

For example, if you search the keyword “Bf”, the first 2 results talk about Battlefield:

bf keyword

Or, if you Google for example the keyword Shop, the first result includes doesn’t even have the word “Shop”, it has another form of the word (“Shopping”).

(6) Internal Linking (Interlinking)

internal linking interlinking

It is essential to make it easy for search engine’s spider to travel in your website pages and find them easily. The best way to do that is to have a sitemap along with strong internal links inside your webpages. This will make it easy for spider to visit all of your website pages, and shows it that it is also easy for the users to travel among your website.

Internal linking means to link your website pages together. When I link to Tools, this is one example of an internal link.

In WordPress and other CMS, the classic structure makes this easier for you (Check for example WizIMS internal links).

This hasn’t to be over-done, just make sure it’s easy for the user to travel among your website, and Google will give you the credit.

(7) Sitemap

For the same purpose that we use interlinking, the sitemap helps the search engine’s spider to crawl all of your webpages easily by showing them all the pages URLs in upfront.

The sitemap also tells the spiders how often each of your webpages gets updated, and how important each one is. According to my experience, for new sites, spiders won’t really believe what your sitemap claims (about update frequency and pages priority), therefore it is important to put real values in the sitemap so you can gain the spider’s trust in the long run.

How to make a sitemap?

For those who don’t know how to make a sitemap:

1) Generate a new sitemap to your website using a sitemap generator.

2) Download the file that you’ve made, and rename it to sitemap.xml

3) Upload sitemap.xml to your root domain (e.g. http://wizims.com/sitemap.xml)

*It’s even better if you submit your sitemap to Google webmaster tools if you have one.

*For WordPress users, it’s much easier to use the Google sitemap generator plugin.

(8) Quality External Links

You want to show Google that you honestly want to share quality related content with your users. One of the ways to do that, is by linking to another websites.

When I say external links, I don’t mean linking to weak websites and/or your same Class C IP websites as that can just harm your SEO.

In other words, when you have the opportunity to link to a website, do that. Just make sure that the webpage you are linking to is authority (high PR), and related to your content.

Please pay attention to the following before adding the external link(s) :

    Try to link to related webpages, ones that have your keywords.
    Try to link to webpages with High PR only (PR 4+).
    Link to authority websites only (Wikipedia is ideal).
    It’s okay to  have do-follow external links if the sites you are linking to are trusted by Google.

Also make sure to ignore the following :

    Don’t link to a competitor webpage – Search your target keyword in Google and make sure the webpage you are linking to isn’t in the top 20.
    Don’t link to your websites – Google can easily track that, so make sure to link to external webpages only.

(9) Robots.txt File

robots.txt importance picture

With the content you put in the “robots.txt” file, you can tell the search engine’s robots (spiders) to or not to crawl specific webpages in your website.

I recommend upload the “robots.txt” file even if you want to have all of your webpages indexed, just to show Google that you are serious here :) , and in this case, here is what you should put in the “robots.txt” file:

User-agent: *
Disallow: /

Sitemap: http://YourWebsite.com/sitemap.xml

If you want, just copy and paste this to a “robots.txt” file and upload it to your website root (e.g. “wizims.com/robots.txt”).

If you want a custom one, you can simply make it with a robots.txt generator.

(10) SEO-Friendly URLs

Another great way to show Google that your page’s content is relevant to the desired keyword, is by including your keyword in your URL.

If your keyword is a combination of 2 or more words,I find it better to separate the words dashes (“-”).

An example of a perfect URL, in case we are targeting the keyword “Skin Care” :

http://wizims.com/skin-care

This will also attract the users in search engines, as they will see part of your URL in bold when they search for your desired keyword.

Another important thing, if possible, is to include your main keyword in the domain name (e.g.SkinCareOnline.com), this will give your website a big advantage over your competitors.

(11) Content is the WizIMS

Replaced “King” with “WizIMS”, just a lame joke.

Again, I know this is repeated everywhere, but there is a reason for that..

Having a quality, unique and relevant content on your webpage is one of the most crucial on-site SEO factors. Before writing your webpage’s content, pay attention to the following :

    Don’t fill your webpage with plain text; both visitors and Google would love to see pictures and other stuff in the webpage.
    If possible, aim for at least 500 words in each webpage. You can check your word count using ourword counter.
    Include your keyword when it’s suitable, just don’t do that too much, your keyword density should range between 5% and 8%.
    Try to focus on your grammar and spelling. Google can easily recognize grammar and spelling mistakes, and for that, it can underestimate your website authority.
    Needless to say, avoid duplicate content. Google will hate you for that.
    Try to avoid putting the same content on different pages of your website.

(12) Google Adsense

It might sounds weird and unfamiliar, but think again please, what is the main goal of all companies? Growth and money of course. Google can bring huge amount of money and growth to Google Adsense just by “preferring” websites with Adsense on.

Some people might disagree with me, claiming that “A big, respected company like Google won’t harm it’s search quality for money”. But the thing is, I’m not saying that you’ll beat Wikipedia simply putting Adsense on, I’m just assuming that Google “prefers” the website with Adsense on, totally logic.

(13) 404 Pages

Sooner or later, the search engine spider will get to a page on your website that doesn’t exist. You don’t want to have a dead-end page that just shows the error and leads nowhere.

To fix this, you can either redirect all of your 404 pages to your homepage, or to have some links in the 404 page that points to your categories and/or most important pages.


Magento: Get User Details

We will see how we can get details of logged in customer in Magento.
You can use below code snippet in any model, controller or phtml file.

Example code :


  1. // Retrieve Session Object
  2. $session = Mage::getSingleton(‘customer/session’);
  3.  
  4. // Check if user is logged in or not.
  5. if($session->gt;isLoggedIn()) 
  6. {
  7.    $customer = $session->gt;getCustomer();
  8.    
  9.    // Get Customer ID
  10.    echo $customer->gt;getID();
  11.  
  12.    // Get Customer Name
  13.    echo $customer->gt;getName();
  14.    
  15. }

Magento - Get Payment Method name using Order ID

Hello friends,

we will see how how we can get Payment Method name using the Magento Order ID.

Get Payment Method name using Order ID

$order = new Mage_Sales_Model_Order();

 $order_id = ’00000001′;

$order->gt;loadByIncrementId($order_id);

$payment_method = $order->gt;getPayment()->gt;getMethodInstance()->gt;getTitle();

Themeforest-Skywalker - Powerful Template for Joomla!

 Themeforest-Skywalker - Powerful Template for Joomla!

Skywalker template comes with real Quickstart Installation Pack for Joomla! 2.5 and is a unique template, with consistent typography, no one million colors or unlimited features, just simple to use features packed up and ready for you!.

Special Feature: K2 Content Component

It is my great pleasure to update the template with K2 Content Component Full Support. Skywalker template is the first template on Temeforest to support K2 on Joomla 2.5.
  • Beautiful template overrides with great respect for content hierarchy.
  • Typographically perfect design.
  • All modules, pages redesigned from ground up.
  • Ready for Joomla! 2.5

Main Features

  • Unique, XHTML valid and typographically consistent design.
  • Skitter Slider the best javascript based slider for Joomla!.
  • K2 Content Component used for the Blog Page.
  • GK News Show Pro with awesome styling.
  • Ajax search with awesome styling.
  • The Piecemaker 2 – my own extension, the smartest out there.
  • DNP Tabs – my own smart tabs module for Joomla!, light and very easy to use.
  • Simple Blank Module – my own extension for using custom code snipets.
  • Google Maps Plugin support.
  • Custom Form Elements – another unique feature powered by CSS3 & jQuery, to add more style to your checkboxes, radio boxes and select elements.
  • DNP White Social Icons – Custom Social Icons to match the template design.
  • Link Cooltips – hovering links the titles look great finally.
  • 8 styles based on beautiful colors: turquoise blue, green, orange, yellow, red, purple, magenta, grey.
  • Fullscreen Background Images with AJAX load.
  • Custom error and offline pages.
  • Beautiful CSS3 powered typography with price tables, bubbles, blockquotes, lists and everything you need for your content.
  • 30+ Module Positions on 3 very flexible desktop layouts.
  • jQuery 1.7 minimized included & running in “no-conflict” mode for various template features and your code snipets.
  • Mobile Ready Layouts – reforged of course – demo here
  • Smooth scroll to top – a unique feature that can be used to create navigation for one page website.
  • A new Tools top panel jQuery powered easy to customize for your needs.
  • Various code snipets with the Joomla! 2.5 Quickstart
  • Automatic Adjustments to enhance template typography
  • Complete Documentation
  • Forum Support
  • That’s it ?!
Not realy.. a detailed features list is available on the demo site here.
For download this theme click here : Download templates

Skitter Slider 3.0 Features

  • Friendly Administration Panel: now you can do everything inside the module, without having to do XML editing.
  • SEO Friendly: the new built in functions fixes images links automatically.
  • Multi-slide: for each slide you can set 3 animations, one for the main image, and 2 more sequences.
  • Progress bar with all possible positioning presets.
  • Play/pause button with all possible positioning presets.
  • Various navigation options (menu, dots, thumbs) with all possible positioning presets.
  • Slide preview for dots navigation.
  • Keyboard Keys Navigation.
  • XML load capability for more than 10 slides or more than 1kb slides content.
  • 38+ animation types for slide image.
  • CSS3 animations for slide content with randomize options.
  • 8 animation types for slide descriptions.
  • Stops on mouse hover.
  • Stops on window focus out to save CPU power UNIQUE.
  • Unlike others, this baby is cross browser compatible, does not crash on window resize and really is the best!

Monday, May 27, 2013

Codecanyon - PHP WebServer with WebSockets Upgrade Script

 Codecanyon

This item is a suite of PHP classes that define a HTTP web server with WebSockets upgrade possibility. It runs in PHP CLI, and you can do everything you want with it thanks to the low-end access of HTTP protocol.


PHP Web Server + WebSockets Upgrade :
  • OOP Based
  • Fully Customizable
  • HTML5 Websockets
  • Low-End Http access
  • Easy to Integrate with another PHP Process

Tuesday, April 23, 2013

Get started with CodeIgniter Framework

A Fully Baked PHP Framework. CodeIgniter is a proven, agile & open PHP web application framework with a small footprint.

How It Works

CodeIgniter uses the MVC or Model View Controller architectural pattern, if your not familiar with MVC it is a logical object orientated development approach. below we look at a simple example of how we use the MVC.

Controllers

A controller is simply a class file that is named in a way that can be associated with a URI. For example if i have a controller with the filename account.php the URI to reach that page would be something like http://your-domain.com/account/ so you no longer need to fiddle with the .htaccess file and mod_rewrite to enable SEO friendly URI’s. The controller is the top level file for each page that allows you to include database requests in the form of ‘Models’ and templates as ‘Views’. below is an example of a controller, This code would be saved in the file blog.php, it’s important to understand the naming convensions because the name of the file is always the name of the class with the first letter capitalised. Within the Blog class we have an index() function which is always loaded when the page is excecuted. For example if we had another function lets say ‘categories’ the code within that function would only be executed if we visited http://your-domain.com/blog/categories/ this is also the way you can pass url parameters into functions but we’ll leave that for another day. We’re loading our ‘View’ in at the bottom and passing the array $data into it. Within the view file which would be called blogview.php if we wanted to echo the heading we’d simply echo $heading the same with the title. With the to do list we would need to setup a for each loop to cycle through the results in that array.
class Blog extends Controller {
 
    function index()
    {
        $data['todo_list'] = array('Clean House','Run Errands');
        $data['title'] = 'My Real Title';
        $data['heading'] = 'My Real Heading';
 
        $this->load->view('blogview', $data);
    }
}

Models

As yet we’re not using a model, this is because our controller isn’t doing anything complex. If we wanted to connect to a database and get a set of results we would use a model which could look like the below. This is all the code we need to pull 10 results from the database which would be returned to the controller in an array. note that you would need to replace ‘tableName’ with your own database table name.

class Blogmodel extends Model {
 
    function Blogmodel()
    {
        // Call the Model constructor
        parent::Model();
    }
 
    function get_last_ten_entries()
    {
        $query = $this->db->get('tableName', 10);
        return $query->result();
    }
 
}
 
To include the model firstly you need to navigate to system/application/config/database.php and add your database connection details. then below you’ll see that i’ve modified the controller that we used earlier so it now connects to the database and gets our data. This will then be sent through to the ‘view’.

Views

Simply put a ‘View’ is our template, it’s where our data gets rendered and is made pretty, you can have as many views as you like and pass whatever data you like into them it’s probably a good idea to have a header, main content area and footer.

For Download Codeigniter : Click here

Monday, April 22, 2013

Get Facebook Profile Image By Php

Hi Friends,

Today We Learn About How Upload or Get Facebook Profile image to local server or anywhere you wish.
here we use facebook graph api and facebook sdk to do this task.so please first you have to download FACEBOOK SDK from here Click .After downloading sdk create one facebook application for doing this task login to your facebook account after login your facebook account it print your all details.in this detail also contain your profile image link. Here the question is how to get image link? but is easy by json and file function.

Just create link or url like " $img="https://graph.facebook.com/$user/picture?redirect=false; ".
$user variable contain your facebook id then all these data add to the file_get_contents($img) function then it decode by json like $jd=json_decode($images); and get image url from json like $url=$jd->data->url; and then apply image upload code.this code is used to upload image wia url.

Example Code :

//Get file name by json
     $img="https://graph.facebook.com/$user/picture?redirect=false";   
    $images=file_get_contents($img);
    $jd=json_decode($images);
    $url=$jd->data->url;

   
//create file name;
$name = basename($url);
list($txt, $ext) = explode(".", $name);
$name = $txt.time();
$name = $name.".".$ext;

 
//file upload
$upload = file_put_contents("uploads/$name",file_get_contents($url));

Thursday, April 18, 2013

Display Breadcrumbs on Website using PHP Script

Hi Friends,
You have a fully dynamic site it’s useful to show the user where they are by breaking down the URL structure so they can navigate backwards through the site.

Breadcrumbs on website using PHP Script

 Breadcrumbs is used to navigate your dynamic website.
its show where you are. 
just put this below code in your files and see your the magic.
 Example code:
$path_parts = pathinfo($_SERVER['REQUEST_URI']);
$filename=explode("?",$path_parts['basename']);
echo " ".$path_parts['dirname'].'/'.$filename[0];

Check Internet Connection is On or Off using Php

Hello Friends,
Today we learn About how to Check Internet Connection is On or Off using Php script is very interesting.Lets see the php magic.

Check Internet is On or Off Using Php

Here we can use fsockopen php function.
in this function contain below parameter.
1)hostname : provide the hostname like :www.google.com
2)port     : add port number like : 80
3)errno    : error number generate by itself.
4)errstr   : display error message when connection fail.
5)timeout  : The connection timeout, in seconds.
example :
if(!$sock= @fsockopen('www.google.com',80,$num,$error,5))
echo "Off line";
else
echo "ok";