1

我正在使用 asp/html 代码。一段时间以来,我试图从http://postimage.org/检索到我的数据库的直接图像链接。

我通常通过表单或会话从页面中检索信息。做了一些谷歌研究,但没有找到有用的信息。找到显示直接图像链接的字段,但如何提取它?

<tr>
    <td><textarea wrap='off' onmouseover='this.focus()' onfocus='this.select()' id="code_2" scrolling="no">http://s24.postimg.org/xcbpadh6d/NO_PICTURE.jpg</textarea></td>
    <td style="width:170px;"><span id="result_2">Direct Link</span></td>
    <td><div id="clip_button_2" class="my_clip_button" data-clipboard-target="code_2">copy to clipboard</div></td>
</tr>

任务是检索直接链接,而无需扔掉网站的上传图片并复制链接。(以前从未这样做过,所以不知道该怎么做,但我明白它需要服务器端脚本)。

该网站为此提供了 bbc 代码:

<script type="text/javascript" src="http://mod.postimage.org/website-english.js" charset="utf-8"></script>

但我不知道如何将它集成到我的 asp/html 代码中。有像http://www.bbcode-to-html.com/这样的网站提供从 bbc 到 html 的转换工具,但它们没有帮助。

<p><script type="text/javascript" src="http://mod.postimage.org/website-english.js" charset="utf-8"></script></p>
4

2 回答 2

1

如果我理解你的问题,你可以用 asp 代码解析 html 页面(你的第一个代码片段来自哪里)。请参阅使用 ASP 经典的 html 节点解析

PS。对不起我的英语,我来自芬兰(圣诞老人住在这里!)

于 2014-12-22T12:55:46.660 回答
0

我试图通过生成图像标记来解析该站点的图像。可能的令牌数为 13537086546263552。检查所有密钥大约需要 25 年,平均每秒一个令牌)

尝试这个:

//$html - postimg curl response

preg_match_all('/property="og:image"[\s]content="\D.*"/', $html, $matches);
$img = preg_split('/[\"]/', $matches[0][0]);
echo $img[3];
于 2017-08-09T08:04:41.017 回答