윈도우즈 MFC WIN32 PHP 낙서연구소 GDI+ socket 서버 WINCE 소켓 activex 스크랩 클라이언트 Virtual Private Server string 작업관리자 mail client DirectShow folder grab process 메타블로그 DirectX capture 검색엔진 최적화 DDoS Crawling 빈폴더 소켓프로그래밍 Attach 스텐포드 대학교 졸업생 ATL AhrefsBot access.log CSocket win32소켓 DDoS Attack toolbar taskmanager strfnd server SEO robots.txt DoS Attack ExitProcessName icon

SOCKET.ZIP

Java로 구현하는 간단한 Client & Server 프로그램   (created at 2007-07-16)   237  

자바에서 제공하는 소켓 클래스를 이용하면 다음과 같이 간단하게 Client/Server를 구현 할 수 있다.// ClientSocket socket = new Socket("www.foo.com", 9000);OutputStream out = socket.getOutputStream();out.write("Hello world".getBytes());out.flush();out.close();

소켓 프로그래밍 기본 흐름 - Socket Programming Basic Flow   (created at 2007-07-16)   304  

소켓을 활용한 프로그래밍에 있어서 Client/Server간의 구조를 아는것도 중요하지만socket관련함수를 어떻게 사용하는지 아는것도 매우 중요한것 같다.다음의 도표는 이를 알기 쉽게 표현한 것이다.예제 코드를 보면 좀더 이해가 빠르지 않을까...!?socket_server.csocket_client.c
소켓 프로그래밍 기본 흐름 - Socket Programming Basic Flow

소켓으로 메일보내기   (created at 2007-01-30)   227  

$from = 'webmaster@mydomain.co.kr';$fromdomain = 'mydomain.co.kr';$fromname = '관리자';$to = 'yourid@hanmail.net';$todomain = 'hanmail.net';$toname = '아무개';$subject = '테스트메일 입니다.';$data = "To: $toname From: $fromname Subject: $subject Content-Type: text/html;...

간단한 소켓 클라이언트 프로그램   (created at 2007-07-16)   263  

다음은 socket 기본 함수를 이용하여 웹페이지에 접속하는 프로그램이다.접속만 하고 실제로 긁어오는건 구현이 안되있다.그리고 다음은 WIN32기반으로 구현해본 간단 접속 프로그램 예제이다.

Ahrefs bot의 비상식적 사이트 크롤링 접근 차단 - robots.txt 수정 또는 .htaccess 파일 수정을 통해 차단 가능해   (created at 2014-06-09)   651  

우크라이나와 싱가폴에 연구소를 둔 Ahrefs.com은 검색엔진 최적화(SEO) 업체로 표준을 지키지 않는 것으로 유명했습니다. 참고로 SEO란 Search Engine Optimization을 줄임말로 검색엔진이 검색을 잘 할수 있도록 도와주는 솔루션입니다. 통상 인터넷 기반의 웹사이트는 robots.txt에 접근 정책을 정의해 둡니다. 그런데 ahrefs.com은 이를 무시하고 크롤링을 해 버리는 경우가 많았습니다.   예전에도 한번 그런적이...
Ahrefs bot의 비상식적 사이트 크롤링 접근 차단 - robots.txt 수정 또는 .htaccess 파일 수정을 통해 차단 가능해

소켓을 생성하여 CSocket에 Attach하는 방법   (created at 2007-07-19)   402  

