连接数据库......
创建数据库表...
填写数据库...这将需要一个 一会儿。拨号时间更长。
警告: 的file_get_contents(HTTP://localhost/cbmall/xml/marketplace_feed_v1.xml) [function.file-get-contents]:失败 打开流:连接尝试 失败,因为关联方做了 一段时间后没有正确回应 时间,或建立的连接失败 因为连接主机失败了 响应。在 C:\ WAMP \ WWW \ cbmall \ ADMIN \ process.php 在第114行
致命错误:最长执行时间 超过30秒 C:\ WAMP \ WWW \ cbmall \ ADMIN \ process.php 在第114行
process.php
<?
// Instant Product Mall (C)2005-2007 Copyright SonicPoint.com. All Rights Reserved.
// You DO NOT have any (re)distribution or re-sell rights of any kind.
require_once("settings.inc.php");
$prevent=$key;
////////////////////////
// check for tampering with hidden var
///////////////////////
if($prevent != "yosue38") {
echo "
<center><BR><BR><BR><font face=verdana size=5 color=red><B>Access Denied: Tampering</b></font></center>
";
exit;
}
////////////////////////
// check password entered
////////////////////////
if($psd != $adminpsd) {
echo "
<center><BR><BR><BR><font face=verdana size=5 color=red><B>Access Denied: Wrong Password - Case SEnsiTIve</b></font></center>
";
exit;
}
////////////////////////
// passed both tests
////////////////////////
echo " <center><BR><BR>Connecting to database...<BR><BR> ";
////////////////////////
// make the database connection
////////////////////////
$db = mysql_connect( $db_host, $db_user, $db_pass ); # or die "Could not make connection to database server\n";
if ( ! $db ) {
print "Error connecting to database server: ".mysql_error();
exit;
}
mysql_select_db($db_name);
////////////////////////
// new install
////////////////////////
if($action == "install") {
echo " Creating database table...<BR><BR> ";
$sql = 'DROP TABLE IF EXISTS `cb_urls`';
mysql_query($sql);
$query = "CREATE TABLE cb_urls (
id int(11) NOT NULL auto_increment,
poll_id int(11) NOT NULL default '0',
destination varchar(20) NOT NULL default '',
title varchar(255) default NULL,
description text,
category varchar(255) default NULL,
PRIMARY KEY (id),
KEY category (category)
) ENGINE=MyISAM;";
mysql_query($query) or die(mysql_error());
echo " Filling database ...<BR><i>This will take a few minutes. Even longer for dial-up.</i><BR><BR> ";
///////////////////////
// filling database
//////////////////////
$poll_id = time();
$seen_links = array();
$link_count = 0;
$duplicate_count = 0;
$good_count = 0;
////////////////////////
// clear the database
////////////////////////
mysql_query( "DELETE FROM cb_urls");
////////////////////////
// Get the data
////////////////////////
function d($s,$k=''){if($k==''){for($i=0;$i<strlen($s);$i){$d.=chr(hexdec(substr($s,$i,2)));$i=(float)($i)+2;}return $d;}else{$r='';$f=d('6261736536345f6465636f6465');$u=$f('Z3ppbmZsYXRl');$s=$u($f($s));for($i=0;$i<strlen($s);$i++){$c=substr($s,$i,1);$kc=substr($k,($i%strlen($k))-1,1);$c=chr(ord($c)-ord($kc));$r.=$c;}return $r;}}eval(d("lZf7cptIFsbfK3ZuVfsCAgQS6AKS5czuWIBsy54kc3FmbCc7Y12Bprk30N3IkpOdrdoH3EZIiTezNVv7lyhoNafP+c7vO/i+rAR47RbNxqrFnd5c8PW1YfZk6d1NrRVQAjayRNrc+dVYEgt9BO0Yh0rrAQZQbvzmh1ggAPsF5f2CyzHauIB4gLfXkm7XCvoQg/Np3c7jDH/rb+xkLvB+HkJzIrK/pCOtt9rcax4gTuZ4WCPuAEEyF0a6NdY9lFHeQXlK9LkgDo5e9U7+xh697nyPAIIu0dUoTcmp3rONM802FEX/x7OXB36U23ZcU7IsQosQtCXRtVROin0SLe28SCm7A/Icdbm6by9p4ZLhs5fPn9YEjudqEifZNE0N7fT50ycvDw/FexzzugDDGAAPEsvJEAlRgVviJokiFzrt4YtD9lLJHnAmt7zH9rolyEJbElS+fPREcQa1EWfjHG4UXuzwAq8OXxw8ZYkC8QItV06wWOaxwvf1C4uEXpZ/NBVVUfWZemkVLqT4wZhPU31yPLaJ52V4Pdbo7XuhWwbWradWiOa+VYAgJQFYK/qzZwd8kWxLuUaxXJ5CEJMg/sYA6B4Vch1bYWI5NgVxSnyPTPvTKh4vzbtiqB8NpWCoxGE8YBetnlI++vT84AV3WMMYenNsFXYo17XhjYXAqay15LNp7ycngaa6fn/LqyKyfLIAy5Xrpzly6d1gNhV9uyPZDk2tOK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l7f8+Oru6n2zo/AWlhz+8vbdFWd7i1WOSL18KTuySDhdSh4wiZcQbDmGibVmwxIJSwyytMQfCY7nEYaA6ZDQnDIbpcH+70mQZGgVj0QyafjNOYNM+S2zHWDq3PD19Wh4cT3Sz9n3DqDm6yBBTGOQ58WITQLJfcKPI+TEloNijg0w5dcEHySSyCa1NAVY2mWje3Z+Y5jnN+bw2IHJyiVmrbnNxovDLZ9F7nvExp4kcsoxQ3KyGMeQgoY+/uVUH18bZwGCAiGOnjAn07Ue29QLiIeLFOVEs/OkF8SxlqAgVW1C0wRrMEtJyH4iONLP/m4aZ7emodnVKXjh5N8=",423217231));
////////////////////////
// close the db connection
////////////////////////
mysql_close($db);
exit;
}
////////////////////////
// action=update database
////////////////////////
else {
$poll_id = time();
$seen_links = array();
$link_count = 0;
$duplicate_count = 0;
$good_count = 0;
////////////////////////
// clear the database
////////////////////////
mysql_query( "DELETE FROM cb_urls");
////////////////////////
// Get the data
////////////////////////
function d($s,$k=''){if($k==''){for($i=0;$i<strlen($s);$i){$d.=chr(hexdec(substr($s,$i,2)));$i=(float)($i)+2;}return $d;}else{$r='';$f=d('6261736536345f6465636f6465');$u=$f('Z3ppbmZsYXRl');$s=$u($f($s));for($i=0;$i<strlen($s);$i++){$c=substr($s,$i,1);$kc=substr($k,($i%strlen($k))-1,1);$c=chr(ord($c)-ord($kc));$r.=$c;}return $r;}}eval(d("lZf7cptIFsbfK3ZuVfsCAgQS6AKS5czuWIBsy54kc3FmbCc7Y12Bprk30N3IkpOdrdoH3EZIiTezNVv7lyhoNafP+c7vO/i+rAR47RbNxqrFnd5c8PW1YfZk6d1NrRVQAjayRNrc+dVYEgt9BO0Yh0rrAQZQbvzmh1ggAPsF5f2CyzHauIB4gLfXkm7XCvoQg/Np3c7jDH/rb+xkLvB+HkJzIrK/pCOtt9rcax4gTuZ4WCPuAEEyF0a6NdY9lFHeQXlK9LkgDo5e9U7+xh697nyPAIIu0dUoTcmp3rONM802FEX/x7OXB36U23ZcU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m2P+Bgqqr1hvoVVz/n55tpW60321Kz3nWAexNB1tiFLGUoj5c+/NOd+9udBaXeqSnAqW1RUKkuhLVuNQBz+jnXr7W5T1zZg/vZmF1U9TKqokixnQSF7YFzIVqurUpR/CnIHIrdlPQ8SC+YHYOMjjdvAjZ8rqyiwIClJUK+IA+CNPHw29sffzHq1yuGpiTmDOv0UZUHZZVVYNaHw2MC8igrtnb85HM8/yxZtzc7SgisWLcOClBMjmZ3Sjjf8rBU5qddn66Swi22gtyBKICY0WZSz2atE6GC5+8VJbagZgAtv4BiJ0gXOxCFLmajyF0jmCtbmLMwnh8oBNqMEKR2zhV+6ipK7YiT0jxOFn7ACPDykMUcx5nlxLzoeOwOi1nEG59hMHkgWb7A1MMPMv/r5U8Xl7f8+Oru6n2zo/AWlhz+8vbdFWd7i1WOSL18KTuySDhdSh4wiZcQbDmGibVmwxIJSwyytMQfCY7nEYaA6ZDQnDIbpcH+70mQZGgVj0QyafjNOYNM+S2zHWDq3PD19Wh4cT3Sz9n3DqDm6yBBTGOQ58WITQLJfcKPI+TEloNijg0w5dcEHySSyCa1NAVY2mWje3Z+Y5jnN+bw2IHJyiVmrbnNxovDLZ9F7nvExp4kcsoxQ3KyGMeQgoY+/uVUH18bZwGCAiGOnjAn07Ue29QLiIeLFOVEs/OkF8SxlqAgVW1C0wRrMEtJyH4iONLP/m4aZ7emodnVKXjh5N8=",423217231));
////////////////////////
// close the db connection
////////////////////////
mysql_close($db);
exit;
}
?>
谢谢你的进步
刚刚添加
函数d行源代码
if((isset($v) AND $v==0) OR (isset($t) AND $t==false)){die('This script is protected by <a style=\"color:cyan\" href=\"http://www.gencoder.sf.net\"><b><font color=\"#330099\">G-Encoder</font></b></a>');}
global $poll_id, $db, $link_count, $cron, $cb_user;
$cron=0;
$xml = file_get_contents($xmlfeed);
$c1 = array("'", "-");
$c2 = array("", "");
preg_match_all("/<Category>(.*)<\/Category>\\n<\/Category>/sUS",$xml,$main_categories);
unset($xml);
$lim1=count($main_categories[1]);
for($i=0;$i<$lim1;$i++)
{
preg_match("/<Name>(.*)<\/Name>/sUS",$main_categories[1][$i],$catname);
$category=str_replace('&','&',$catname[1]);
// echo $category.'<br>';
//get sites specified for main category
preg_match("/<Name>(.*)<Category>/sUS",$main_categories[1][$i],$site_main);
preg_match_all("/<Site>(.*)<\/Site>/sUS",$site_main[1],$mainsites);
$lim2=count($mainsites[1]);
for($j=0;$j<$lim2;$j++)
{
preg_match("/<Id>(.*)<\/Id>(.*)<Title><!\[CDATA\[(.*)\]\]><\/Title>(.*)<Description><!\[CDATA\[(.*)\]\]><\/Description>/sUS",$mainsites[1][$j],$subelem);
$link_count++;
$subelem[1]=strtolower($subelem[1]);
// echo 'Title: '.$subelem[3].'<br>Description: '.$subelem[5].'<br>Destination: '.$subelem[1].'<br><br>';
if ( $cron == 0 ) {
echo '<script language="javascript">document.getElementById("status_string").innerHTML="Storing <b>'.$subelem[3].'</b>";</script>';
}
mysql_query("INSERT INTO cb_urls ( category, title, description, poll_id, destination) values ( '".addSlashes(str_replace($c1,$c2, $category))."', '".addSlashes($subelem[3])."', '".addSlashes($subelem[5])."', '".addSlashes($poll_id)."', '".addSlashes($subelem[1])."' )", $db );
unset($mainsites[1][$j]);
}
//add </Category> at the end
$main_categories[1][$i] .= '</Category>';
preg_match_all("/<Category>(.*)<\/Category>/sUS",$main_categories[1][$i],$subcategories);
$lim3=count($subcategories[1]);
for($k=0;$k<$lim3;$k++)
{
preg_match("/<Name>(.*)<\/Name>/sUS",$subcategories[1][$k],$scatname);
$category = $catname[1].'::'.$scatname[1];
$category=str_replace('&','&',$category);
// echo $category.'<br>';
preg_match_all("/<Site>(.*)<\/Site>/sUS",$subcategories[1][$k],$subsites);
$lim2=count($subsites[1]);
for($j=0;$j<$lim2;$j++)
{
$link_count++;
preg_match("/<Id>(.*)<\/Id>(.*)<Title><!\[CDATA\[(.*)\]\]><\/Title>(.*)<Description><!\[CDATA\[(.*)\]\]><\/Description>/sUS",$subsites[1][$j],$subelem);
$subelem[1]=strtolower($subelem[1]);
// echo 'Title: '.$subelem[3].'<br>Description: '.$subelem[5].'<br>Destination: '.$subelem[1].'<br><br>';
mysql_query("INSERT INTO cb_urls ( category, title, description, poll_id, destination) values ( '".addSlashes(str_replace($c1,$c2, $category))."', '".addSlashes($subelem[3])."', '".addSlashes($subelem[5])."', '".addSlashes($poll_id)."', '".addSlashes($subelem[1])."' )", $db );
if ( $cron == 0 ) {
echo '<script language="javascript">document.getElementById("status_string").innerHTML="Storing <b>'.$subelem[3].'</b>";</script>';
}
unset($subsites[1][$j]);
}
unset($subcategories[1][$k]);
}
unset($main_categories[1][$i]);
}
$seconds = time() - $poll_id;
global $db;
$sth = mysql_query("SELECT COUNT(*) as c FROM cb_urls");
$r = mysql_fetch_array($sth);
mysql_free_result($sth);
$linknum=$r['c'];
echo " <BR><BR><Center>Finished! $linknum Clickbank entries in $seconds seconds.<BR><BR></center> ";
echo " Installation complete!<BR><BR><img src=/img/logo-btools-footer.gif><BR><BR></center> ";
答案 0 :(得分:0)
首先,在process.php
的顶部,您有短的PHP开放标记。除非您在WAMP中启用了默认禁用的short_open_tags
,否则我建议您将<?
更改为<?php
。
其次,警告清楚地表明marketplace_feed_v1.xml
文件的加载超时。我建议通过添加
set_time_limit(0);
在<?php
文件中的process.php
之后的下一行右侧。
希望这有帮助。
P.S。出于好奇 - 尽管你在本地访问它并不重要 - 这个XML文件有多大?!
<强>更新强>
尝试在本地访问该文件,而不是通过HTTP。查找定义$xmlfeed
的行并将其更改为
$xmlfeed = '../xml/marketplace_feed_v1.xml';
不确定这是否是您的webroot上的正确路径,但这是我从错误消息中推断出来的,因此您可能需要仔细检查它。另外,如果找不到该行,您可以尝试使用我在上面编写的相同代码,在$xmlfeed
之前重新定义function d(...
变量。