您现在的位置是:首页 >

asp 转 php 在做网页小偷程式上asp和php哪个语言更具优势

火烧 2022-04-27 07:28:35 1051
在做网页小偷程式上a 和 h 哪个语言更具优势 在做网页小偷程式上a 和 h 哪个语言更具优势我认为PHP在这方面更强大。有许多专用函式可以完成这些功能,配合正则表示式, 能完成一般的网页小偷功能,不

在做网页小偷程式上asp和php哪个语言更具优势  

在做网页小偷程式上asp和php哪个语言更具优势

我认为PHP在这方面更强大。
有许多专用函式可以完成这些功能,
配合正则表示式, 能完成一般的网页小偷功能,不需要太高深的程式设计技术。
常见的有file() fopen() file_get_contents() fsockopen(),
都可以作到。
网上还有专门的视讯教程:讲小偷的工作原理的。
自己在网上找找看,也可以找我来要。
给你一个网址:你自己学学看吧
(:wsiyu./read.php?tid=11763)
网址:绝对安全。

下载了个小偷程式怎么在小偷程式上加上弹窗广告

不同的程式模板和广告设定方法不同。一般你找head.php head.asp
或者index.asp档案。看看里面是不是有加广告的档案。或者检视js档案。

求ASP flash 小偷程式

eeehf

谁知道ASP小偷程式啊?

现在网上流行的小偷程式比较多,有新闻类小偷,音乐小偷,下载小偷,那么它们是如何做的呢,下面我来做个简单介绍,希望对各位站长有所帮助。
(一)原理
小偷程式实际上是通过了XML中的XMLHTTP元件呼叫其它网站上的网页。比如新闻小偷程式,很多都是呼叫了sina的新闻网页,并且对其中的进行了一些替换,同时对广告也进行了过滤。用小偷程式的优点有:无须维护网站,因为小偷程式中的资料来自其他网站,它将随着该网站的更新而更新;可以节省伺服器资源,一般小偷程式就几个档案,所有网页内容都是来自其他网站。缺点有:不稳定,如果目标网站出错,程式也会出错,而且,如果目标网站进行升级维护,那么小偷程式也要进行相应修改;速度,因为是远端呼叫,速度和在本地伺服器上读取资料比起来,肯定要慢一些。
(二)事例
下面就XMLHTTP在ASP中的应用做个简单说明
<%
'常用函式
'1、输入url目标网页地址,返回值getHTTPPage是目标网页的程式码
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set =nothing
if err.number<>0 then err.Clear
end function
'2、转换乱玛,直接用xml呼叫有中文字元的网页得到的将是乱玛,可以通过adodb.stream元件进行转换
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'下面试着呼叫:3doing./earticle/的内容
Dim Url,Html
Url=":3doing./earticle/"
Html = getHTTPPage(Url)
Response.write Html
%>
更多ASP小偷程式你可以在网上搜搜,有很多免费的

求一个ASP的新闻小偷程式!

详细解释已经写的很清楚,就不用偶再费口舌了:)
<%
on error resume next
Server.ScriptTimeOut=120 '设定操作超时的时间(因为程式执行速度慢啊)
url = ":product.zol../soft/" '新闻来源的页面
wstr = getHTTPPage(url) '取得页面内容
if err.number=0 then '如果获取成功
start=newstring(wstr," <table width=100%"" border=0"" cellspacing=""0"" cellpadding=""0""><!-- t {{{ -->") '要获取的内容在网页中的开始位置(通过唯一的标志寻找)
over=newstring(wstr,"<!-- 第一表结束 }}} -->") '要获取的内容在网页中结束位置(通过唯一的标志寻找)
wstr=mid(wstr,start,over-start-61) '获取想要的内容
wstr=replace(wstr,"aaa","bbb") '替换掉你不想要的内容
end if
response.write wstr '输出
%>
这些照抄:
<%
function getHTTPPage(url)
on error resume next
dim
set =Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set =nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function NewString(wstr,strng)
NewString=Instr(wstr,strng)
End Function
%>
此程式占用资源确实比较大,如果网站有速度要求的话要甚用。

wap网站asp小偷程式如何制作

