Current location: Hot Scripts Forums » Advertising Forums » Job Offers & Assistance » update from another website


update from another website

Reply
  #1 (permalink)  
Old 05-30-08, 04:52 AM
texsa texsa is offline
Newbie Coder
 
Join Date: May 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
update from another website

Hi There
>
> I am looking for a script which will enable me to do the following on
a review site!
> For example I am reviewing a product lets call it a nokia cellphone.
> But I have signed up with 5 companies as their affiliate. I write a
product review for it and then tell the customer it is available from
the following stores. Now next to each of the stores name I should put a
price. But I want that price to be linked automatically to my site so
for example if they changed their price it will change on my web site as
well! So that my content is always up to date!
Reply With Quote
  #2 (permalink)  
Old 05-30-08, 08:31 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Unless the websites that have the prices have RSS feed, you are going to have to do CURL and some preg matching. Do you have a sample site I could take a look at? You can PM it to me if you don't want to post it here.

Pete
__________________
Reply With Quote
  #3 (permalink)  
Old 05-30-08, 09:12 AM
Boraan's Avatar
Boraan Boraan is offline
Coding Addict
 
Join Date: Jul 2007
Location: Clayton, NC
Posts: 292
Thanks: 0
Thanked 1 Time in 1 Post
You'd need a good API that linked his site url's to the affiliate's pricing. You may want to see if the affilates offer an API service. cURL? I'm not sure I follow you there. It's a command line for protocol transfer. URL syntax, different protocols, scraping, etc.
__________________
Dexter Nelson
Techdex Development & Solutions
========================
Internet Marketing For Programmers | Free Market Research in 15 Minutes or Less
My Software: Hotscripts Softpedia software.techdex.net
Reply With Quote
  #4 (permalink)  
Old 05-30-08, 09:28 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Quote:
Originally Posted by Boraan View Post
You'd need a good API that linked his site url's to the affiliate's pricing. You may want to see if the affilates offer an API service. cURL? I'm not sure I follow you there. It's a command line for protocol transfer. URL syntax, different protocols, scraping, etc.
Definition of CURL according to PHP Website:

Quote:
PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.
Pete
__________________
Reply With Quote
  #5 (permalink)  
Old 05-30-08, 11:47 AM
Boraan's Avatar
Boraan Boraan is offline
Coding Addict
 
Join Date: Jul 2007
Location: Clayton, NC
Posts: 292
Thanks: 0
Thanked 1 Time in 1 Post
Exactly, it's command-line based for protocal transfer. It facilitates the connection between different protocols. I still don't see how you would use it to sync data from one server to another. You need an API to do that.

Edit: I'm not putting you down, I was looking for an explaination. I know what it does, but maybe you have an application for cURL that I never used.
__________________
Dexter Nelson
Techdex Development & Solutions
========================
Internet Marketing For Programmers | Free Market Research in 15 Minutes or Less
My Software: Hotscripts Softpedia software.techdex.net
Reply With Quote
  #6 (permalink)  
Old 05-30-08, 12:22 PM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Quote:
Originally Posted by Boraan View Post
Exactly, it's command-line based for protocal transfer. It facilitates the connection between different protocols. I still don't see how you would use it to sync data from one server to another. You need an API to do that.

Edit: I'm not putting you down, I was looking for an explaination. I know what it does, but maybe you have an application for cURL that I never used.
You could either:
1. Retrieve prices on the fly:

If you do it this way, when the visitor requests the page on your local server you would:
  • Use CURL to retrieve / read HTML page content from remote website.
  • Use pregmatch to pinpoint price on remote server.
  • If price has changed, update the new price in your local database.
  • Display updated price to user.
2. Schedule a crontab to update prices nightly:

Same as above, except you could schedule a cron job to do ALL the price updating for you on a nightly basis. This is a better idea I think, because of lower bandwidth usage and faster page load for user during the day.


Pete
__________________
Reply With Quote
  #7 (permalink)  
Old 05-30-08, 05:29 PM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boraan View Post
Exactly, it's command-line based for protocal transfer. It facilitates the connection between different protocols. I still don't see how you would use it to sync data from one server to another. You need an API to do that.

Edit: I'm not putting you down, I was looking for an explaination. I know what it does, but maybe you have an application for cURL that I never used.
Huh? I use cURL everyday to update parts of my NCAA site!

What do you mean, command-line based? Should I whip up a php script to demonstrate what he is talking about... C'mon man, really..... cURL (php) is almost the same as LWP...
__________________
Whatever you decide, you should make sure best security methods are used and practiced. Should you really need more help, PM me.

Last edited by Christian; 05-30-08 at 09:26 PM. Reason: removing link
Reply With Quote
  #8 (permalink)  
Old 05-30-08, 08:35 PM
Boraan's Avatar
Boraan Boraan is offline
Coding Addict
 
Join Date: Jul 2007
Location: Clayton, NC
Posts: 292
Thanks: 0
Thanked 1 Time in 1 Post
ok. You all are misunderstanding me. Let me clarify. cURL just facilitates the connection, not the actual transfer. Maybe I should put it this way. cURL facilitates the connection, what is actually doing the data transfer? Are you writing the API in PhP? I use cURL (the command line utility) to maintain cross protocol connections. You've got to have and API to do the transfer. Quite literally, cURL is the wrapper and it wraps the API. cURL has an API called libcurl. When you all said use cURL you're referring to the tool... My question is, what are you using for the API.

cURL is the wrapper. The API does the transfer. If you're using cURL with PHP, what are you using for the API.

http://en.wikipedia.org/wiki/CURL
"cURL is a command line tool for transferring files with URL syntax."
"Libcurl is the corresponding library/API"

If you've just got cURL... what is your API? 'Cause referring to cURL is referring to the command line utility.
__________________
Dexter Nelson
Techdex Development & Solutions
========================
Internet Marketing For Programmers | Free Market Research in 15 Minutes or Less
My Software: Hotscripts Softpedia software.techdex.net
Reply With Quote
  #9 (permalink)  
Old 05-31-08, 12:07 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Ok Boraan ... I am going to stop arguing about this, because its not benefiting the person who started this thread. I would appreciate if you did the same.

Pete
__________________
Reply With Quote
  #10 (permalink)  
Old 05-31-08, 10:39 AM
-tg -tg is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
If you wish to go it, scrape the pages daily and update the prices in your database. Try this tutorial, http://www.oooff.com/php-scripts/bas...ta-parsing.php, then create your script, add mysql to it, insert the prices to the database and using a cron job get it to update the database daily. Simple.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
100 ways to get more traffic jorokolarov The Lounge 12 12-06-07 07:20 PM
IE6 Bug? My center column drops to footer position goatchaps CSS 5 08-31-07 12:15 PM
Update multiple rows outside loop - need help ElvansX PHP 1 12-03-06 01:55 AM
Complete website made. Ready for business rossy790 General Advertisements 0 03-04-05 06:03 PM
FS: Prozilla Memberships (Turnkey Sites) - $10-15 less than Retail! rockergrrl General Advertisements 0 08-11-04 12:05 AM


All times are GMT -5. The time now is 01:03 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.