±¾ÎÄʵÀý½²ÊoÁËphpʹÓÃCutyCaptʵÏÖÍøÒ³½Øͼ±£´aeµÄ½¨¡£*ÖÏi¸ø´o¼Ò¹(C)´o¼Ò²Î¿¼£¬¾ßÌaÈçÏ£º
ÍøÒ³½ØͼÕa¸o¹¦ÄÜ´o¼Ò¿ÉÄÜÓõ½×i¶aµÄ¾ÍÊÇQQ½Øͼ,»oÀuÓÃasp.netÀ´ÊµÏÖ½Øͼ,ÆaʵÎÒÃÇÒ²¿ÉÒÔÖ±½ÓʹÓÃphpÀ´ÍøÒ³½Øͼ,ÕaÀi¾ÍÀ´¸ø´o¼Ò½eÉÜphpÀuÓÃCutyCaptʵÏÖÍøÒ³½ØͼµÄÁ÷³Ì£º
CutyCaptÏÂÔصØÖ*:http://sourceforge.net/projects/cutycapt/files/cutycapt/
windows CutyCapt²»ÐeÒª°²×°,Ö±½Ó±£´aeµ½ÄaµÄµçÄÔÖм´¿É,È»ºophp´uÂeÈçÏÂд:
<?php
/*
ÍøÒ³½Øͼ¹¦ÄÜ£¬±ØÐe°²×°IE+CutyCapt
url:Òª½ØͼµÄÍøÒ³
out£ºÍ¼Æ¬±£´aeÂ*¾¶
path£ºCutyCaptÂ*¾¶
cmd:CutyCaptÖ´ÐÐÃuÁi
±ÈÈç:http://ÄaphpÂ*¾¶.php?url=http://www.jb51.net
*/
$url=$_GET["url"];
$imgname=str_replace('http://','',$url);
$imgname=str_replace('https://','',$imgname);
$imgname=str_replace('.','-',$imgname);
$out = 'D:/webroot/test/'.$imgname.'.png';
$path = 'D:/webserver/CutyCapt.exe';
$cmd = "$path --url=$url --out=$out";
echo $cmd;
system($cmd);
?>
Èç¹uÄaÊÇlinuxϵͳ¾ÍÐeÒª¼oµ¥µÄÅaÖÃÒ»ÏÂCutyCapt,°²×°ÍøÕ¾½ØͼÈi¼þCutyCapt.
Ò»¡¢ÏÈ°²×°Qt47,Ôo¼Óqt47µÄÏÂÔØÔ´,´uÂeÈçÏÂ:
vi /etc/yum.repos.d/atrpms.repo
[atrpms]
name=CentOS $releasever ¨C $basearch ¨C ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
[atrpms-testing]
name=CentOS $releasever ¨C $basearch ¨C ATrpms testing
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
yum update
yum installqt47
yum installqt47-devel
yum installqt47-webkit
yum installqt47-webkit-devel
Ò²ÐiÕaÀi»¹»aÓб¨´iÌaʾ:
warning: qt44-x11-4.4.3-10_4.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 66534c2b
error: Failed dependencies:
libGLU.so.1()(64bit) is needed by qt44-x11-4.4.3-10_4.el5.x86_64
libmng.so.1()(64bit) is needed by qt44-x11-4.4.3-10_4.el5.x86_64
//½a¾o£º
//yum -y installqt-devel*
¶þ¡¢°²×° CutyCapt,´uÂeÈçÏÂ:
cd /data0/software
svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
mv cutycapt/CutyCapt /usr/local/cutycapt
cd /usr/local/cutycapt
qmake
make
´Ë´¦¿ÉÄÜ»a±¨´i:make: *** [CutyCapt] Error 1
½a¾o:yum update sqlite,ÔÙ´ÎÖ´ÐÐ make,Èç¹u»¹²»³É¹¦ qmake-qt47 ÔÙ´ÎÖ´ÐÐmake.
Èý¡¢ÏÂÔØx-server,´uÂeÈçÏÂ:
wget http://www.flexthinker.com/wp-content/uploads/2009/11/xvfb-run.sh.txt
mv ./xvfb-run.sh.txt/usr/local/cutycapt/xvfb-run.sh
chmodu+x /usr/local/CutyCapt/xvfb-run.sh
ËÄ¡¢°²×°ÖÐÎÄ°u
yum installfonts-chinese
Îa¡¢°²×°ImageMagick
yum installImageMagick
Áu¡¢²aÊÔ,´uÂeÈçÏÂ:
/usr/local/cutycapt/xvfb-run.sh --server-args="-screen 0, 1024x768x24"/usr/local/cutycapt/CutyCapt --url=http://www.jb51.net--out=/tmp/163.jpg
163.jpgûÓмÓÔسoflash.
Æß¡¢ÏÂÔØ64λflash²a¼þ,´uÂeÈçÏÂ:
cd /data0/software
#wget http://119.188.72.26/1/ishare.down.sina.com.cn/14036482.so?ssig=YB70Xk7Ph9&Expires;=1340899200&KID;=sina,ishare&ip;=1340777795,114.255.44.&fn;=libflashplayer.so
http://ishare.iask.sina.com.cn/f/13659493.html
ll /usr/lib64/mozilla/plugins/
lrwxrwxrwx 1 root root 41 06-27 14:00 libflashplayer.so ->/usr/lib64/flash-plugin/libflashplayer.so
cp /data0/software/libflashplayer.so /usr/lib64/flash-plugin/
²aÊÔ¼ÓÔسɹ¦.
¸u¶a¹ØÓÚPHPÏa¹ØÄÚÈݸÐÐËȤµÄ¶ÁÕ߿ɲe¿´±¾Õ¾×¨Ìa£º¡¶PHPͼÐÎÓeͼƬ²Ù×÷¼¼ÇÉ»a×Ü¡¡¢¡¶[PHP»u±¾Ói¨ÈeÃŽ̳Ì](http://www.jb51.net/Special/348.htm)¡¡¢¡¶[PHPÔËËaÓeÔËËauÓè×ܽa](http://www.jb51.net/Special/357.htm)¡¡¢¡¶phpÃaeÏo¶ÔÏo³ÌÐoÉe¼ÆÈeÃŽ̡̳¡¢¡¶PHPÍøÂç±a³Ì¼¼ÇÉ×ܽa¡¡¢¡¶PHPÊý×e(Array)²Ù×÷¼¼ÇÉ´oÈ«¡¡¢¡¶[php×Öu´®(string)Óè×ܽa](http://www.jb51.net/Special/47.htm)¡¡¢¡¶php+mysqlÊý¾Ý¿a²Ù×÷ÈeÃŽ̡̳¼°¡¶php³£¼uÊý¾Ý¿a²Ù×÷¼¼ÇÉ»a×Ü¡
Ï£Íu±¾ÎÄËuÊo¶Ô´o¼ÒPHP³ÌÐoÉe¼ÆÓÐËu°iÖu¡£