Mengurutkan 4 Bilangan Ascending dengan IF C++

Unknown Reply 8:07 PM
Berikut Source Codenya :

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,d,x;

printf("a : ");
scanf("%d",&a);

printf("b : ");
scanf("%d",&b);

printf("c : ");
scanf("%d",&c);

printf("d : ");
scanf("%d",&d);

if(b<a)
{
x=b;
b=a;
a=x;
}
if(c<a)
{
x=c;
c=a;
a=x;
}
if(d<a)
{
x=d;
d=a;
a=x;
}
if(c<b)
{
x=b;
b=c;
c=x;
}
if(d<a)
{
x=a;
a=d;
d=x;
}
if(d<b)
{
x=b;
b=d;
d=x;
}
if(d<c)
{
x=c;
c=d;
d=x;
}

printf("setelah diurutkan %d %d %d %d",a,b,c,d);

getch();
return 0;
}

String Manipulation Vb.Net

Unknown Reply 8:04 PM
The String class of the .NET framework provides many built-in methods to facilitate the comparison and manipulation of strings. It is now a trivial matter to get data about a string, or to create new strings by manipulating current strings. The Visual Basic .NET language also has inherent methods that duplicate many of these functionalities.

Types of String Manipulation Methods

In this section you will read about several different ways to analyze and manipulate your strings. Some of the methods are a part of the Visual Basic language, and others are inherent in the String class.
Visual Basic .NET methods are used as inherent functions of the language. They may be used without qualification in your code. The following example shows typical use of a Visual Basic .NET string-manipulation command:
Dim aString As String = "SomeString"
Dim bString As String
bString = Mid(aString, 3, 3)
In this example, the Mid function performs a direct operation on aString and assigns the value to bString.
You can also manipulate strings with the methods of the String class. There are two types of methods in String: shared methods and instance methods.
A shared method is a method that stems from the String class itself and does not require an instance of that class to work. These methods can be qualified with the name of the class (String) rather than with an instance of the String class. For example:
Dim aString As String
bString = String.Copy("A literal string")
In the preceding example, the String.Copy method is a static method, which acts upon an expression it is given and assigns the resulting value to bString.
Instance methods, by contrast, stem from a particular instance of String and must be qualified with the instance name. For example:
Dim aString As String = "A String"
Dim bString As String
bString = aString.SubString(2,6) ' bString = "String"
In this example, the SubString method is a method of the instance of String (that is, aString). It performs an operation on aString and assigns that value to bString.

Nothing and Strings

The Visual Basic runtime and the .NET Framework evaluate Nothing differently when it comes to strings. Consider the following example:
Dim MyString As String = "This is my string"
Dim stringLength As Integer
' Explicitly set the string to Nothing.
MyString = Nothing
' stringLength = 0
stringLength = Len(MyString)
' This line, however, causes an exception to be thrown.
stringLength = MyString.Length
The Visual Basic .NET runtime evaluates Nothing as an empty string; that is, "". The .NET Framework, however, does not, and will throw an exception whenever an attempt is made to perform a string operation on Nothing.

Comparing Strings

You can compare two strings by using the String.Compare method. This is a static, overloaded method of the base string class. In its most common form, this method can be used to directly compare two strings based on their alphabetical sort order. This is similar to the Visual Basic StrComp Function function. The following example illustrates how this method is used:
Dim myString As String = "Alphabetical"
Dim secondString As String = "Order"
Dim result As Integer
result = String.Compare (myString, secondString)
This method returns an integer that indicates the relationship between the two compared strings based on the sorting order. A positive value for the result indicates that the first string is greater than the second string. A negative result indicates the first string is smaller, and zero indicates equality between the strings. Any string, including an empty string, evaluates to greater than a null reference.
Additional overloads of the String.Compare method allow you to indicate whether or not to take case or culture formatting into account, and to compare substrings within the supplied strings. For more information on how to compare strings, see String.Compare Method. Related methods include String.CompareOrdinal Method and String.CompareTo Method.

Searching for Strings Within Your Strings

