Thanks for the response Cactus_Hugger.. Yes it is in fact chunked and your response helps me understand more of my problem which I was looking for.. Thanks to the guys for the help on cleaning up my...
Type: Posts; User: blake_
Thanks for the response Cactus_Hugger.. Yes it is in fact chunked and your response helps me understand more of my problem which I was looking for.. Thanks to the guys for the help on cleaning up my...
Thanks for the info but I'll show you what usually happens when I dump the html source into a text file...
Original Line: <td><a href="index.php?showuser=387288">Villaloboos</a><br><span...
okay, it's added as you showed. now what
How is your way any different then my way? You're pretty much just -1 by 513 which equals to 512 like I kept in my recv, so it doesnt add anything on 513 so once it hits 512 then it will add a \0 on...
int main()
{
WSADATA WsaDat;
SOCKET D2JSP;
sockaddr_in D2;
hostent* dHost;
char *dIP, *request, dbuf[513];
int dRecv;
ok so now what do i do so i stop getting incomplete lines?
i dont know what you mean by dIP.. it has that same line in the examples on the winsock reference. it works just fine and for dbuf its not giving me any runtime errors so it must not be appending it...
I would like to know how any of this is incorrect or is "buggy"...
void dSend (int D2JSP, char* request) {
if (send(D2JSP, request, strlen(request), 0) == SOCKET_ERROR) {
...
huh? Anyways, is there anyone out there that can answer my question instead of trying to correct everything I write? Clearly, this isn't solving my problem.. Thanks...
ofstream dparse ("d2jsp.txt");
do {
dRecv = recv(D2JSP, dbuf, 512, 0);
dbuf[dRecv] = '\0';
if (dRecv == SOCKET_ERROR) {
cout<<"Failed to recieve data...
I tried everything you guys mention.. come on now.. why would I ask for help and not take your suggestions.. if they worked then i wouldnt be here but they don't so i need help on why i keep getting...
bump
I'm not sure why.. I never really thought about it, and I'm new to all of this so I just stick to the examples and thats what it shows.. I'll change it though and see what happens...
It's just...
Thanks but do you have any idea for the cut lines?
#include <iostream>
#include <string>
#include <fstream>
#include <stdio.h>
#include <string.h>
#include <winsock.h>
using namespace std;
void stopic (void);
Yeah of course.. It's in a loop..
for (;recv(FORUM, dbuf, 512, 0) > 0;) { write << dbuf; }
It's not just the forum page either.. It's any website where it cuts off lines... So I really need...
So, I have the basic socket where it connects to a webpage, and dumps the page source into a text document so I can check if there is new posts on a forum. But I always never get it the way it shows...