<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?>

PC Services PC SERVICES

June 10, 2011

Hit Counter with images

Filed under: PHP — Tags: — admin @ 11:09 am

This is a image counter which is put in a page simply by using the
IMG tag in html. You don’t have to change the htm or html extension of your page to php.

  • Need create a database and table “counter” in mySQL database server.

CREATE TABLE `yourdatabasename`.`counter` (
`ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`counter`INTEGER (9) NOT NULL default ‘0′,
PRIMARY KEY (`ID`)
);

UPDATE `yourdatabasename`.`counter` SET counter=0;

  • Create a folder under root of your web server call “counter” .
  • Feel free to use my script below (have to remove these “//” at begin of the lines ) and save as login.php into a folder call “counter”.

//<?php //login.php
//
// /**
// * @author PCS-PC
// * @copyright 2011
// */
//
//$db_hostname = ‘your database hostname’;
//$db_database = ‘your database name’;
//$db_username = ‘your database username’;
//$db_password = ‘your database password’;
//
//?>

  • Feel free to use my script below (have to remove these “//” at begin of the lines ) and save as counter.php into a folder call “counter”  .

//<?php //counter.php
//
// /**
// * @author PCS-PC
// * @copyright 2011
// */
//
//require_once ‘login.php’;
//$tbl_name = “counter”; //Table name
//
//
//$digit_dir = “./iphone”;
//$min_width = 5;
//$lifetime = 30;
//$domain = www.your_domain;
//$trigger = 1000;
//
//// Connect to server and select database.
//$db_server = mysql_connect($db_hostname, $db_username, $db_password);
//
//if (!$db_server)
//    die(“cannot connect to server:
//” . mysql_error());
//
//mysql_select_db($db_database)
//or die(“Unable to select database: ”
//.mysql_error());
//
//$sql = “SELECT * FROM $tbl_name”;
//$result = mysql_query($sql);
//
//if (!$result)
//    die(“Databasse access failed: ” . mysql_error());
//
//$rows = mysql_fetch_array($result);
//$count = $rows['counter'];
//
//// if have no counter value set counter = 1
//if (!($count))
//{
//    $count = 1;
//    $sql1 = “INSERT INTO $tbl_name(counter) VALUES(‘$count’)”;
//    $result1 = mysql_query($sql1);
//}
//
//
//if (!isset($_COOKIE['counter']))
//{
//    $count++;
//    $sql2 = “update $tbl_name set counter=’$count’”;
//    $result2 = mysql_query($sql2);
//    mysql_close();
//    setcookie(“counter”, “dummy”, time() + 60 * 60 * 24 * $lifetime, $domain);
//}
//
//$len = strlen(strval($count));
//if ($len > $min_width)
//    $width = $len;
//else
//    $width = $min_width;
//
//
//
//
//// Check image type (gif or png)
//if (!file_exists(“$digit_dir/0.gif”) && !file_exists(“$digit_dir/0.png”))
//{
//    die(“No images in digit-dir”);
//}
//if (!file_exists(“$digit_dir/0.gif”))
//{
//    //proceed_png();
//    $d0 = ImageCreateFrompng(“$digit_dir/0.png”);
//
//
//    $dx = ImageSX($d0);
//    $dy = ImageSY($d0);
//
//    $img = ImageCreateTrueColor($width * $dx, $dy);
//    ImageDestroy($d0);
//
//    $xoff = $width * $dx;
//    while ($xoff > 0)
//    {
//        $digit = $count % 10;
//        $count = $count / 10;
//
//        $temp = ImageCreateFrompng(“$digit_dir/$digit.png”);
//        $xoff = $xoff – $dx;
//        ImageCopyResized($img, $temp, $xoff, 0, 0, 0, $dx, $dy, $dx, $dy);
//        ImageDestroy($temp);
//    }
//
//    Header(“Content-type: image/png”);
//    Imagepng($img);
//    ImageDestroy($img);
//
//} else
//{
//    //proceed_gif();
//    $d0 = ImageCreateFromgif(“$digit_dir/0.gif”);
//
//    $dx = ImageSX($d0);
//    $dy = ImageSY($d0);
//
//    $img = ImageCreateTrueColor($width * $dx, $dy);
//    ImageDestroy($d0);
//
//    $xoff = $width * $dx;
//    while ($xoff > 0)
//    {
//        $digit = $count % 10;
//        $count = $count / 10;
//
//        $temp = ImageCreateFromgif(“$digit_dir/$digit.gif”);
//        $xoff = $xoff – $dx;
//        ImageCopyResized($img, $temp, $xoff, 0, 0, 0, $dx, $dy, $dx, $dy);
//        ImageDestroy($temp);
//    }
//
//
//    Header(“Content-type: image/gif”);
//    Imagegif($img);
//    ImageDestroy($img);
//}
//
//
//?>

  • Feel free to use my counter images  iphone or design them  ( they can be .gif or .png) by yourself and place them into folder “iphone” under “counter” folder .
  • On your home page wherever you like to display the Hit Counter enter the code as below (have to remove these “//” at begin of the lines):

//<p>
//        <img src=”counter/counter.php” alt=”counter” border=”0″ />
//</p>

  • Save your home page and upload all files to your web server and enjoy.

July 10, 2010

Unlock iPhone 3GS with 3.1.3

Filed under: IPHONE — admin @ 4:37 pm

You can unlock your iphone 3GS with 3.1.3 firm ware by follow the instruction:

  • Open the Cydia by touch Cydia icon as picture below

  • Select Manage as below

 

  • Select Sources to open the screen as below

  • Select Edit button to show the screen as below

  • Select Add Source button to return to the screen as below

  • Select repo666.ultrasn0w.com

  • Select ultrasn0w and select install button to install the ultrasn0w. After finish install Ultrasn0w then you can test your Iphone 3Gs by insert other carrier Sim card such as T-mobile in US market

March 22, 2010

3G Iphone Baseband 05.12.01 downgrade to 04.26.08

Filed under: IPHONE — admin @ 3:08 am

The following procedure will only help to downgrade iPhone 3G which is currently on iPhone OS 3.1.3 with 05.12.01 baseband and older bootloader 05.08. This won’t work with iPhone 3GS.

Here is howto check your bootloader by going to Cydia and search for Fuzzyband. When you see the Fuzzyband you can download and install. When finished run Fuzzyband from your iPhone and you can see your bootloader version

As you see my bootloader version is 5.08

If your iPhone meets the above condition, you can then use the lattest version of Fuzzyband which supports iPhone 3.1.3 to downgrade your 05.12.01 baseband to the older 04.26.08. After you have downgraded your baseband, you can then use ultrasn0w to unlock your iPhone on iPhone 3.1.3 firmware. Here’s the instruction.

  1. To downgrade your baseband from 05.12.01 to 04.26.08, you must first jailbreak your iPhone 3G running firmware 3.1.3 by using redsn0w 0.9.4, sn0wbreeze for Windows users.
  2. After you have jailbroken your iPhone, Go to “Cydia” on your iPhone and Search for “Fuzzyband” and then install this application.
  3. Start “Fuzzyband” app and touch on “Downgrade” button to downgrade your Baseband from 05.12.01 to 04.26.08.
  4. You should now be able to perfectly unlock your iPhone 3G using the latest version of ultrasn0w that can get from Cydia. For those of you who don’t know your bootloader, simply run Fuzzyband and it will report the version number for you.

March 20, 2010

Jailbreak iPhone 3G 3.1.3 with RedSn0w 0.9

Filed under: IPHONE — admin @ 10:14 am

This guide and tutorial will show you how to jailbreak your iPhone 2G, 3G running OS 3.1.3 using RedSn0w 0.9.

If you are new to the whole jailbreaking thing, I really suggest you read this information about RedSn0w 0.9.3. It will tell you everything you need to know about RedSn0w before starting.

I know that some of you won’t bother reading the more info link about RedSn0w 0.9 so here is probably the most important information about this jailbreak:

If you have a late-model iPhone 3GS, or if you have aniPod touch 2G whose serial number begins with “MC”, you can use redsn0wto jailbreak but you are currently restricted to “tethered” rebooting.That means you need to connect your device to a computer
to complete the boot after a reset. Also, these devices cannot have custom logos.

redsn0w will ask you whether or not you fit in this category when used with the iPhone 3GS or iPod touch 2G. Ifyou have a late-model device and don’t give redsn0w the correct answer,you will likely need to do a system restore to recover from the mistake.

To do a tethered boot after your late-model device resets for somereason, either run redsn0w again and select “Just boot tethered rightnow”, or run blackra1n.

This RedSn0w tutorial was written for Windows but I assume the steps are identical for a Mac.

Step 1: Download RedSn0w 0.9 for Mac or PC as well as the correct 3.1.3 firmware for your iPhone from here. To make things easy, save those 2 files on your desktop.

Step 2: Make sure you have the latest version ofiTunes installed on your computer, then restore your iPhone to thelatest firmware 3.1.3. Restoring is the preferred way to go about it assimply updating could cause issues later on.

Step 3: Launch RedSn0w and browse for the 3.1.3 firmware you downloaded to your computer in Step 1.

Step 4: RedSn0w will automatically check if you chose the right firmware (IPSW). It will then patch the file.

Step 5: You will now have the option to “InstallCydia” as well as “Custom boot logo” and “Custom recovery logo”. Forthe purpose of this tutorial, I suggest you only choose “Install Cydia”.

Step 6: Make sure your iPhone is plugged to yourcomputer. RedSn0w will now dictate you a few steps to have your iPhoneenter DFU mode. Follow the onscreen instructions very carefully.

Step 7: Your iPhone will reboot when successfully jailbroken.

Congratulations! You just jailbroke your iPhone using RedSn0w 0.9. If you want to unlock your iPhone 3G, simply install UltraSn0w from Cydia.

Any question or concern, please feel free to ask in the comment section below. Happy jailbreak.

Prestons Computer Services – All Rights Reserved

IPhone 3GS model Issue

Filed under: IPHONE — admin @ 9:23 am

IPhone 3GS model start with “MC” on the part number (this part number display on the container box) got problem with Blackrain. Sn0wbreeze 3.1.3 has been released which can jailbreak iPhone 2G, 3G and IPHONE 3GS on the latest 3.1.3 firmware. One thing which is to be noted here is that it will work with iPhone 3GS only if it has the older bootrom (non-MC model).

Note for iPhone 3G and 3GS Users (New Bootroms): We strongly suggest that you stay away from this official upgrade until and unless the DevTeam releases new jailbreaking and unlocking tools for 3.1.3 firmware.

Prestons Computer Services – All Rights Reserved

March 15, 2010

Put your iPhone in Recovery mode

Filed under: IPHONE — admin @ 2:47 am
  1. Turn the device completely off and disconnect it from cable/dock.
  2. Hold down the home button.
  3. While holding down the home button connect to a computer with a cable (easiest) or dock.
  4. Keep holding down the home button until you see a connect-to-iTunes screen You are now in recovery mode.

Prestons Computer Services – All Rights Reserved

Prestons Computer Services