There are times when it is useful to have data about the characters in your string and the positions of those characters within your string. A string can be thought of as an array of characters (Char instances); you can retrieve a particular character by referencing the index of that character through the Chars property. For example:
Dim myString As String = "ABCDE"
Dim myChar As Char
myChar = myString.Chars(3) ' myChar = "D"
You can use the String.IndexOf method to return the index where a particular character is encountered, as in the following example:
Dim myString As String = "ABCDE"
Dim myInteger As Integer
myInteger = myString.IndexOf("D")  ' myInteger = 3
In the previous example, the IndexOf method of myString was used to return the index corresponding to the first instance of the character "C" in the string. IndexOf is an overloaded method, and the other overloads provide methods to search for any of a set of characters, or to search for a string within your string, among others. The Visual Basic .NET command InStr also allows you to perform similar functions. For more information of these methods, see String.IndexOf Method and InStr Function. You can also use the String.LastIndexOf Method to search for the last occurrence of a character in your string.

Creating New Strings from Old

When using strings, you may want to modify your strings and create new ones. You may want to do something as simple as convert the entire string to uppercase, or trim off trailing spaces; or you may want to do something more complex, such as extracting a substring from your string. The System.String class provides a wide range of options for modifying, manipulating, and making new strings out of your old ones.
To combine multiple strings, you can use the concatenation operators (& or +). You can also use the String.Concat Method to concatenate a series of strings or strings contained in objects. An example of the String.Concat method follows:
Dim aString As String = "A"
Dim bString As String = "B"
Dim cString As String = "C"
Dim dString As String = "D"
Dim myString As String
' myString = "ABCD"
myString = String.Concat(aString, bString, cString, dString) 
You can convert your strings to all uppercase or all lowercase strings using either the Visual Basic .NET functions UCase Function and LCase Function or the String.ToUpper Method and String.ToLower Method methods. An example is shown below:
Dim myString As String = "UpPeR oR LoWeR cAsE"
Dim newString As String
' newString = "UPPER OR LOWER CASE"
newString = UCase(myString)
' newString = "upper or lower case"
newString = LCase(myString)
' newString = "UPPER OR LOWER CASE"
newString = myString.ToUpper
' newString = "upper or lower case"
newString = myString.ToLower
The String.Format method and the Visual Basic .NET Format command can generate a new string by applying formatting to a given string. For information on these commands, see Format Function or String.Format Method.
You may at times need to remove trailing or leading spaces from your string. For instance, you might be parsing a string that had spaces inserted for the purposes of alignment. You can remove these spaces using the String.Trim Method function, or the Visual Basic .NET Trim function. An example is shown:
Dim spaceString As String = _
"        This string will have the spaces removed        "
Dim oneString As String
Dim twoString As String
' This removes all trailing and leading spaces.
oneString = spaceString.Trim
' This also removes all trailing and leading spaces.
twoString = Trim(spaceString)
If you only want to remove trailing spaces, you can use the String.TrimEnd Method or the RTrim function, and for leading spaces you can use the String.TrimStart Method or the LTrim function. For more details, see LTrim, RTrim, and Trim Functions functions.
The String.Trim functions and related functions also allow you to remove instances of a specific character from the ends of your string. The following example trims all leading and trailing instances of the "#" character:
Dim myString As String = "#####Remove those!######"
Dim oneString As String
OneString = myString.Trim("#")
You can also add leading or trailing characters by using the String.PadLeft Method or the String.PadRight Method.
If you have excess characters within the body of your string, you can excise them by using the String.Remove Method, or you can replace them with another character using the String.Replace Method. For example:
Dim aString As String = "This is My Str@o@o@ing"
Dim myString As String
Dim anotherString As String
' myString = "This is My String"
myString = aString.Remove(14, 5)
' anotherString = "This is Another String"
anotherString = myString.Replace("My", "Another")
You can use the String.Replace method to replace either individual characters or strings of characters. The Visual Basic .NET Mid Statement can also be used to replace an interior string with another string.
You can also use the String.Insert Method to insert a string within another string, as in the following example:
Dim aString As String = "This is My Stng"
Dim myString As String
' Results in a value of "This is My String".
myString = aString.Insert(13, "ri")
The first parameter that the String.Insert method takes is the index of the character the string is to be inserted after, and the second parameter is the string to be inserted.
You can concatenate an array of strings together with a separator string by using the String.Join Method. Here is an example:
Dim shoppingItem(2) As String
Dim shoppingList As String
shoppingItem(0) = "Milk"
shoppingItem(1) = "Eggs"
shoppingItem(2) = "Bread"
shoppingList = String.Join(",", shoppingItem)
The value of shoppingList after running this code is "Milk,Eggs,Bread". Note that if your array has empty members, the method still adds a separator string between all the empty instances in your array.
You can also create an array of strings from a single string by using the String.Split Method. The following example demonstrates the reverse of the previous example: it takes a shopping list and turns it into an array of shopping items. The separator in this case is an instance of the Char data type; thus it is appended with the literal type character c.
Dim shoppingList As String = "Milk,Eggs,Bread"
Dim shoppingItem(2) As String
shoppingItem = shoppingList.Split(","c)
The Visual Basic .NET Mid Function can be used to generate substrings of your string. The following example shows this functions in use:
Dim aString As String = "Left Center Right"
Dim rString, lString, mString As String
' rString = "Right"
rString = Mid(aString, 13)
' lString = "Left"
lString = Mid(aString, 1, 4)
' mString = "Center"
mString = Mid(aString, 6,6)
Substrings of your string can also be generated using the String.Substring Method. This method takes two arguments: the character index where the substring is to start, and the length of the substring. The String.Substring method operates much like the Mid function. An example is shown below:
Dim aString As String = "Left Center Right"
Dim subString As String
' subString = "Center"
subString = aString.SubString(5,6)
There is one very important difference between the String.SubString method and the Mid function. The Mid function takes an argument that indicates the character position for the substring to start, starting with position 1. The String.SubString method takes an index of the character in the string at which the substring is to start, starting with position 0. Thus, if you have a string "ABCDE", the individual characters are numbered 1,2,3,4,5 for use with the Mid function, but 0,1,2,3,4 for use with the System.String function.

