본문 바로가기

분류 전체보기

extract 대체와 strip_tags를 이용한 전달변수 취득 foreach($_POST as $key => $value){ $$key = mysql_real_escape_string(strip_tags($value)); } foreach($_GET as $key => $value) { $$key = strip_tags($value)); } 더보기
trascode 옵션 분해 몇년전 VLC를 이용한 인코딩 옵션으로 설정한 값들... 주로 File Encoding으로 이용하였는데... 그동안 많이 바뀌었겠지... 이건 Live용으로 바꾸어야 하는데... 그냥 쓰니 A/V 싱크에 문제가 생긴다. 여러 Player로 바꾸어 봐도 동일 증상... 흠.. 결국 Encode 옵션 문제인데... vcodec=mp4v,vb=1000,width=640,height=480,scale=1,venc=x264{level=2.2,me=hex,subme=5,qcomp=0.75,direct=spatial,direct-8x8=-1,partitions=normal,bframes=0,b-adapt=none,chroma-me=none,merange=16,cabac=none,min-keyint=30,keyint=.. 더보기
x.264 옵션은 봐도 봐도 모르겠다... 쩝... 흠.. 다음팟인코더에서 설명을 무지 잘해 주고 있다. 근 2년만에 다시 보는 VLC... 전에는 VBR밖에 안된다는 생각을 했었는데 CBR을 저렇게 설정하는군.... 좀 더 공부해서 정리해봐야 겠다. 더보기
wxWidget for Windows eclipse 깔고, MinGW 깔고, wxWidget 깔고, C:\wxWidget-x.x.x\build\msw 디렉토리에 가서, make -f makefile.gcc BUILD=debug UNICODE=1 SHARED=0 위와 같이 컴파일을 해서 라이브러리를 컴파일한다. wxWidget 은 debug 인지 아닌지, 유니코드를 쓰는지 안 쓰는지에 따라 라이브러리 파일명이 틀리므로 주의하자. eclipse 에서 File -> New -> C++ Project 를 해서 일반적인 Executable 을 만든다. 프로젝트에 대고 오른쪽 버튼 -> New -> Source File 로 main.cpp 를 만든다. 프로젝트에 대고 오른쪽 버튼 -> Properties 를 선택. C/C++ Build -> Setti.. 더보기
Setting up Eclipse + wxWidgets 2.8.10 ** 주의 : 리눅스/유닉스용이다. 도중 exe파일 다운 받는 것은 신경쓰지 마시라. After we have built our Debug and Release versions of wxWidgets now I show you how to setup wxWidgets with Eclipse. Pre-Requisites - Eclipse (I prefer the C++ Developers version. It's lighter than the standard version, it comes with the CDT plugin already installed and it solved me some problems I had with the standard version with the CDT manually.. 더보기
Broadcasting in PHP After several hours of working with sockets in an attempt to do UDP broadcasting, I thought a little help was in order for anyone else looking to do something similar, since it uses a number of those "undocumented" functions. Here's how I did it: 더보기
Logging to a MySQL Database This is a guide to setting up logging to a MySQL database using log4j. PostgreSQL is covered in this article. Note: Database logging is provided by the log4j open source logging system which Wowza uses for its logging framework. There have been reports of issues with database logging when the connection to the database is lost. The log4j system will not automatically try to reconnect to the data.. 더보기
General Performance Tuning elow are several suggestions for tuning Wowza Server on your production hardware. : It is generally best to run the most recent Sun Java JDK (http://java.sun.com). Note: If you are on a Mac with OS X 10.5.x or greater (Leopard) with 64-bit hardware you can run the Java 6 VM. To change your default Java VM in OSX, open the Java preferences application /Applications/Utilities/Java/Java Preferences.. 더보기
HTTP 인증(Digest타입)이 걸린 URL을 fsockopen에서 여는 방법 function readHTTPDigestAuthenticatedFile($host,$port,$file,$username,$password) { if (!$fp=fsockopen($host, $port, $errno, $errstr, 15)) return false; //first do the non-authenticated header so that the server //sends back a 401 error containing its nonce and opaque $out = "GET /$file HTTP/1.1\r\n"; $out .= "Host: $host:$port\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); //read t.. 더보기
HTTP 인증(Basic타입)이 걸린 URL을 fsockopen에서 여는 방법 $objSock = fsockopen(호스트, 포트, $strErrorNo, $strErrStr, 5); if($objSock) { $strHeader = "GET http://url부분 HTTP/1.1\r\n"; $strHeader .= "Host:호스트:포트\r\n"; $strHeader .= "Authorization:Basic " . base64_encode("아이디:암호") . "\r\n"; $strHeader .= "\r\n"; fputs($objSock, $strHeader); $strResult = ""; while (!feof($objSock)) { $strResult .= fgets($objSock, 65535); } fclose($objSock); ... $objSock = fsock.. 더보기