Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Http request


Go to End


2 Posts   921 Views

Avatar
Sync100

Community Member, 3 Posts

30 September 2016 at 3:26am

Edited: 30/09/2016 3:27am


Hi,

I am trying to make a http request to another website inside a controller method. I searched on net but I didn't got any working sample.

Following I what I am trying to achieve (in php code):

$r = new HttpRequest('http://community.bba.org/home', HttpRequest::METH_GET);
$r->addQueryData(array('SessionID' => $arrGetParams['SessionID']));
try {
$r->send();
} catch (HttpException $ex) {
}

But that didn't work. Please guid me how can I accomplish this task?

Thanks

Avatar
kipjmejia

Community Member, 1 Post

11 October 2016 at 6:46pm

The most interesting pieces of information contained in the request are:
the IP address of you and/or your HTTP proxy
which document you requested
which version of which browser you're using
which page you came from to get here (if you followed a link)
your preferred language(s)
cookies
Check http://cheapessaywritingservice.us/ for getting more reference.