Integrating with Facebook Graph API

Unknown Reply 5:56 AM
Integrating with Facebook Graph API
Integrating with Facebook from PHP is easy with the help of Facebook’s PHP SDK and some HTTP libraries like Zend_Http_Client or PEAR HTTP_Request2. In this article I’ll show you how to get started using the Facebook PHP SDK. You’ll learn about the Facebook Graph API and create a Facebook application capable of updating your status message and uploading photos.
If you don’t have it already, you can clone or download the PHP SDK from GitHub. You’ll also need a verified Facebook account.

Registering your App on Facebook

You first need to register your application on Facebook. Go to developers.facebook.com/apps and click the Create New App button at the top of the page.
The dialog that opens asks you for the name and a namespace for your application. App Display Name is the name for your application that will be shown to the users. App Namespace is the namespace your application will use for Open Graph and Canvas Page.

After you register the application, you’ll be taken to the Basic Settings screen on which you need to specify how your app will integrate with Facebook:
  • Website – The website option is used for adding social functionality to your website.
  • App on Facebook – This Facebook app option embeds your application within a Facebook Canvas page. The code is hosted on your servers, but executes within the context of a Facebook page, similar to an IFrame.
  • Mobile Web – The mobile web option is similar to the Website integration option, although it’s intended for mobile sites.
  • Native iOS/Android App – The native options allow you to integrate Facebook data in your iOS and Android applications.
  • Page Tab – The tab option exposes your application as a Facebook page tab.
For the purposes of this article I’ll use the website integration option. My application will be a stand-alone website, and after authorization Facebook will redirect the user to a specified URL. Select the check mark next to the option and enter the URL for your application’s entry page. Then be sure to click the Save Changes button at the bottom of the page.
You should also make a note of the App ID and App Secret values at the top of the page since you will need these values to connect your application to Facebook.

Using the SDK

