How to Crawl a PHP generated image

安稳与你 提交于 2020-01-07 08:29:35

问题


I have a website textscloud.com
In this website i make the image with the PHP GD library. Here is a link to a demo:

In this page i allow the user to download the image on which text will pe printed. download link is like

This download.php file has a header for making the image with PHP GD Library and download the file like this

header("Content-type: image/png");

But google didn't crawl these images. Does anyone know the solution? I can't store these image in server.


回答1:


You don't mention how you are feeding the beast, so I suggest you start by providing google a site map via their webmaster toolkit. You can specifically list the images that you want crawled. Google provides good help articles to get you going.




回答2:


Google can't index images that are not stored permanently, I'm quite sure it can't even index images without context (i.e. which are not part of a describing/linking page).




回答3:


You can try to:

Send a cache header to allow caching of the image.

Rewrite the actual url to someting like: http://textscloud.com/get_img/download/VkZaU1FtUXdNVVZWVkZKT1ZWUXdPUT09.png (should match your filename header)



来源:https://stackoverflow.com/questions/14339474/how-to-crawl-a-php-generated-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!