使用CURL返回404,但用浏览器可以打开,怎么回事?
如网页:http://movie.douban.com/subject/3878157/,想用curl获取网页内容,但返回404;单用浏览器可以顺利打开。看了下也没有重定向,怎么回事,curl 该怎么设置?
回复讨论(解决方案)
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
你那是浏览器cache吧?
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
确实是不存在,返回首页
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
确实是不存在,返回首页 晕倒,我怎么打得开。使用curl连续打开50个网页,都返回404,在返回404时在页面添加一个网页链接,然后随便打开哪个都没问题。难道curl缓存了网页,在新建的浏览器中又是404,见鬼了!
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
确实是不存在,返回首页 晕倒,我怎么打得开。使用curl连续打开50个网页,都返回404,在返回404时在页面添加一个网页链接,然后随便打开哪个都没问题。难道curl缓存了网页,在新建的浏览器中又是404,见鬼了!
curl不会缓存的,你应该找找程序的问题
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
确实是不存在,返回首页 晕倒,我怎么打得开。使用curl连续打开50个网页,都返回404,在返回404时在页面添加一个网页链接,然后随便打开哪个都没问题。难道curl缓存了网页,在新建的浏览器中又是404,见鬼了!
curl不会缓存的,你应该找找程序的问题
我错了,有可能的
你加一下 CURLOPT_FRESH_CONNECT 这个试试吧 强制获取新连接
地址栏 http://movie.douban.com/subject/3878157/
呃...你想访问的页面不存在
> 1秒后 返回首页 浏览器打得开啊,是电影《电锯惊魂》
确实是不存在,返回首页 晕倒,我怎么打得开。使用curl连续打开50个网页,都返回404,在返回404时在页面添加一个网页链接,然后随便打开哪个都没问题。难道curl缓存了网页,在新建的浏览器中又是404,见鬼了!
curl不会缓存的,你应该找找程序的问题
我错了,有可能的
你加一下 CURLOPT_FRESH_CONNECT 这个试试吧 强制获取新连接 还是不行,用firefox新建隐私浏览窗口,执行程序后,点击原始链接还是404返回首页;而firefox一般窗口执行程序,虽然curl仍然返回404,但是打开原始链接就没问题。难道这些电影豆瓣有限制?
非用户是自然不行的
从窗口进入的那是小偷
非用户是自然不行的
从窗口进入的那是小偷 ,还真是的,某些电影必须登录才能查看,而且都是些情色、暴力之类的。原来是这个原因,NND。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Alipay PHP...

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.