Functionality to connect and interact with Facebook is exposed through the Facebook object defined by the PHP SDK. The constructor accepts an array of parameters which contain information about your application, such as the App ID and App Secret that appear on your application’s Basic Settings page.
1<?php
2session_start();
3require_once "php-sdk/src/facebook.php";
4 
5$config = array(
6    "appId" => FACEBOOK_APP_ID,
7    "secret" => FACEBOOK_APP_SECRET);
8 
9$fb = new Facebook($config);

Authorization

The getUser() method is used to retrieve the user ID of a Facebook user. The information may or may not be available, depending on whether the user is logged in or not. If the method returns 0 then you know the user has not logged in.
1<?php
2$user = $fb->getUser();
The login link which serves the starting point for the OAuth authentication process with Facebook is obtained using the getLoginUrl() method. getLoginUrl() accepts an array of a parameters in which I’ve supplied redirect_uri and scope.
1<?php
2$params = array(
3    "redirect_uri" => REDIRECT_URI,
4    "scope" => "email,read_stream,publish_stream,user_photos,user_videos");
5    echo '<a href="' . $fb->getLoginUrl($params) . '">Login</a>';
The redirect_url should be the same address you provided for Site URL when registering the application. The scope is a comma-separated list of requested permissions the application requires. Applications are allowed to access public profile information and other defaults as permitted by Facebook when the user is logged in, but if you want access to additional functionality (such as posting status messages) you must be authorized by the user to do so. The Facebook developers documentation has a list of available permissions. Here I’ve requested permission to to access the user’s email address, read and publishing status updates, post photos, and post videos.
Regardless if the user accepts the request and logs in to Facebook, or rejects the request, he will be redirected back to the redirect_uri and several values will be available as URL parameters. A rejection will include error, error_reason, and error_description parameters:
http://example.com/facebook/myapp.php?error=access_denied&error_reason=user_denied&error_description=The+user+denied+your+request.
A successful authentication/authorization will append a code parameter, like so:
http://example.com/facebook/myapp.php?code=TOKEN_VALUE
The code is then used to request an Access Token:
https://graph.facebook.com/oauth/access_token?client_id=FACEBOOK_APP_ID&redirect_uri=FACEBOOK_REDIRECT_URI&client_secret=FACEBOOK_APP_SECRET&code=TOKEN_VALUE
As you’re using the SDK which handles all of this for you, I won’t go more into how OAuth works. If you’re interested in learning more read Dustin Runnell’s Understanding OAuth article and the SDK’s documentation on authentication. (Facebook uses OAuth v2 and Dustin’s article covers v1, but it will still give you a good idea of the role requests and credentials play in the process).

The Graph API

Once the user grants permission, you can read the user’s feed of status messages with a GET request:
https://graph.facebook.com/me/feed?access_token=ACESS_TOKEN
Alternatively, you can use the api() method which wraps a call to Facebook Graph API methods:
1<?php
2$data = $fb->api("/me/feed");
The api() method in this case can accept three arguments: the Graph API path for the request, the HTTP method for the request (defaults to GET), an an array of parameters specific to the Graph API method.
The Graph API provides an interface to access the members and relationships in Facebook’s social graph. Each member has a unique ID and can be accessed in a REST-like manner through resources starting with “https://graph.facebook.com”. For example, sending a GET request with your browser for:
https://graph.facebook.com/harikt
will return a JSON object with basic public information about me and my profile.
{
   "id": "596223095",
   "name": "Hari Kt",
   "first_name": "Hari",
   "last_name": "Kt",
   "link": "http://www.facebook.com/harikt",
   "username": "harikt",
   "gender": "male",
   "locale": "en_US"
}
Some requests require an Access Token. Requesting a feed of message updates is a privileged action, and so sending a GET request for:
https://graph.facebook.com/harikt/feed
will return a JSON object populated with information about an OAuthException error.
{
   "error": {
      "message": "An access token is required to request this resource.",
      "type": "OAuthException"
   }
}
The ID me is a convenient shorthand which refers to the current user.
To add an update to the user’s feed using the api() method, you would make a POST request to /me/feed and supply a message value.
1<?php
2$data = array("message" => "Hello World!");
3$status = $fb->api("/me/feed", "POST", $data);
To upload a new photo you would make a POST request to /me/photos (or ALBUM_ID/photos to upload to a specific album) and supply an array with name and image arguments.
1<?php
2$fb->setFileUploadSupport(true);
3$data = array(
4    "name" => "a vacation photo",
5    "image" => "@/home/hari/vacation/img42.jpg");
6$status = $fb->api("/me/photos", "POST", $data);
The SDK uses PHP’s cURL extension to post data, and calling setFileUploadSupport() with true will provide the data values to CURLOPT_POSTFIELDS as an array which in turn causes cURL to encode the data as “multipart/form-data”. Also cURL-related is the use of @ before the full path of the image to be posted. See the description for CURLOPT_POSTFIELDS in PHP’s documentation of curl_setopt() for more information.
To learn more about Facebook’s Graph API I recommend you to read the Graph API documentation and experiment with the Graph API Explorer which is quite a handy utility.