이상하게도 Socket을 생성하여 Connect를 하면 에러가 나는 경우가 있다.아무것도 잘못된것이 없는것 같은데...이 경우 다음과 같이 하면 처리가 가능하다.int CreateSocketConnection(char *host,int port){    int Socket, r;    struct sockaddr_in cliAddr;    struct hostent ...

프로세스명으로 프로세스 죽이는 함수   (created at 2006-09-29)   310  

/*    사용법 : ExitProcessName("IEXPLORE.EXE");

빈폴더 찾아내기   (created at 2006-09-29)   200  

주어진 경로 하위에 위치한 빈폴더를 모두 찾아내 삭제하는 함수입니다.수정해야 할부분이 있다면 알려주세요 ^^BOOL DelEmptyFolder(CString strPath){           CFileFind finder;    int nValidCnt = 0;    BOOL bWork...

IE 패치에 따른 object, embed, applet 대처 방안   (created at 2006-09-28)   340  

기존 방법↓Embed.jsdocument.write(‘’);단점 : embed 시킬 파일마다 js파일을 생성해주어야함 ㅡㅡa

HTML 긁어오는 프로그램 소스   (created at 2006-09-28)   175  

Your first task is to create a Delphi function used to download a file from the Internet. One way of achieving this task is to use the WinInet API calls. Delphi gives us full access to the WinInet API (wininet.pas) which we can use to connect to and retrie...

파일에서 한줄만 읽어다 return 해주는 소스   (created at 2006-09-28)   288  

 function read_line_1($filename)  {    $fp=fopen($filename, "rb");    $buff=fgets($file, 40960);    fclose($fp);    return trim($buff);  }

작업관리자에 프로그램 안뜨게 하기   (created at 2006-09-28)   473  

작업관리자를 띄워보면 어떤 프로그램이 떠 있는지 다 나온다.이걸 막으려먼 프로젝트 소스에서 다음과 같이 초기화를 해주면된다....Application.Initialize;Application.Title := '';Application.CreateForm(TForm1, Form1);...이렇게 해주면 Taskbar에도 안뜬다.

String Find Function (StrFnd)   (created at 2006-09-28)   186  

특정 문자열을 찾아내 주는 소스.델파이 프로그래밍 할 때마다 자주 애용하는 소스이다.  function StrFnd( source, key: String): Integer;vari, j, flen, slen, klen: Integer;beginslen := Length( source);klen := Length( key);flen := slen - klen + 1;for i := 1 to flen dobegin   if sour...

Toolbar에서 Icon 없애기   (created at 2006-09-28)   209  

  ::OnInitDialog(....){...//작업 표시줄에서 버튼을 없애준다.DWORD dwStyle = GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE);dwStyle &= ~WS_EX_APPWINDOW;SetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE, dwStyle);...}

웹브라우져가 떠서 웹페이지 보이게 하는 소스   (created at 2006-09-28)   352  

참으로 간단하다.ShellExecute라는 함수를 쓰면 된다.// ShellExecute(Application.Handle, nil, PCHAR(strWorkingDir), nil, '', SW_SHOW);ShellExecute( NULL, NULL, "http://m.kurapa.com", NULL, "", SW_SHOW);

ActiveX에 다이얼로그 붙이기   (created at 2006-09-28)   307  

ActiveX Control안에 다른 ActiveX Control을 올려놓을때는 차일드 속성외에..app에 initinstance에서 AfxEnableControlContainer();를 호출해줘야 합니다..예..BOOL CClientApp::InitInstance(){BOOL bInit = COleControlModule::InitInstance();if (bInit){// TODO: Add your own module initialization cod...

드라이브 문자 알아내는 소스   (created at 2006-09-28)   324  

내가 사용하고 있는 PC에서 드라이브가 어떤게 사용가능한지 알아내는 소스.void CDriveCheckUtilDlg::CheckForDriveLetterAccess(){  char m_DriveLetter[80]={ "

ListCtrl에서 아이템 추가하기 예제   (created at 2006-09-28)   469  

char *strTitle, *strArtist, *strTime;{/* Add song information to play list */LV_ITEM lvitem;lvitem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE ;//  lvitem.iImage = MemoryType - 1; /* Set Image Type */lvitem.state =  0;lvitem.stateMask = ...

ActiveX에서 바이너리 데이터 파라메터로 안깨지게 받는법   (created at 2006-09-28)   366  

보통 LPCTSTR로 선언해서 쓰는데 그럼 가다가 end of string 이후가 깨져버린다.그때 파라메터를 CHAR * 로 선언해서 쓰면된다.Visual C++ 6.0에서는 CHAR* 선언이 불가능하므로 수동으로 고쳐주면된다.이때 컨트롤 부분에서는 다음과 같은 부분도 수정해주어야 한다.VTS_BSTR로 선언되어진 부분을 VTS_PI1로 선언해주면된다.그러면 데이터 송수신시 깨지지 않는다.from ControlDISP_FUNCTION(CKlientCtrl...

모달리스 다이얼로그의 종료 버튼을 클릭했을 때 종료가 안될때...   (created at 2006-09-28)   304  

모달리스 다이얼로그의 종료 버튼을 클릭했을 때 종료가 안될때...요로코롬 해보슈~WndProc(..){switch(){   case WM_SYSCOMMAND:   {     if(wParam==SC_CLOSE)     {       EndDialog();//종료   &n...

DirectShow - NULL Rendering Example   (created at 2006-09-28)   233  

DirectShow를 이용하여 간단히 컨텐츠를 재생하는 프로그램 소스다.이것만 이해하면 DirectShow의 절반은 이해 한 셈이다.#include #pragma comment(lib, "strmiids.lib")

Broadcast를 이용한 Application 종료   (created at 2006-09-28)   395  

가끔 어플리케이션을에게 메시지를 보내서 통채로 죽이고 싶을때가 있다.어플리케이션들아 우리 같이 종료하자!!!이럴때는 윈도우 메시지를 정의해놓고,브로드케스트 해주는 방법을 써주면 좋다. 보내는 곳UINT nCloseRegMsg = ::RegisterWindowMessage("ISCREEN_CP_APP");::PostMessage(HWND_BROADCAST, nCloseRegMsg, 0, 0);받는 곳UINT nCloseRegMsg = ::Regis...

IE Control을 사용하여 만든 어플리케이션에서 javascript로 어플리케이션에 정의된 함수 호출하는 방법   (created at 2006-09-28)   389  

Embedded XP같은거 사용해서 커스톰 웹브라우져같은거 만들때 이런 방법을 많이 쓴다.셋톱박스 전용 브라우져 만들때 꼭 써야하는 방식이라고나 할까...내용 요약:IE Control을 사용하여 개발하는 어플리케이션 내에 정의된 함수를 javascript로 window.external.[사용자 정의 함수] 로 호출하는 방법.기본적으로는 함수는 Public으로 정의하여 구현하면 IE위에서 돌아가는 javascipt에서도 Call할수 있다.# call방법wi...

윈도우 옮기는 API - SetWindowPos   (created at 2006-09-28)   367  

 The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and ...

CFileDialog - File Open Example   (created at 2006-09-28)   240  

CFileDialog l_SampleDlg(TRUE,NULL,NULL,OFN_OVERWRITEPROMPT,"Text Files (*.txt)|*.txt|Comma Separated Values(*.csv)|*.csv||");      int iRet = l_SampleDlg.DoModal();      CString l_strFileName;&nbs...

GDI+ Programming 방법   (created at 2006-09-28)   348  

 [중요1] Graphics 개체를 사용한다.[중요2] 다음의 헤더선언을 꼭 해야된다        #include         using namespace Gdiplus;        #pragma comment(lib, "gdipl...

투명 윈도우 만들기   (created at 2006-09-28)   289  

You should be able to use this demo as a skeleton application for your own project.A standard CDialog MFC EXE application was created with the wizard and apart from the standard supplied code, the following functions were overridden.void OnClose() Used to ...

불투명 윈도우 만들기   (created at 2006-09-28)   361  

 * 불투명 윈도우 만들기방금전에 책에서 본 예제로 만든겁니다.님의 코드보다 더 자원을 먹을지는 모르겠지만 참고하세요.윈도 2000이상에서만 된다고 하네요.전역입니다 :// 투명 설정을 위한 상수 정의#define WS_EX_LAYERED       0x00080000#define LWA_ALPHA         ...

마우스로 윈도우 드래그하여 이동시키는 비기   (created at 2006-09-28)   553  

윈도우 드래그해서 움직이고 싶은데 어떻게 하는지 모르시는 분은 다음의 이벤트를 추가해 보시라.  void Cgdiplus_demoDlg::OnLButtonDown(UINT nFlags, CPoint point){        // 다음과 같이 PostMessage를 넣어주면 간단히 구현 가능        ...

비트맵을 배경으로 뿌리고 그 위에 컨트롤 올리는 방법   (created at 2006-09-28)   321  

사실은 별루 하는 일 없다.원래 VC++ 프로그램 짜듯 짜되,배경이미지를 하나 로딩해서 매번 Paint 해주면 된다.다음과 같이 클레스 선언부에 m_BG라는 비트맵을 선언HBITMAP m_BG초기화 부분에서 비트맵 로드한다음BOOL CCALLIDDlg::OnInitDialog(){        CDialog::OnInitDialog();    &nb...