Is it possible to fetch content from a different website?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Is it possible to fetch content from a different website?

Post by legend986 »

Is there a way I could query a website for some term and then display the result on my site? For example, query google for something and display the result on my site... Well, it could be any site as such... :roll:
Last edited by legend986 on Wed Jul 18, 2007 7:15 am, edited 2 times in total.
User avatar
ghadacr
Forum Contributor
Posts: 135
Joined: Fri May 11, 2007 10:44 am

Re: Is this possible?

Post by ghadacr »

Not a very good idea!!!!! :o But i give you courage for suggesting such an idea.......
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Post by legend986 »

Oh... Could you elaborate please?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Descriptive Subjects

Post by feyd »

Please use more descriptive thread subjects.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Generally, you're referring to what the target website will consider as theft of their information. Without written permission and/or proper attribution you can get yourself into some serious legal waters.

Yes, it's technically possible.
dave_c00
Forum Commoner
Posts: 37
Joined: Wed May 28, 2003 6:08 am

Post by dave_c00 »

I would look at fopen();

http://uk3.php.net/fopen

Open the url into a variable and then do what you want with that..
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Re: Descriptive Subjects

Post by legend986 »

feyd wrote:Please use more descriptive thread subjects.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Generally, you're referring to what the target website will consider as theft of their information. Without written permission and/or proper attribution you can get yourself into some serious legal waters.

Yes, it's technically possible.

I'm sorry... :cry: I'll note that point from now. I've changed the title to reflect what is there in my thread...

And yeah, it would be with permission. I wouldn't dare get into problems. My site is a simple education site so I cannot take that risk...

So, I would use fopen() and then if there is a table inside... I would take the file pointer to that table and then extract data from there is it?
Post Reply