Your First Application

Let’s bring together everything you’ve learned now and write a very basic example of a Facebook application. It will prompt the user to log in and authorize the application, and then enable him to update his status message and upload a photo.
01<?php
02session_start();
03require_once "php-sdk/src/facebook.php";
04 
05$config = array(
06    "appId" => FACEBOOK_APP_ID,
07    "secret" => FACEBOOK_APP_SECRET);
08 
09$fb = new Facebook($config);
10 
11$user = $fb->getUser();
12?>
13<html>
14 <head>
15  <title>Hello Facebook</title>
16 </head>
17 <body>
18<?php
19if (!$user) {
20    $params = array(
21        "scope" => "read_stream,publish_stream,user_photos",
22        "redirect_uri" => REDIRECT_URI);
23    echo '<a href="' . $fb->getLoginUrl($params) . '">Login</a>';
24}
25else {
26?>
27  <form action="<?php echo $_SERVER["PHP_SELF"];?>" method="post" enctype="multipart/form-data">
28   <textarea name="message" id="message" rows="2" cols="40"></textarea><br>
29   <input type="file" name="image" id="image"><br>
30   <input type="submit" value="Update">
31  </form>
32<?php
33    // process form submission
34    if ($_SERVER["REQUEST_METHOD"] == "POST" && !empty($_POST["message"])) {
35        if (is_uploaded_file($_FILES["image"]["tmp_name"])) {
36            $finfo = finfo_open(FILEINFO_MIME_TYPE);
37            $mime = finfo_file($finfo, $_FILES["image"]["tmp_name"]);
38            $allowed = array("image/gif", "image/jpg", "image/jpeg", "image/png");
39            // upload image
40            if (in_array($mime, $allowed)) {
41                $data = array(
42                    "name" => $_POST["message"],
43                    "image" => "@" . realpath($_FILES["image"]["tmp_name"]));
44                $fb->setFileUploadSupport(true);
45                $status = $fb->api("/me/photos", "POST", $data);   
46            }
47        }
48        else {
49            // update status message
50            $data = array("message" => $_POST["message"]);
51            $status = $fb->api("/me/feed", "POST", $data);
52        }
53    }
54    if (isset($status)) {
55        echo "<pre>" . print_r($status, true) . "</pre>";
56    }
57}
58?>
59 </body>
60</html>
The code presents a link to log in or out as appropriate depending on the return value of getUser(). Then, a simple HTML form is displayed which permits the user to enter a status message and possibly an image file. When the user submits the form, the code verifies the uploaded image if one is provided and posts it to Facebook, or performs just a status message update.

Summary

The code here is for demonstration purposes, and I’ve omitted a lot of filtering and security-related checks you’d want to perform when writing a real-world application. It does however highlight the main points presented in this article. The Facebook PHP SDK makes integrating with Facebook easy. It abstracts working with OAuth authentication and the Facebook Graph API.

Source : http://phpmaster.com/integrating-with-facebook/

Cara Menggabungkan String di C

Unknown Reply 5:55 AM

Strcat, Fungsi untuk Menggabungkan String

