获取标题响应正文

I am using php to develop a twitter search api which is able to search twitter, and save posted images from tweets. It all works fine etc, but for facebook, instead of the image being loaded with the webpage, its loaded after in a response. Using firebug, going to the Net tag, I can see the html source code I need under the response tab for a getphoto(). I am looking to grab an img src from this html text, but Facebook seems to load the basic stucture, then reload the page with the image on it.

My question is: How can I get this 'response body'?

I have used get_headers() before, but I dont think it will work in this situation, and I have trawlled the net looking for an answer to this, but none have appeared.

Any help would be much appreciated, thx in adv. Dont think my code will help explaining, but willing to put some up

EDIT:

example facebook url: /https://www.facebook.com/photo.php?pid=1258064&l=acb54aab14&id=110298935669685

that would take you to the page containing the image

This is the image tag:

img class="fbPhotoImage img" id="fbPhotoImage" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash3/522357_398602740172635_110298935669685_1258064_1425533517_n.jpg" alt=""

But this does not show up until the response comes through.

I have a get_header funciton in to expand shortened URL's, due to twitters love for them, and this can get and image from other 3rd party photo sites with multiple shortens/redirects.

Have not used cURL before, is it the best/only way?

Thanks again

instead of the image being loaded with the webpage, its loaded after in a response

I don't know what this means.

I can only guess that the URL you are trying to fetch the html from, which your code is expected to parse to extract an image URL, is actually issuing a redirect.

Use curl for your transfers and tell it to follow redirects - NB this will only work with header redirects - not meta equiv redirects, meta refresh redirects nor javascript location redirects.

(maybe Faceboo0k don't want you to leech their content?)