direct image link from http://postimage.org/

3k Views Asked by At

I am using asp/html code. For some time now I am trying to retrieve a direct image link from http://postimage.org/ to my database.

I usually retrieve info from pages by form or sessions. Have done some Google research but found no useful info. Found the field where the direct-image-link is shown but how do I extract it?

<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>

The task is to retrieve the direct link without go threw the upload image of the site and copying the link. (never done this before so don't know how to do it but I do understand it need's server side script) .

The site offers bbc code for this purpose:

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

but I have no idea how to integrate it in my asp/html code. There are sites like http://www.bbcode-to-html.com/ that provides conversion tools from bbc to html but they didn't help.

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

There are 2 best solutions below

3
On

If I understood your question, you can parse html page (where your first code snippet is from) in asp code. See html node parsing with ASP classic

PS. Sorry for my english, I'm from Finland (Santa lives here!)

0
On

I tried to parse images of this site by generating a token of images. The possible number of tokens is 13537086546263552. It takes ~ 25 years to check all keys with an average rate of one token per second)

Try this:

//$html - postimg curl response

preg_match_all('/property="og:image"[\s]content="\D.*"/', $html, $matches);
$img = preg_split('/[\"]/', $matches[0][0]);
echo $img[3];