Hello guys, I want to do a test with the Dreamcast Modem. I learned about the BlueCrab ppp.h in KallistiOS, and I'm able to make the Modem Dial and also ping an IP. I'd like to know if it is possible to ping a PHP URL using the post method where I'm going to send some parameters, example:
http://www.mytext.com?name=dreamcast&age=21
I'm using this code:
#include <stdio.h>
#include <kos/dbglog.h>
#include <arch/arch.h>
#include <ppp/ppp.h>
#include <kos/net.h>
KOS_INIT_FLAGS(INIT_DEFAULT | INIT_NET);
int main(int argc, char *argv[]) {
int i;
ppp_init();
i = ppp_modem_init("12", 1, NULL);
if(i < 0)
return 0;
ppp_set_login("dream", "cast");
i = ppp_connect();
if(i == -1) {
printf("Link establishment failed!\n");
return 0;
}
printf("Pinging the other side of the link (%d.%d.%d.%d)\n",
net_default_dev->gateway[0], net_default_dev->gateway[1],
net_default_dev->gateway[2], net_default_dev->gateway[3]);
for(i = 0; i < 10; ++i) {
net_icmp_send_echo(net_default_dev, net_default_dev->gateway, 1234, i,
NULL, 0);
thd_sleep(500);
}
printf("Pinging sylverant.net (67.222.144.120)\n");
for(i = 0; i < 10; ++i) {
uint8 addr[4] = { 67, 222, 144, 120 };
net_icmp_send_echo(net_default_dev, addr, 1234, i, NULL, 0);
thd_sleep(500);
}
ppp_shutdown();
return 0;
}
I tried to created a method: https://stackoverflow.com/questions/2207...e-response
But I didn't get it working. Any input or directions would be welcome, thanks a lot.
http://www.mytext.com?name=dreamcast&age=21
I'm using this code:
#include <stdio.h>
#include <kos/dbglog.h>
#include <arch/arch.h>
#include <ppp/ppp.h>
#include <kos/net.h>
KOS_INIT_FLAGS(INIT_DEFAULT | INIT_NET);
int main(int argc, char *argv[]) {
int i;
ppp_init();
i = ppp_modem_init("12", 1, NULL);
if(i < 0)
return 0;
ppp_set_login("dream", "cast");
i = ppp_connect();
if(i == -1) {
printf("Link establishment failed!\n");
return 0;
}
printf("Pinging the other side of the link (%d.%d.%d.%d)\n",
net_default_dev->gateway[0], net_default_dev->gateway[1],
net_default_dev->gateway[2], net_default_dev->gateway[3]);
for(i = 0; i < 10; ++i) {
net_icmp_send_echo(net_default_dev, net_default_dev->gateway, 1234, i,
NULL, 0);
thd_sleep(500);
}
printf("Pinging sylverant.net (67.222.144.120)\n");
for(i = 0; i < 10; ++i) {
uint8 addr[4] = { 67, 222, 144, 120 };
net_icmp_send_echo(net_default_dev, addr, 1234, i, NULL, 0);
thd_sleep(500);
}
ppp_shutdown();
return 0;
}
I tried to created a method: https://stackoverflow.com/questions/2207...e-response
But I didn't get it working. Any input or directions would be welcome, thanks a lot.