Berikut ini contoh fungsi penggabungan string sederhana ,dia pake strcat,jagan lupa pake header string juga,



  
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main(void)
  5. {
  6.   char string1[50]="Aku mencintaimu ";
  7.   char string2[50]="dengan tulus";
  8.  
  9.   strcat(string1,string2); /*artinya gabung string2 ke string1*/
  10.  printf("%s",string1); /*print string yang udah digabung*/
  11.   return 0;
  12. }

    //Hasilnya : Aku mencintaimu dengan tulus

Menyembunyikan Menu & Fasilitas Theme Editor

Unknown Reply 6:51 AM
Tutorial singkat tentang WordPress kali ini akan membahas bagaimana cara menyembunyikan menu dan fasilitas Theme Editor pada Dashboard WordPress. Hal ini akan berguna pada situasi anda sebagai developer yang tidak menginginkan theme yang anda bikin tidak diutak-atik oleh client.
Cukup salin skrip berikut pada file functions.php
function wpr_remove_editor_menu() {
  remove_action('admin_menu', '_add_themes_utility_last', 101);
}
 
global $remove_submenu_page, $current_user;
get_currentuserinfo();
if($current_user->user_login == 'admin') { //Specify admin name here
    add_action('admin_menu', 'wpr_remove_editor_menu', 1);
} 
Selamat mencoba.
Source : http://emka.web.id/wordpress/2012/belajar-wordpress-menyembunyikan-menu-fasilitas-theme-editor/

Mengganti Logo WordPress di Admin Bar

Unknown Reply 6:49 AM
Dalam tutorial kali ini kita akan membranding Dashboard WordPress lebih dalam, khususnya Admin Bar. Admin Bar sendiri adalah sebuah bar/toolbar yang berada dibagian paling atas layar dashboard, berwarna hitam dan berisi bermacam menu seperti Logo WordPress, Manajemen komentar, informasi user dan lainnya.
WordPress Admin Bar
Yang akan kita branding ulang adalah bagian Logo WordPress:


Menghilangkan logo WordPress di Admin Bar

Pada dasarnya WordPress Admin Bar dibangun dengan sebuah class Admin Bar (WP_Admin_Bar). WP Admin Bar sendiri sudah menyediakan fasilitas menambahkan dan mengurangi menu. Kita akan menggunakan fungsi mengurangi menu untuk bagian pertama kali ini.
1
2
3
4
5
6
7
8
9
10
11
12
13
function hilangkan_logowordpress(){
global $wp_admin_bar;
         
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('about');
$wp_admin_bar->remove_menu('documentation');
$wp_admin_bar->remove_menu('support-forums');
$wp_admin_bar->remove_menu('feedback');
 
}
 
//tambahkan action pada wp_before_admin_bar_render
add_action('wp_before_admin_bar_render', 'hilangkan_logowordpress' );
Silakan dicoba.

Menambahkan Logo Kita Sendiri dalam Admin Bar

Bagian kedua kita akan menghilangkan entitas wordpress seperti pada bagian pertama, kemudian menambahkan logo dan link baru sesuai yang kita inginkan. Bagian ini diambil dari penerapan di plugin WordPress untuk Sistem Informasi Bidikmisi (http://bidikmisi.unnes.ac.id).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function rebranding_logowordpress(){
        global $wp_admin_bar;
         
        $wp_admin_bar->remove_menu('about');
        $wp_admin_bar->remove_menu('documentation');
        $wp_admin_bar->remove_menu('support-forums');
        $wp_admin_bar->remove_menu('feedback');
        $wp_admin_bar->remove_menu('wporg');
 
 
               //bagian menambahkan link
        $wp_admin_bar->add_menu( array(
            'id'    => 'wp-logo',
            'title' => '<img src="http://emka.web.id/wp-content/uploads/2012/10/logo-unnes.png" />',
            'href'  => self_admin_url( 'about.php' ),
            'meta'  => array(
                'title' => __('UNNES'),
            ),
        ) );
 
        $wp_admin_bar->add_menu( array(
                'parent' => 'wp-logo',
                'id'     => 'about',
                'title'  => __('Tentang Unnes'),
                'href'  => __('http://unnes.ac.id/tentang/'),
        ) );
         
 
        $wp_admin_bar->add_menu( array(
            'parent'    => 'wp-logo',
            'id'        => 'sikadu',
            'title'     => __('Sikadu'),
            'href'      => __('http://akademik.unnes.ac.id'),
        ) );
 
}
 
