English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know how to do this in the Microsoft world: I can call the HTTPRequest class to get a page on the server - not on the client. I then want to find the title of the page in the DOM object to put into the new page I'm creating. I'm trying this:

$r = new HTTP_Request('http://www.yahoo.com/');
$r->sendRequest();
$page = $r->getResponseBody();

However, I'm getting this error:

"Cannot instantiate non-existent class: http_request"

Maybe my web host won't let me use that class. Is there another, easier way to do this?

Thanks.

2007-01-14 12:04:08 · 5 answers · asked by blue_prince_of_dallas 2 in Computers & Internet Programming & Design

5 answers

Try checking this page out: http://www.php.net/manual/en/http.httprequest.php

That error message is probably because there is no "_" in HttpRequest. That page has some functions you can use with the http request class. I've never tried this myself but hopefully this helps.

Note that this class doesn't come with the standard PHP installation and your host probably does not support it.

If you downloaded this script from http://www.daniweb.com/code/snippet616.html, then it might look like
$http_request = new http_request();

$resp = $http_request->raw();
echo nl2br($resp);

2007-01-14 12:49:05 · answer #1 · answered by jimiyash 4 · 0 0

ASP(.information superhighway) and own living house web page fall less than server-facet programming. The code in those scripts will be finished on the webserver itself and earlier the person perspectives the web page. customer-facet scripting languages which includes Javascript are literally not as functional and ought to't connect with databases operating example. On correct of that, server-facet scripts are a lot extra protect as customer-sided scripts can actual be changed by technique of the person.

2016-11-23 18:38:12 · answer #2 · answered by ? 4 · 0 0

Best Answer - Chosen By Voters

http://www.easyhostguide.com lists the top ten web hosting starting at only $2.95/mo

2007-01-15 07:11:49 · answer #3 · answered by Anonymous · 0 0

try finding a good script on hotscript.com. I used one from there once.

2007-01-14 12:08:32 · answer #4 · answered by momoftwo 3 · 0 0

the object is...
for IE...
xmlhttp = new ActiveXObject("Microsoft.XMLHttp");

for other browsers...
xmlhttp = new XMLHttpRequest();
.

2007-01-14 12:10:10 · answer #5 · answered by Kevin 3 · 0 0

fedest.com, questions and answers