Jump to content


Photo

Quoting information from another site


  • Please log in to reply
5 replies to this topic

#1 -Felix-

-Felix-
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 22 October 2006 - 11:40 AM

Often you see websites that quote information from another site, for example prices:
Website A presents a product and then quotes the price from website B, the seller, and gets that information displayed on their site (Website A).

The advantage of this over manually getting this information is that it is automatically updated when the seller changes their price and thus you don't have to visit this site B every day/week to check if the price has changed. Instead, everytime your page is loaded it will fetch the price information from that other site.

Now, how do I do this???


#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 22 October 2006 - 02:33 PM

You can use the file functions or cURL combined with regular expressions :)

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 -Felix-

-Felix-
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 22 October 2006 - 06:19 PM


Could you post a simple example code?
I'm somewhat a beginner in PHP coding.


#4 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 22 October 2006 - 07:33 PM

If you have permission, then ask for database access or API access, if you scraping then you shouldn't do that without asking permission from the site administrator first. Tell me what your doing and I will give you a quick example based on exactly how your going to do it!

me!

#5 -Felix-

-Felix-
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 22 October 2006 - 08:18 PM

Let's say there's site A with lots of text and information. There is information that is changing weekly, even daily. Take for example currency rates. They change hourly.

Now on my site, I simply want to quote/fetch the live currency rate from that other site.
How to do this with PHP?

#6 -Felix-

-Felix-
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 23 October 2006 - 10:52 AM

No one can do this?
Seriously, I thought it was just a couple of rows of code, not a big deal!?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users