//tambahkan action pada wp_before_admin_bar_render
add_action('wp_before_admin_bar_render', 'rebranding_logowordpress' );
dan test,

Selamat mencoba!

Source : http://emka.web.id/wordpress/2012/belajar-wordpress-membranding-ulang-logo-wordpress-di-admin-bar/

Mengamankan folder WP-Upload dengan .htaccess

Unknown Reply 6:47 AM
Untuk mengamankan folder WP-Upload dari upaya inject, silakan tambahkan snippet berikut di file .htaccess anda.
<Files ~ ".*..*">
 Order Allow,Deny
 Deny from all
</Files>
<FilesMatch ".(jpg|jpeg|jpe|gif|png|tif|tiff)$">
 Order Deny,Allow
 Allow from all
</FilesMatch>
Letakkan file .htaccess tersebut di folder ~/wp-upload/uploads/. Setiap akses ke folder tersebut hanya akan dibatasi untuk ekstension jpg, jpeg, jpe, gif, png, tif, tiff dan yang lain (sesuai yang anda atur).
Selamat mencoba…

Plugin Keamanan (Security) WordPress Terbaik

Unknown Reply 6:46 AM
Plugin Keamanan (Security) WordPress Terbaik. Sadarkah anda bahwa keamanan sebuah blog wordpress amat rentan. Meskipun wordpress.org sebagai pengembang platform wordpress selalu melakukan update dari waktu ke waktu dan mengamankan bug-bug yang terdapat dalam platformnya. Tapi masih ada saja kejadian sebuah blog wordpress diretas oleh orang-orang yang kurang bertanggung jawab. Baik untuk tujuan menyusupkan virus ataupun cuma sekedar iseng.
Kita tentu tidak mau hasil kerja keras kita dikacaukan oleh orang lain hanya dalam waktu singkat. Untuk itu sangat penting sekali memperhatikan keamanan blog wordpress kita. Meskipun itu belum menjamin bahwa para peretas tidak akan bisa menjebol wordpress maupun Cpanel kita. Setidaknya sudah mempersulit atau setidaknya menghambat mereka.
Sebelum saya mmembicarakan plugin apa saja yang penting sebagai pengaman wordpress, sebaiknya anda perlu memperhatikan suatu celah yang seringkali dianggap sepele tapi bisa berakibat fatal. Yaitu, username cpanel ternyata begitu mudahnya dilihat oleh orang lain. Dan untuk membobol cpanel tinggal menebak passwordnya dengan software khusus. Serem…!
Coba anda ketikkan di browser namadomainanda/wp-admin/includes/upgrade.php
Jika anda mendapatkan pesan error yang mengandung username cpanel maka perlu menambahkan kode berikut ke dalam file .htaccess.

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_reporting -1
php_value log_errors_max_len 0

Tips tersebut saya dapatkan dari forum adsense-id.com. Bila anda ingin mendapat info lebih banyak, silahkan meluncur ke sana.
Download Code
Berikut adalah daftar beberapa plugin keamanan (security) wordpress yang bisa anda install:
1. Better wp security
Plugin ini mempunyai banyak fungsi pengamanan termasuk menyembunyikan wp-login.php, htaccess protection, banned user, limit login, change database prefix, dan banyak fitur lainnya.
2. WordPress firewall 2
3. si captcha for wordpress
Ini untuk anti spam comment.
4. Bullet Proof Security
5. Antivirus plugin
Plugin ini akan menscan theme wordpress anda dan mengecek apakah ada malicious injection dalam theme tersebut. Theme gratisan selain dari wordpress.org biasanya rawan disusupi program-program jahat. Diantaranya menyusupkan link, trojan, bahkan bisa jadi si pemrogram bisa menyusupkan iklannya pada blog anda. Sehingga akhirnya anda yang membangun blog menjaring traffic mereka yang menuai hasilnya hehe..

Source : http://kemuh.com/berita-terbaru/bisnis/plugin-keamanan-security-wordpress-terbaik/

Search

Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Popular Posts

Translate