storing information on a server for request

i recently have been thinking for a personal service, like some kind of silly thing to do with my friends, what i want to do is somehow store some data on a server and then request it from a website, i will be pretty specific and i actually know that it would be hard for someone to explain me how to do it exactly, i have some knowledge about c++ and some objective c, not much of web programing but i know some basics;
Lets say i have a c++ program that generates a number like this:

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <fstream>

using namespace std;

int main()
    float cpuNumber;
    cpuNumber = 0;
    cpuNumber = rand() % 10 + 1;
    ofstream myfile; ("number.txt");
    myfile << cpuNumber;
    return 0;

what i want to do is take the contents of that file, and put it in a server in any way, to then be requested via a website or some ssh command, i have a VPS;
i am willing to try any method to get this done.
Thanks in advanced.

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.