Thursday, November 10, 2011

How can track Ip address in php


Here with the help of APPs you can track the ip.
These details include Geographic location information (includes country, region/state, city, latitude, longitude and telephone area code.), 

<?php
 $ip=$_SERVER["REMOTE_ADDR"];
$handle = fopen("http://api.ipinfodb.com/v3/ip-city/?key=5b32848aa72361c4efdef63111d6e3d9247e076891f5248eec0a5be1208993e6&ip=".$ip, 'r');
$tt=fgets($handle, 4096);
echo '<br>';
list($statusCode, $statusMessage, $ipAddress,$countryCode,$countryName,$regionName,$cityName,$zipCode,$latitude,$longitude,$timeZone) = split(';', $tt);
echo "Ip-Address->".$ipAddress;
echo '<br>';
echo "Country Name->".$countryName;
echo '<br>';
echo "Country Code->".str_ireplace('-', '', $countryCode);
echo '<br>';
echo "City Name->".str_ireplace('-', '', $cityName);
fclose($handle);

Saturday, November 5, 2011

PHP script to delete thousands of jpgs


I seen this query on guru.com  but I can not do the  bit this project. But  I done this task.  
Client Requirement

Hi, my webcam is uploading .jpg files to my shared webhost and I need you to create and install a php script that will delete all .jpg files in the public_html/cams/ folder and subfolders. Because there are so many images the script must find and delete images in small batches so that it doesn't crash my shared server. It must be able to find and delete jpg images in all subfolders of the cams/ directory. ( I add new folders for new cams sometimes and I don't want to have to update the script each time I add a new subfolder with cam images ).

It should only delete .jpg files that have dates in them like:
cams/cable/2011-10-14_14-15-42.jpg

Solution :
I have solve your problem with the help of php script,
My  script delete  public_html/cams/ “ only .jpg file all file’s.
My  script delete  public_html/cams/ folder”  only .jpg file all file’s.
My  script delete  public_html/cams/ folder/sub-folder”  only .jpg file all file’s.
My Script go on (Work) 3 sub folders and increase many subfolder on clients demand.   


Friday, November 4, 2011

jQuery Roundabout

HTML is added into each box, when it moves to the back it doesn't scale correctly. It keeps the same size. Ideally I'd like it to scale to match, but not having much look.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head >
<title>
</title>
<link href="css/commonstyles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="scripts/jquery.min.js"></script>
    <script type="text/javascript" language="javascript" src="scripts/jquery-ui.min.js"></script>
    <script src="scripts/jquery.roundabout.js" type="text/javascript"></script>
    <script src="scripts/default.js" type="text/javascript"></script>
</head>
<body>
    <div>
            <div id="divTestimonialContainer">
            <ul id="TestimonialRoundAbout">
                <li>
                   <div><img src="commonimages/kp.jpg" alt="Kaiser Permanente" height="200" width="300" /></div>
                </li>
                <li>
                    <div><img src="commonimages/countrywide.jpg" alt="Countrywide Home Loans" height="200" width="300"  /></div>
                </li>
                
                <li>
                    <div><img src="commonimages/indianfantasyleague.jpg" alt="Indian Fantasy League" height="200" width="300"  />
                    </div>
                </li>
                <li>
                   <div><img src="commonimages/amgen.jpg" alt="Amgen" height="200" width="300"  /></div>
             
            </ul>
            </div>
    </div>
<script type="text/javascript">
//<![CDATA[
$(function() { Default();});//]]>
</script>
</body>
</html>
click to demo 

How to create xml file with php code

how to create xml file with php code

Here you learn create xml file with the help of php
<?php

$xml = new SimpleXMLElement("<?xml version='1.0' encoding='iso-8859-1'?><content/>");

$track = $xml->addChild('section');
$track->addAttribute('name','settings');

$item=$xml->addChild('item', 'true');
$item->addAttribute('name','textSelectable');

$item=$xml->addChild('item', 'gold');
$item->addAttribute('name','copyright');

$item=$xml->addChild('item', 'Silver');
$item->addAttribute('name','companyName');
$track = $xml->addChild('section');

?>

Monday, October 31, 2011

Nivo jQuery Slider


Nivo Slider is the world's most popular jQuery image slider, and it's completely free!

Current Features

  • 16 unique transition effects
  • Simple clean & valid markup
  • Loads of settings to tweak
  • Built in directional and control navigation
  • Supports linking images
  • HTML Captions
Code
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html >
<head>
    <title>Nivo Slider Demo</title>
    <link rel="stylesheet" href="../themes/default/default.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../themes/pascal/pascal.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../themes/orman/orman.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../nivo-slider.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
    <div id="wrapper">
        <div class="slider-wrapper theme-default">
            <div id="slider" class="nivoSlider">
                <img src="images/slider_photo2.jpg" alt="" width="800" height="300" />
                <img src="images/slider_photo3.jpg" alt="" title="This is an example of a caption" width="800" height="300" />
                <img src="images/slider_photo4.jpg" alt="" width="800" height="300" />
                <img src="images/slider_photo.jpg" alt="" title="#htmlcaption" width="800" height="300" />
            </div>
        </div>

    </div>
    <script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="../jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
</body>
</html>

click here to demo

Tuesday, October 4, 2011

How to Integrate facebook like button in your site.


How to Integrate facebook like button in your site.

In this article, I’m going to outline a few of the ways that you can add Facebook to your blog or website using widgets and buttons. These widgets and code snippets come from the Facebook collection of tools that you can use on any website you want.


You can add the Facebook Fan Box in just a few easy steps and by copy pasting few lines of JavaScript in your website. The code is readily available from your Facebook fan page – just click on Add Fan Box to your site underneath Promote this Page on your website section of your profile page.

Additional features like size of the box, including the stream of recent posts as well as a list of fans can also be customized. Like Box also allows the visitor to log in and become a fan directly from your web page as well.n

you can test it here.
URL is http://it-solution.in/like.php .

Saturday, October 1, 2011

How to get your blogs matter in your site.


How to get your blogs matter in your site. 

Suppose you have a blog and you post the data into this blog regularly. Now recently you  have created a new site and want to all the blog’s data show in your website in separate page or anyother location. So in this condition you need my code.

My code will show any blog’s data in your site. you can test it here.
In this url, I am showing my blog's data. If you need this code then drop an email to me.
My email id is jafarjan420@gmail.com