Using a webpage to update a game

The game will look on the webpage to see if there is a update availabl

Page 1 of 1

1 Replies - 696 Views - Last Post: 04 November 2008 - 04:31 PM Rate Topic: -----

#1 Evrito  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 22-May 08

Using a webpage to update a game

Post icon  Posted 04 November 2008 - 12:57 PM

I dont know if its possible but it would be nice I tried this:
#include <iostream.h>
#include <fstream.h>

main()
{
unsigned short num = 0;

ifstream god("http://www.geocities.com/evrito/asdf.html");
god >> num;
god.close();
	  
cout << num;

cin.get();
			
return 0;
}



And I got 0. If it will help to know im using Dev C++ and my friends game engine to create the game its at www.infgame.com.

Is This A Good Question/Topic? 0
  • +

Replies To: Using a webpage to update a game

#2 Gloin  Icon User is offline

  • Expert Schmexpert...
  • member icon

Reputation: 235
  • View blog
  • Posts: 4,489
  • Joined: 04-August 08

Re: Using a webpage to update a game

Posted 04 November 2008 - 04:31 PM

I guess the simplest way is to have a file on the webpage that stores the latest date when there was an update. In the same way, the last download date should be stored in a parameter in the game. Compare the two dates and if they're not equal, perform the download of the update. This way you don't need any complicated functions, just read two files and compare two strings.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1