Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7826911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:37:17+00:00 2026-06-02T09:37:17+00:00

<?php class parsedictionary { public function _process() { $webpage=http://www.oppapers.com/essays/Computerized-World/160871?read_essay; $doc=new DOMDocument(); $doc->loadHTML($webpage); echo $doc;

  • 0
<?php
    class parsedictionary {
        public function _process() {
            $webpage="http://www.oppapers.com/essays/Computerized-World/160871?read_essay";
            $doc=new DOMDocument();
            $doc->loadHTML($webpage);
            echo $doc;
        }
    }
    $obj=new parsedictionary();
    $obj->_process();
?>

I can’t get the content of that page.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
    <body>
        <p>http://www.oppapers.com/essays/Computerized-World/160871?read_essay</p>
    </body>
</html>

But i need to get the content of that page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:37:18+00:00Added an answer on June 2, 2026 at 9:37 am

    The DOMDocument class is obviously not a string; you can iterate it, perform operations on it, but it can’t just be echoed. Check the documentation to see what you can do with it: http://www.php.net/domdocument

    To get the page contents, you can either use file_get_contents or do echo $doc->saveHTML()

    Edit: Didn’t realize you had another problem in your code; you can just use this instead:

    public function _process() {
        return file_get_contents('http://www.oppapers.com/essays/Computerized-World/160871?read_essay');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a PHP class to generate vcard: http://www.troywolf.com/articles/php/class_vcard/ But accented character do not
This is dbconnect.class.php: <?php class Connect { public $error; protected $db; public function __construct()
I'm using this php class ( http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php ) for creating the different sized images
Example class code: <?php class example { public function forExample() { return true; }
My PHP class looks like that. <?php class htmlize { protected $base_dir; public function
I have one PHP class thus: class DB extends mysqli{ public function __construct( {
class_1.php class class_1 { public function __construct() { require_once $_SERVER['DOCUMENT_ROOT'].'/array.php'; } } class_2.php class
I have following php class class User implements IUser { public function __construct($i_objParent =
See the following example (PHP) class Parent { protected $_property; protected $_anotherP; public function
This my dbconnect.class.php <?php class Connect { //public $error; public $db; public function __construct()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.