Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to fetch videos and images of a particular website and put it into post? i mean i am thinking of writing a function, where i will just write the website name, and then with the help of website url, all or latest images and videos are posted to my post. Is this possible?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The problem with this is that each sites content is formated differently. If there was only one site you were wanting to pull from you maybe able to use curl() and then sort though the content.

A better idea may be to grab content from the sites RSS feed and sort though and grab what you need.

You could probably write a quick plugin that would either grab the feedurl of the site and display images or you enter the feed url and it displays content.

This is also just a friendly reminder about copyright and being mindful of the content you're pulling ;)

share|improve this answer
    
but rss feeds does'nt pulls images and videos? am i rite? i have heard some where –  ntechi Jan 9 '11 at 9:11
    
It depends but most feeds should have images and videos. At very least they should have links the the content. –  BandonRandon Jan 9 '11 at 9:17
1  
Using curl directly in WP is strongly discouraged (at least for simple tasks). There is HTTP API - set of wrapper functions that takes care of transport with or without curl available. –  Rarst Jan 9 '11 at 14:44
    
ok guys i need ideas and suggestions over here, if i ll write a function where instead taking images and videos from particular site, is it possible i take it from google? for example in google images if i type "Apple" then i get images of apple, but in such a way, that this apple wont be typed in google but into my dashboard, and it will go to google and display it on my blog is this possible? –  ntechi Jan 9 '11 at 15:09
    
You will have to "scrape" google images (google 'scrape google image php'), using the get_search_query() to set the variable to search for in your search.php file. Just be aware that scraping content is often frowned on, look out for googleWrath. –  superUntitled Jan 9 '11 at 16:10
add comment

ntechi,

To answer your question in the comment above ("is it possible i take it from google? for example in google images if i type "Apple" then i get images of apple, but in such a way, that this apple wont be typed in google but into my dashboard, and it will go to google and display it on my blog is this possible?")

The answer is more than likely "no". This wouldn't be from a technical aspect but a legal one. You can't be aware of all the laws regarding copyright with the websites you are grabbing the images from (depends on what rights they provide, where they are located in the world, where the server is located, etc.).

Also, if you hotlink you may get a default "don't hotlink" image (which defeats the purpose) and if you do copy the image over, you could be violating even more laws.

Sorry I don't have a better response.

Cheers

Noel

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.