Dodo8's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
8 (0.01 per day)
Joined:
21-May 12
Profile Views:
150
Last Active:
User is offline Jun 04 2012 06:02 AM
Currently:
Offline

Previous Fields

Country:
RO
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
Icon   Dodo8 has not set their status

Posts I've Made

  1. In Topic: Question: Creating a program that gets the biggest Revision number?

    Posted 22 May 2012

    View Postbaavgai, on 22 May 2012 - 11:26 AM, said:

    Now wait, before you also said C#... If you're doing standard .NET programming, there's built in stuff you can use. e.g. http://msdn.microsof...=vs.110%29.aspx

    If you're using plain old C and can't get curl to work, it's actually not that hard to get HTTP response text with a few socket calls. You should find tons of socket code on the net. Even for windows.

    No one here is just going to do it for you. You can find example code all over the place to grab web pages in C and C++. If YOU are writing a program then we'd love to help. Show the code. ( And probably start a new thread if you ever do write any code. )


    Thanks. I know a guy that downloaded all the images using .NET framework. Maybe it helps with my problem too. -.-

    I think I found something: http://msdn.microsof...(v=vs.110).aspx If I'll need help with the program I'll tell in a new post thanks.
  2. In Topic: Question: Creating a program that gets the biggest Revision number?

    Posted 22 May 2012

    View Postbaavgai, on 22 May 2012 - 04:00 AM, said:

    I'd also use curl:
    [baavgai#DIC]$ curl -I http://empire-s.assets.zgncdn.com/assets/58370/gameSettings.xml
    HTTP/1.1 200 OK
    x-amz-id-2: R+53q4FoxSUDxsYKsim7t/jippFcVCCvArDrFEP/8fq+mysqc+teUAjpzWwRdK5Y
    x-amz-request-id: BFEEADEA39653CBC
    Accept-Ranges: bytes
    Content-Type: text/xml
    Server: AmazonS3
    Age: 307651
    Date: Mon, 21 May 2012 19:46:28 GMT
    Last-Modified: Fri, 18 May 2012 19:35:16 GMT
    Expires: Fri, 17 May 2013 15:35:04 GMT
    Content-Length: 5056465
    Via: 1.1 localhost.localdomain
    
    [baavgai#DIC]$ curl -I http://empire-s.assets.zgncdn.com/assets/58370/gameSettings.xm
    HTTP/1.1 403 Forbidden
    x-amz-request-id: BAA9A94CFCF90D6D
    x-amz-id-2: BqOyORsmmmh08AgDoGkLyDDD/SROB+BFBdImclz9BEFGm6+M9lTzw9a8yXzJ1+VX
    Content-Type: application/xml
    Date: Tue, 22 May 2012 10:46:38 GMT
    Server: AmazonS3
    Age: 0
    
    [baavgai#DIC]$
    
    


    What do we know? The first is the result of file in question. The second is an intentional call to something that isn't there. We also know they're using Amazon... unimportant for this.

    Perhaps:
    [baavgai#DIC]$ curl -s -I http://empire-s.assets.zgncdn.com/assets/58370/gameSettings.xml | grep '^Last-Modified:'
    Last-Modified: Fri, 18 May 2012 19:35:16 GMT
    [baavgai#DIC]$ curl -s -I http://empire-s.assets.zgncdn.com/assets/58370/gameSettings.xm | grep '^Last-Modified:'
    [baavgai#DIC]$
    
    


    Perfect. I'm unlikely to get a Last-Modified on a buggered response. So, if I take the result and compare it to what I have, I know if I'm up to date or not.

    You want to do that in C? Well, there is libcurl. Have at.


    Thanks. I will try libcurl if anyone can't help with C or C++. :dontgetit:
  3. In Topic: Question: Creating a program that gets the biggest Revision number?

    Posted 22 May 2012

    Sorry it's my mistake. I forgot to tell you that I'm using Windows 7... not Linux. And JackOfAllTrades, I'm really a kiddie. I haven't finished 6th grade yet :dozingoff: . So if you can please help me, if I use C++ of C# what should I select? "win32 Console Application" , "Native Unit Test Project", etc?
  4. In Topic: Question: Creating a program that gets the biggest Revision number?

    Posted 22 May 2012

    View PostJackOfAllTrades, on 21 May 2012 - 02:52 PM, said:

    What the hell? If all you want to do is check that the directory name there is valid, move to curl and use

    #!/usr/bin/env bash
    
    RESULT=$(curl -I -s -w %{http_code} http://empire-zc.static.zgncdn.com/assets/52767/gameSettings.xml -o /dev/null)
    if [ $RESULT -eq 200 ]; then
    	echo "OK"
    else
    	echo "Fail"
    fi
    


    so you're not uselessly beating the hell out of the server.

    Moved to Other Languages, as other than a mention of C++, all I see is a Bash script.


    It says there were build errors. I think I don't select the right Project type?
  5. In Topic: Question: Creating a program that gets the biggest Revision number?

    Posted 22 May 2012

    Thanks all very much :rolleyes: .

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
1
Programming Languages:
Wikia

Contact Information

E-mail:
Private

Friends

Dodo8 hasn't added any friends yet.

Comments

Dodo8 has no profile comments yet. Why not say hello?