진짜 이런건.. 좋아 ㅋㅋ 다운받기 눌러
http://www.electrictoolbox.com/google-analytics-api-and-php/ Google Analytics API PHP Class I have created a PHP class for accessing the Google Analytics API with CURL and using DOMDocument to parse the XML. The resulting class and example script can be downloaded here and there are a number of posts on this website showing how to use it. Last Updated The analytics class was last updated on May ..
http://tetris.tistory.com/328 function get_web_data($url) { $info = parse_url($url); $send = "POST " . $info["path"] . " HTTP/1.1\r\n" . "Host: " . $info["host"] . "\r\n" . "Content-type: application/x-www-form-urlencoded\r\n" . "Connection: close\r\n\r\n" ; $fp = fsockopen($info["host"], 80); fputs($fp, $send); $start = false; $raw_data = null; while (!feof ($fp)) { $tmp = fgets($fp, 1024); if ..
http://groups.google.com/group/jquery-en/browse_thread/thread/1860c35706b93ecb $(a)==$(b) --> 이러면 안댐… –_-; $(a).get(0) == $(b).get(0) --> 이렇게 해야됨 (function($){ jQuery.fn.equals = function(selector) { return $(this).get(0)==$(selector).get(0); }; })(jQuery); Implementation Example: ... ... $('#id0').equals('#id1') //false $('div').equals('#id0') //true $('div:eq(1)').equals('#id1') //true $('#id0..
[PHP] PHP용 트위터 OAuth연동라이브러리 twitteroauth 사용법 트위터 공식API홈페이지에 가면 PHP용 OAuth라이브러리가 2개가 있는데요. 두개중에 이게 더 나은 것 같아서... 트위터 공식api홈페이지 - http://dev.twitter.com/ OAuth라는 게 2년전에 삽질했던 것이 기억나네요. 트위터도 이 방식으로 인증을 하게 되는데요. 간단하게 동작원리를 설명하면...... 1. 연동할 어플리케이션을 등록합니다. 2. 등록하게 되면 Consumer key와 Consumer secret을 발급받습니다. 3. 명시된 Request Token url로 이 키를 이용해 요청하게 되면 인증 url로 가서 이 어플에서 계정접근을 허용할 것인지 묻습니다. 4. 그리고, 허용하게 된다면..
http://mudchobo.tistory.com/502 미투데이도 얼른 OAuth기반으로 바꿨으면 좋겠네요. 인증 방식은 비슷하긴 하지만, access_token요청하는 부분 같은 게 없어서 callbackurl로 사용자api키를 받게 되는군요. 보안상 안좋을 것 같은...-_- 그리고, 언제까지 스프링노트에 표시를 할 것인지가 의문입니다. 트위터가 OpenAPI를 참 잘해놔서 그런지 굉장히 많은 서비스들이 튀어나오고 있습니다. 이점은 미투데이에서도 얼른 OpenAPI에 힘을 쓰시는 게...^^ api페이지입니다. http://codian.springnote.com/pages/86001 요청절차는 이러합니다. 물론 여기가면 더 자세히 나와있습니다ㅠㅠ(웹인증기반 기준!) http://codian.spri..
http://www.cyworld.com/010450471/4510792 NameVirtualHost 이 활성화 되지 않은 상태에서 VirtualHost *:80 가 여러개 등록되었을경우 나타나는 에러메세지입니다. httpd.conf 파일에서 NameVirtualHost *:80 부분이 활성화 되었는지 확인해보고 주석처리 되어있다면 주석해제를 합니다. 등록한 VirtualHost 항목과 NameVirtualHost항목을 동일하게 맞추어줍니다. 예1) NameVirtualHost * 예2) NameVirtualHost *:80
public static Bitmap LoadImageFromUrl(String strURL) { if ( IsEmpty(strURL) ) return null; Bitmap bitmap = null; HttpClient client = getHttpClient(); InputStream in = null; try { int pos = strURL.lastIndexOf("/"); String prefix = strURL.substring(0, pos+1); String encURL = prefix + URLEncoder.encode(strURL.substring(pos+1),"US-ASCII"); HttpGet httpRequest = new HttpGet(encURL); HttpResponse resp..
1. apache 설정파일 httpd.conf AllowOverride None ==> AllowOverride All #LoadModule rewrite_module modules/mod_rewrite.so 에서 #를 삭제 LoadModule rewrite_module modules/mod_rewrite.so 2. Code Igniter 의 index.php 파일이 있는 폴더에 .htaccess 파일 만들기 내용은 아래의 내용으로 RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] 단 마지막 줄의 RewriteRule ^(.*)$ /index.php/$1 [L] 에 Cod..
import java.awt.*; class OpenWin extends Frame{ public OpenWin(String title){ super(title); super.setVisible(true); // 창크기 조절 super.setSize(300, 200); // 창을 화면 중앙으로 놓기.. Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); Dimension f_size = super.getSize(); int xpos = (int)(screen.getWidth()/2 - f_size.getWidth()/2); // 원래는 Double 형태.. int ypos = (int)(screen.getHeight()/2 - f_size.g..
#### 출력하기 #### /* 객체 직렬화 * : 객체의 내용을 콘솔이나 파일, 네트워크 상으로 출력하기 위해 일직선으로 나열시키는 것.. 한바이트씩 읽기 * Serializable 인터페이스 반드시 사용 */ // 객체 타입으로 파일로 저장하기!!! import java.io.*; class AAA implements Serializable{ int x = 100; int y = 200; int z = 300; } public class _4_1 { public static void main(String[] args) throws IOException{ AAA ap = new AAA(); // x, y, z라는 내용을 ap 객체라는 방식으로 직접 전송하기? FileOutputStream fos = n..
출처 : http://blog.naver.com/celestialorb?Redirect=Log&logNo=40009144868 J2SE 5.0에는 일상적 태스크를 좀 더 쉽게 구현할 수 있도록 하는 클래스와 메소드들이 추가되었다. 이번 팁에서는 새로 추가된 java.util.Scanner클래스를 이용함으로써 일반 표현문을 사용하는 스트링과 프리미티브 타입을 읽고 파싱(parsing)하는 것이 어떻게 좀 더 쉬워졌는지 알아보도록 하자. J2SE 5.0의 출시 이전에는 파일에서 텍스트를 읽으려면 다음의 TextReader 클래스 같은 코드를 작성해야했다. import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; ..
## 기본모양 1 (콘솔모드)## // Scanner Class : 입력하는 클래스.... import java.io.*; import java.util.*; public class _3_3 { public static void main(String[] args) throws IOException{ Scanner in = new Scanner(System.in); System.out.print("문자열 ="); String str = in.next(); System.out.print("숫자 = "); int x = in.nextInt(); System.out.println(str); System.out.println(x); } } ## 기본모양 2 (파일모드)## import java.io.File; i..
import java.io.*; public class _3_2 { public static void main(String[] args) throws IOException{ // 콘솔모드 InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br1 = new BufferedReader(isr); // 파일모드 FileReader fr = new FileReader(new File("ccc.txt")); BufferedReader br2 = new BufferedReader(fr); /////////////////////////////////////////////////////////////// System.out.print("문..
import java.io.*; public class _3_1 { public static void main(String[] args) throws IOException { // 콘솔 모드 // System.out : 콘솔과 연결되어 있는 1바이트 스트림. // 텍스트 기반(2바이트)의 스트림을 만들때는 1바이트짜리 스트림(Sysyem.out)을 반드시 매개변수로 써야한다. OutputStreamWriter osw1 = new OutputStreamWriter(System.out); BufferedWriter bw1 = new BufferedWriter(osw1, 1024); PrintWriter pw1 = new PrintWriter(bw1); // 파일모드 FileWriter fw2 = new Fi..
// try : 예외발생 예상지역을 묶고 // catch : 그 지역을 잠그고 // finally : 예외발생과 무관하게 실행... import java.io.*; public class _4_3 { public static void main(String[] ar) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int su1=0, su2=0, tot=0; try{ // 예외 예상지역을 묶고... System.out.print("su1 = "); su1=Integer.parseInt(in.readLine()); System.out.print("su2 = "); su2=Integer.pa..