Click here to Skip to main content
15,927,345 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: MFC - Changing text color Pin
Alessandra777-Feb-07 13:28
Alessandra777-Feb-07 13:28 
AnswerRe: MFC - Changing text color Pin
Alessandra777-Feb-07 13:31
Alessandra777-Feb-07 13:31 
QuestionRe: MFC - Changing text color Pin
Mark Salsbery7-Feb-07 13:35
Mark Salsbery7-Feb-07 13:35 
AnswerRe: MFC - Changing text color Pin
Alessandra777-Feb-07 13:38
Alessandra777-Feb-07 13:38 
GeneralRe: MFC - Changing text color Pin
Mark Salsbery7-Feb-07 14:08
Mark Salsbery7-Feb-07 14:08 
AnswerRe: MFC - Changing text color Pin
Mark Salsbery7-Feb-07 13:32
Mark Salsbery7-Feb-07 13:32 
GeneralRe: MFC - Changing text color Pin
Alessandra777-Feb-07 13:39
Alessandra777-Feb-07 13:39 
QuestionHelp with simple Visual C++ HTTP Client Pin
drows7-Feb-07 11:42
drows7-Feb-07 11:42 
Hey, I am part of a project which is being coded in Visual C++; however, I am a Java programmer. Thus I need some serious help (A fully written class would be wonderful!) with connecting to a URL via an HTTP connection, and then reading from the URL. The idea is to read from the URL in order to get a PHP script running.

I wrote a bit of code in Java to accomplish this task, but the project is being created in Visual C++.

Here is the java code I wrote:

<br />
public static void main(String[] args) {<br />
        String key = "/*insert key here*/";<br />
        try {<br />
            URL myURL = new URL("http", "/*insert url here*/", "/*script location here*/" + key); // defines the url<br />
            System.out.println(myURL); // prints the url<br />
            URLConnection appendConnect = myURL.openConnection();<br />
            BufferedReader in = new BufferedReader( /*reads from the url in order to get the server to execute the php script*/<br />
                                new InputStreamReader(<br />
                                appendConnect.getInputStream()));<br />
            in.close(); // we don't need to return any data from the reader.<br />
<br />
        } catch (MalformedURLException e) { // exception catching code doesn't matter at this point<br />
            System.err.println("LOL!");<br />
        } catch (IOException e) {<br />
            System.err.println("LOL!!");<br />
        }<br />
    }<br />


The key is just a random string of numbers and characters which is read by the PHP script on the server and compared against the script's key. The key can be combined with the URL if that makes it any simpler.

Help would be really wonderful!
AnswerRe: Help with simple Visual C++ HTTP Client Pin
Ravi Bhavnani7-Feb-07 14:11
professionalRavi Bhavnani7-Feb-07 14:11 
AnswerRe: Help with simple Visual C++ HTTP Client Pin
ThatsAlok7-Feb-07 20:05
ThatsAlok7-Feb-07 20:05 
QuestionPython to C++ Pin
kerthy_297-Feb-07 9:59
kerthy_297-Feb-07 9:59 
QuestionRe: Python to C++ Pin
David Crow7-Feb-07 10:24
David Crow7-Feb-07 10:24 
AnswerRe: Python to C++ Pin
kerthy_297-Feb-07 12:07
kerthy_297-Feb-07 12:07 
GeneralRe: Python to C++ Pin
Jörgen Sigvardsson7-Feb-07 12:44
Jörgen Sigvardsson7-Feb-07 12:44 
GeneralRe: Python to C++ Pin
kerthy_297-Feb-07 12:53
kerthy_297-Feb-07 12:53 
GeneralRe: Python to C++ Pin
Jörgen Sigvardsson7-Feb-07 13:04
Jörgen Sigvardsson7-Feb-07 13:04 
GeneralRe: Python to C++ Pin
Garth J Lancaster7-Feb-07 14:24
professionalGarth J Lancaster7-Feb-07 14:24 
QuestionDLL renaming Pin
act_x7-Feb-07 9:37
act_x7-Feb-07 9:37 
AnswerRe: DLL renaming Pin
Hamid_RT7-Feb-07 18:29
Hamid_RT7-Feb-07 18:29 
AnswerRe: DLL renaming Pin
prasad_som7-Feb-07 18:39
prasad_som7-Feb-07 18:39 
QuestionMFC or VB.net Pin
Member 38045467-Feb-07 7:51
Member 38045467-Feb-07 7:51 
AnswerRe: MFC or VB.net Pin
Hamid_RT7-Feb-07 8:18
Hamid_RT7-Feb-07 8:18 
GeneralRe: MFC or VB.net Pin
Mark Salsbery7-Feb-07 8:30
Mark Salsbery7-Feb-07 8:30 
AnswerRe: MFC or VB.net Pin
James R. Twine7-Feb-07 8:36
James R. Twine7-Feb-07 8:36 
AnswerRe: MFC or VB.net Pin
led mike7-Feb-07 9:42
led mike7-Feb-07 9:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.