help:retrieve the Http response body

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
beso4ever
Forum Newbie
Posts: 10
Joined: Fri Jul 20, 2007 10:02 am

help:retrieve the Http response body

Post 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
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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.
beso4ever
Forum Newbie
Posts: 10
Joined: Fri Jul 20, 2007 10:02 am

Post 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 ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Try it. There are examples on the manual's pages and all over the web.
beso4ever
Forum Newbie
Posts: 10
Joined: Fri Jul 20, 2007 10:02 am

Post by beso4ever »

very thanks Ambush i solved it by curl

thanks to ur help :) :D
Post Reply