سؤال

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?

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى wordpress.stackexchange
scroll top