Technical question - How do they do that?

12 replies
  • SEO
  • |
Hey guys,

I have stumbled an affiliate site of a specific niche and he updates the prices of the products on the site live.

I can have the product entire list as an xml or csv but it means uploading it to the site every day and it's not so convenient and takes time.

When I go to view the products at his site, you can actually see the prices of the products being updated live on the page, on the site itself.

This is how I want to do this on my future site from the same niche, any idea how this is done please?

Thank you, hope this was understood.
#question #technical
  • Profile picture of the author DNAWRealm
    Banned
    Most likely he's downloading a database of items and prices into MYSQL and updating every hour or so.
    {{ DiscussionBoard.errors[6983843].message }}
    • Profile picture of the author rinor81
      Originally Posted by DNAWRealm View Post

      Most likely he's downloading a database of items and prices into MYSQL and updating every hour or so.
      Not sure, because once I enter the page you actually see the prices change in front of your eyes. You don't think he gets them directly from the sites and updates live? Is it possible?

      Thanks,
      {{ DiscussionBoard.errors[6983915].message }}
      • Profile picture of the author DNAWRealm
        Banned
        Originally Posted by rinor81 View Post

        Not sure, because once I enter the page you actually see the prices change in front of your eyes. You don't think he gets them directly from the sites and updates live? Is it possible?

        Thanks,
        Yes it's possible but you would need to hire a coder to do that and it would be pricey.

        I had a similar situation where I was calling how many viewers a stream had, and it updated in real-time. The problem was that my page would take 5+ seconds to load because of the calling it had to do.

        In the end, I had to hire somebody to download it all into a database every 5minutes and then pull it locally from a DB.

        It's more than possible, but it's gunna cost you.
        {{ DiscussionBoard.errors[6983955].message }}
        • Profile picture of the author rinor81
          Originally Posted by DNAWRealm View Post

          Yes it's possible but you would need to hire a coder to do that and it would be pricey.

          I had a similar situation where I was calling how many viewers a stream had, and it updated in real-time. The problem was that my page would take 5+ seconds to load because of the calling it had to do.

          In the end, I had to hire somebody to download it all into a database every 5minutes and then pull it locally from a DB.

          It's more than possible, but it's gunna cost you.
          I can't hire someone to download it every 5 minutes. How about hiring a coder to get the new/updated prices from the sites to the affiliate site. Does it require writing some program for a one time payment? How is it done exactly? Any idea how much a coder will cost?

          Thanks man,
          {{ DiscussionBoard.errors[6984012].message }}
          • Profile picture of the author rinor81
            I think we'll be updating the product prices on a daily basis for now. Once a day, it's not too bad as well I think. Downloading the data base and uploading to the site every day, should be fine.

            Thanks for your help!
            {{ DiscussionBoard.errors[6984052].message }}
          • Profile picture of the author DNAWRealm
            Banned
            Originally Posted by rinor81 View Post

            I can't hire someone to download it every 5 minutes. How about hiring a coder to get the new/updated prices from the sites to the affiliate site. Does it require writing some program for a one time payment? How is it done exactly? Any idea how much a coder will cost?

            Thanks man,
            Hi,

            I don't mean somebody will physically download it. They can write you a PHP/MYSQL script that does it automatically and updates the prices every 5minutes - it's all automated.

            But as I said, it's gunna cost ya!
            {{ DiscussionBoard.errors[6984711].message }}
  • Profile picture of the author John Ac
    Well...

    You can not do that only by using php and mysql since from what are you saying this happen without refreshing the page and to do that you need java.

    PHP is a server side java is client side... this means that a php script is running in the server and you must make a request to the server to run the script and this mean you refresh the page. Java is running in the browser so you do not need to refresh it.

    This is not so difficult to do.. make a php script to update the prices in the db and then use java to access another php script to get those prices and this java must run at a certain period.

    If you are interested to get those price from his website send me more details and maybe I can help you with that.
    {{ DiscussionBoard.errors[6985202].message }}
    • Profile picture of the author rinor81
      Originally Posted by John Ac View Post

      Well...

      You can not do that only by using php and mysql since from what are you saying this happen without refreshing the page and to do that you need java.

      PHP is a server side java is client side... this means that a php script is running in the server and you must make a request to the server to run the script and this mean you refresh the page. Java is running in the browser so you do not need to refresh it.

      This is not so difficult to do.. make a php script to update the prices in the db and then use java to access another php script to get those prices and this java must run at a certain period.

      If you are interested to get those price from his website send me more details and maybe I can help you with that.

      Thanks John, for now we'll do the update once a day as it is sufficient for us, but I did mean the prices change after you refresh the page

      Thank you both for your help, let's see how it goes updating it once a day and if I'll need live updates (after page refresh) I'll ask you again.

      Take care and thank you!
      {{ DiscussionBoard.errors[6985769].message }}
      • Profile picture of the author John Ac
        Originally Posted by rinor81 View Post

        Thanks John, for now we'll do the update once a day as it is sufficient for us, but I did mean the prices change after you refresh the page

        Thank you both for your help, let's see how it goes updating it once a day and if I'll need live updates (after page refresh) I'll ask you again.

        Take care and thank you!
        Well if the prices are updated after the page is refreshed then this is very simple.

        Just a php code that retrieve the prices from a mysql dstabase.

        If the page refresh it self then then there is also a php function for that.

        In this case retrieving the prices is much more simple.

        Just a php script taht use curl to extract the prices, and put it in the chron job to run every 10-20 sec and make an mysql update.
        {{ DiscussionBoard.errors[6989147].message }}
  • Profile picture of the author edward20
    I think They are using AJAX for doing this
    {{ DiscussionBoard.errors[6985884].message }}
  • Profile picture of the author mosthost
    I'm sure they're using XML through an API.
    {{ DiscussionBoard.errors[6985933].message }}
    • Profile picture of the author edward20
      Maybe they are retrieving the prices using XML, but they cannot change the prices on an already loaded page without something AJAX, right ?
      {{ DiscussionBoard.errors[6986047].message }}

Trending Topics