Home Backend Development PHP Tutorial 这个有关问题CSDN不能搞定就没人可以搞定了

这个有关问题CSDN不能搞定就没人可以搞定了

Jun 13, 2016 pm 01:40 PM
adsl out quot return true

这个问题CSDN不能搞定就没人可以搞定了
本人做了一个采集。 在本地测试,可以正常采集。

放在服务器上,也可以采集。 但是。。。。

目标站,内容更新后,,,服务器上,要过 好几个小时才能采。 (有时要隔一天)

而本地,不用等,只要目标站有数据,就可以采到。


感觉就像采数据的时候,网页没有刷新一样。  




是 服务器 问题? 还是程序不够好?(程序上,每次刷新的时候,都是重新载入页面! ,还加了 随机字符),给公司的技术也看过了,都说程序没问题


 我问了空间商,他说要我报错过去, 我怎么报? 请高手中的高手帮忙解决! 

到底是什么问题?

------解决方案--------------------

探讨

QQ288801 谢谢 帮我 看下

------解决方案--------------------
你可以把采集部分的代码贴出来。
------解决方案--------------------
服务器有缓存?
------解决方案--------------------
对方肯定是把你的ip列入黑名单了,你可以用adsl的连接方式,定时重连网络,这样你反复更换ip,对方服务器就应付不过来了,给你一段定时重连adsl的脚本
PHP code



$i=1;
while(true)
{
    sleep(120);
    if(cutNet()){
        sleep(10);
        if(connectNet())
        {
            echo "成功连接 " .$i." 次\r\n";
        }
        else
        {
            echo "未连接 \r\n";
        }
    } else {
        echo "未成功断开连接\r\n"; 
    }
    $i++;
}


/**
 * ADSL拨号
 */
function connectNet($cNum=0)
{
    exec("rasdial.exe ADSL adsl_name adsl_pwd",$out1,$ars1);
    print_r($out1);
    if (preg_match('/已连接 ADSL/',$out1[3]) or preg_match('/已连接 ADSL/',$out1[4]))
    {
        return true;
    }else{
        return false;
    }

}

function cutNet()
{
    if(isConnect()){
        exec("Rasdial ADSL /disconnect",$out1,$ars1);//断线
        if (preg_match('/已完成/',$out1[0]))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        return true;
    }

}

function isConnect()
{
    exec("Rasdial",$out1,$ars1);//断线
    if($out1['0']=='没有连接'){
        echo "没有找到连接。。。\r\n";
        return false;
    }
    return true;
}
<br><font color="#e78608">------解决方案--------------------</font><br>服务器固定IP怎么用ADSL?<br>用代理吧<br>
Copy after login
探讨
对方肯定是把你的ip列入黑名单了,你可以用adsl的连接方式,定时重连网络,这样你反复更换ip,对方服务器就应付不过来了,给你一段定时重连adsl的脚本

PHP code



$i=1;
while(true)
{
sleep(120);
if(cutNet()){
sleep(10);
if(connectNet())
……

------解决方案--------------------
探讨

我是 虚拟主机。 日本的IP... 第一次 在这个服务器上 做采集。。。他就知道?

还有就是 虚拟主机 上 要怎么代理?

------解决方案--------------------
function isConnect()
{
exec("Rasdial",$out1,$ars1);//断线
if($out1['0']=='没有连接'){
echo "没有找到连接。。。\r\n";
return false;
}
return true;
}


------解决方案--------------------
从描述来看,你的本机和你的服务器,不是在一个地区的吧?我是指省市地区。

那么也有可能是CDN导致的,不同的省市运营商,虽然访问同一个域名,但访问的主机和内容会出现不一致的情况,CDN的同步需要时间。

想解决这个问题,在你的本地搞个服务器就行了。

------解决方案--------------------
要采集国内的站点,不管从哪个角度说都适合使用国内的主机.再烂也不能烂过功夫墙外的机房了.
好歹咱们也是个局域网啊

探讨

引用:
从描述来看,你的本机和你的服务器,不是在一个地区的吧?我是指省市地区。

那么也有可能是CDN导致的,不同的省市运营商,虽然访问同一个域名,但访问的主机和内容会出现不一致的情况,CDN的同步需要时间。

想解决这个问题,在你的本地搞个服务器就行了。


也就是 换个服务器 是吗?
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of the usage of return in C language Detailed explanation of the usage of return in C language Oct 07, 2023 am 10:58 AM

The usage of return in C language is: 1. For functions whose return value type is void, you can use the return statement to end the execution of the function early; 2. For functions whose return value type is not void, the function of the return statement is to end the execution of the function. The result is returned to the caller; 3. End the execution of the function early. Inside the function, we can use the return statement to end the execution of the function early, even if the function does not return a value.

Digital audio output interface on the motherboard-SPDIF OUT Digital audio output interface on the motherboard-SPDIF OUT Jan 14, 2024 pm 04:42 PM

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

What is the execution order of return and finally statements in Java? What is the execution order of return and finally statements in Java? Apr 25, 2023 pm 07:55 PM

Source code: publicclassReturnFinallyDemo{publicstaticvoidmain(String[]args){System.out.println(case1());}publicstaticintcase1(){intx;try{x=1;returnx;}finally{x=3;}}}#Output The output of the above code can simply conclude: return is executed before finally. Let's take a look at what happens at the bytecode level. The following intercepts part of the bytecode of the case1 method, and compares the source code to annotate the meaning of each instruction in

What do out and in interfaces mean? What do out and in interfaces mean? Sep 28, 2021 pm 04:39 PM

The out interface refers to the output interface, and the in interface refers to the input interface. The out interface generally represents the audio source line output interface, which is used to connect loads, such as speakers, headphones, etc.; while the in interface generally represents the audio source line input interface, which is used to connect CD players, mobile phones, MP3 players, computers, etc.

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

How does Vue3 use setup syntax sugar to refuse to write return How does Vue3 use setup syntax sugar to refuse to write return May 12, 2023 pm 06:34 PM

Vue3.2 setup syntax sugar is a compile-time syntax sugar that uses the combined API in a single file component (SFC) to solve the cumbersome setup in Vue3.0. The declared variables, functions, and content introduced by import are exposed through return, so that they can be used in Vue3.0. Problems in use 1. There is no need to return declared variables, functions and content introduced by import during use. You can use syntactic sugar //import the content introduced import{getToday}from'./utils'//variable constmsg='Hello !'//function func

Use the return keyword in JavaScript Use the return keyword in JavaScript Feb 18, 2024 pm 12:45 PM

Usage of return in JavaScript requires specific code examples In JavaScript, the return statement is used to specify the value returned from a function. Not only can it be used to end the execution of a function, it can also return a value to the place where the function was called. The return statement has the following common uses: Return a value The return statement can be used to return a value to the place where the function is called. Here is a simple example: functionadd(a,b){

What should I do if my win10 system crashes and displays out of memory? What should I do if my win10 system crashes and displays out of memory? Feb 09, 2024 pm 03:00 PM

Win10 system crashes and displays outofmemory. Recently, many users have encountered this prompt when using their computers, which requires frequent restarts to repair. So how should we deal with this situation? To address this problem, this issue’s win10 tutorial is here Share the complete operation steps with the majority of users, hoping to help more friends solve their problems. What to do if win10 system crashes and displays outofmemory 1. Right-click this computer on the desktop and select "Properties" in the option list. 2. After entering the new window interface, click the "Advanced System Settings" option in the upper left corner. 3. In the window that opens, switch to the "

See all articles