Function GetPage(url)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetPage = BytesToBstr(.ResponseBody)
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "GB2312" '注意这个编码,来源可能是UTF-8、GBK等
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
pagetemp = GetPage(":123./456.htm")'将内容偷回来
用UBB、MID、left、right等语法将不要的东西过滤
最后储存或显示出来

asp 转 php 在做网页小偷程式上asp和php哪个语言更具优势

小偷程式

小偷程式实际上是通过了XML中的XMLHTTP元件呼叫其它网站上的网页。

(二)事例
下面就XMLHTTP在ASP中的应用做个简单说明
〈%
'常用函式
'1、输入url目标网页地址,返回值getHTTPPage是目标网页的程式码
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set =nothing
if err.number<>0 then err.Clear
end function
'2、转换乱玛,直接用xml呼叫有中文字元的网页得到的将是乱玛,可以通过adodb.stream元件进行转换
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'下面试着呼叫:webjx./earticle/的内容
Dim Url,Html
Url=":webjx./earticle/"
Html = getHTTPPage(Url)
Response.write Html
%〉

我想用php,做一个小偷程式的类

你是想写一个抓取工具吗?
如果是其实很简单,
首先,通过file_get_contents或者其他ICURL类都可以抓取资料。
其次,通过解析HTML或者JSON等格式
再次,解析成功后,储存到你的资料库

用php的curl做小偷程式如何显示部分页面

①读取网页内容带字串
使用php函式$str=file_get_contents("url");读取目标站点网页内容并赋值给$str变数
②通过正则表示式函式eregi匹配出需要的内容
eregi("正则表示式","匹配的字串$str","返回值");
③查询和替换一些内容
使用$str2=str_replace("被替换的字串","替换成的字串","原字串");
④输出结果到网页中
echo $str2;

做php小偷程式时怎么把偷到的图片变小

直接给个函式你吧.
$site_root_path为网站的绝对路径. $source_img为源图片,$dest_img为目标图片
function img_resize($source_img, $dest_img='', $dest_width = 200, $dest_height = 150){ 源图片必须相对于网站根目录
global $site_root_path;

if(!is_file($site_root_path.$source_img)){
return '';
}

if($dest_img==''){
$dest_img=dirname($source_img).'/small_'.basename($source_img);
}

$source_img_info = getimagesize($site_root_path.$source_img);
$source_img_mime = $source_img_info['mime']; 图片MIME型别,PHP version>=4.3

if($source_img_mime == 'image/jpeg'){
$im = imagecreatefromjpeg($site_root_path.$source_img);
}elseif($source_img_mime == 'image/x-png'){
$im = imagecreatefrompng($site_root_path.$source_img);
}elseif($source_img_mime == 'image/gif'){
$im = imagecreatefromgif($site_root_path.$source_img);
}else{
@copy($site_root_path.$source_img, $site_root_path.$dest_img);
@chmod($site_root_path.$dest_img, 0777);
return $return_img; 返回调整后的档案
}

$source_width = imagesx($im); 源图片宽
$source_height = imagesy($im); 源图片高

if($source_width > $dest_width || $source_height > $dest_height){
if($source_width >= $dest_width){
$width_ratio = $dest_width / $source_width;
$resize_width = true;
}

if($source_height >= $dest_height){
$height_ratio = $dest_height / $source_height;
$resize_height = true;
}

if($resize_width && $resize_height){
$ratio = $width_ratio < $height_ratio ? $width_ratio : $height_ratio;
}elseif($resize_width){
$ratio = $width_ratio;
}elseif($resize_height){
$ratio = $height_ratio;
}

$new_width = $source_width * $ratio;
$new_height = $source_height * $ratio;
if(function_exists('imagecopyresampled')){
$new_im = imagecreatetruecolor($new_width, $new_height);
imagecopyresampled($new_im, $im, 0, 0, 0, 0, $new_width, $new_height, $source_width, $source_height);
}else{
$new_im = imagecreate($new_width, $new_height);
imagecopyresized($new_im, $im, 0, 0, 0, 0, $new_width, $new_height, $source_width, $source_height);
}
imagejpeg($new_im, $site_root_path.$dest_img, 100);
imagedestroy($new_im);
}
else{
imagejpeg($im, $site_root_path.$dest_img, 100);
}

imagedestroy($im);
@chmod($site_root_path.$dest_img, 0777);

return $dest_img; 返回调整后的档名
}

  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码