hi, I want to do a webcam chat in my website... I google it but I dont find a pattent solution to add this webcam chat using jquery or PHP! I just do it sucessfully with C# windows forms application... and never in my website... if you can help me please let me know! Thanks, KZ
A colleague of mine just asked for a spot of help in relation to a web service. Seems it was taking a long while for our web site to build the client object (its a web reference to an asmx web service ...)
Then I looked at the client code ... 4.3Mb WSDL file!!!!! 7mb .CS code file!!!!!!
182,000+ lines of code!!!!!!!!!!!
Has anyone seen or have experience with a service like this? To my mind this is utterly insane, I've certainly never encountered a single service of this size. Is there anything that could be done client side to try to improve performance?
I want to create an application, either web or windows , is it possible to store the links of website which user of the system visits the sites and the may use any browser, if it is possible , please give me suggetion, how to do it?
How to know whether the server has no data while reading the response of a request which is keep alive because the socket read function waits for the server to send data if we have made a request with keep alive option.
I am writing a socket program to fetch a webpage.
My request header has no connection close header so by default the connection is keep alive.
I open a connection, send the request header using socket_write and getting using a while loop to receive data if it is a Connection Close request the everything works well.
if it is keep alive and after i have read the content the socket_read function is still waiting for data which causes the code to hand in there.
Here how do we know whether the server has completed sending the resource though it is keep alive...
i have a work around like checking the content-length response header to know how much data is received and accordingly i can stop reading
if response header has transfer-encoding as chunked then i can write more code to find the end of the response
yet without the above two workarounds how to check whether the socket_recv is still waiting for data?
Besides, i was thinking that since we are setting the read buffer length (like 1024 in this code) and the socket_recv is returning the no of bytes read and if the bytes read is less than 1024 then i can assume that the next read will not return anything and by this time i can quit the while loop.... BUT http server sends different length response so my logic will not work.
Here is my request header and the while loop in which i receive date from the server
//i have commented the connection close header so that by default it will be keep alive
$o = 'GET /search?hl=en&q='.$query.'&start='.$start.' HTTP/1.1'."\r\n";
$o.= 'Host: www.google.co.in'."\r\n";
$o.= 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0'."\r\n";
//$o.= 'Connection: close'."\r\n";
//writing $o to the socket resource//receiving the response
$bytes = socket_recv($f, $tbuf, 1024, 0x40);
if($bytes === false)
die("\r\nUnable to read headers - ".socket_strerror(socket_last_error()));
In the above code after i have received the complete html of a webpage the control is in the line where i am reading the response. Which i assume the code is still waiting for data from the server.