Page 1 of 1

help:retrieve the Http response body

Posted: Fri Jul 20, 2007 10:09 am
by beso4ever
hi everyone
i need help

how can i get or retrieve the Http response body and put it on an array

ex: if i request this url
http://www.mysite.com/page.php?var1=3&var3=r

when i sumbit this request i need the response body or response to make some operation on it
please anyone help me

thanks

Posted: Fri Jul 20, 2007 11:42 am
by Ambush Commander
If the headers are not necessary and fopen remote files is enabled file_get_contents will do the trick. Otherwise, use cURL.

Posted: Fri Jul 20, 2007 12:01 pm
by beso4ever
Ambush Commander wrote:If the headers are not necessary and fopen remote files is enabled file_get_contents will do the trick. Otherwise, use cURL.
thanks

i will use curl library but if u have quickly soulation it is will be better

are this library(Curl) will give me respnse body of any requested page on web ?

Posted: Fri Jul 20, 2007 5:48 pm
by feyd
Try it. There are examples on the manual's pages and all over the web.

Posted: Tue Jul 24, 2007 5:15 am
by beso4ever
very thanks Ambush i solved it by curl

thanks to ur help :) :D