here’s how to do a simple web request, if it’s helpful:
#pragma once
#include "ofMain.h"
class testApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void urlResponse(ofHttpResponse & response);
};
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofRegisterURLNotification(this);
}
void testApp::urlResponse(ofHttpResponse & response){
if(response.status==200 ){
cout << response.request.name << endl;
cout << response.data.getText() << endl;
}else{
cout << response.status << " " << response.error << endl;
}
}
//--------------------------------------------------------------
void testApp::update(){
}
//--------------------------------------------------------------
void testApp::draw(){
}
//--------------------------------------------------------------
void testApp::keyPressed(int key){
ofLoadURLAsync("[http://www.cnn.com","load"](http://www.cnn.com","load"));
}
//--------------------------------------------------------------
void testApp::keyReleased(int key){
}
//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
}
yes – at the moment, https will not work (because poco is not compiled with SSL support).
you can take a look at the links I provided. also, if you could run php on a server, you could just mirror the content from the https source to http – something like this might work?