<PAGE>   1
                                                                    EXHIBIT 10.5


             AMENDED AND RESTATED VOTING AND STOCKHOLDERS AGREEMENT



                  THIS AMENDED AND RESTATED VOTING AND STOCKHOLDERS AGREEMENT
(the "Agreement") is made this 8th day of April, 1998, by and among REAL MEDIA,
INC., a Delaware corporation (the "Company"), PUBLIGROUPE USA HOLDING, INC.
("PUBLIGroupe" or a "Purchaser"), a Purchaser of the Company's Common Stock
pursuant to a certain Stock Purchase and Stockholder Agreement dated as of June
19, 1997 (the "PUBLIGroupe Purchase Agreement"), ADVANCE INTERNET, INC., a New
Jersey corporation ("Advance" or a "Purchaser"), a Purchaser of the Company's
Common Stock pursuant to a certain Stock Purchase Agreement dated as of the date
hereof (the "Purchase Agreement") and the persons listed as Management
Stockholders in the signature pages hereto (collectively, the "Management
Stockholders" and individually, a "Management Stockholder").

                  WHEREAS, the Company, PUBLIGroupe and the Management
Stockholders have entered into a Voting Agreement dated as of December 3, 1996,
as amended and restated on June 19, 1997 (the "Original Voting Agreement"); and

                  WHEREAS, PUBLIGroupe has previously purchased from the
Company, and on the date hereof Advance is purchasing from the Company shares of
its Common Stock, and hereafter each of PUBLIGroupe and Advance may, from time
to time, purchase from the Company additional shares of its Common Stock
(together, the "Purchaser Stock"); and

                  WHEREAS, the Company and the Management Stockholders are
parties to a Stockholders' Agreement dated August 31, 1996 (the "Original
Stockholders' Agreement"); and

                  WHEREAS, the Purchasers and the Management Stockholders wish
to set forth their entire understanding with respect to the voting and
disposition of their Shares (as defined below), and the parties are willing to
execute this Agreement and to be bound by the provisions hereof;

                  NOW, THEREFORE, in consideration of the premises, the
agreements set forth below, and the parties' desire to further the interests of
the Company and its present and future stockholders, the parties agree as
follows:

                  1. DEFINITION. As used in this Agreement, the term "Shares"
means all shares of equity securities of the Company (i) now or hereafter owned
(either beneficially or of record) by a Management Stockholder or a Purchaser
(including Purchaser Stock), and (ii) which a Management Stockholder or a
Purchaser does not own (either beneficially or of record) but as to which now
or hereafter has the right to exercise voting control.

                  2. TERM. This Agreement shall continue with respect to each
Purchaser until such time as such Purchaser owns or controls less than ten
percent (10%) of the outstanding Shares of the Company. This Agreement shall
terminate absolutely at such time as both Purchasers each owns less than ten
percent (10%) of the outstanding shares of the Company.
<PAGE>   2
                  3. DESIGNATION OF NOMINEES.

                     (a) Each Purchaser shall have the right to designate two(2)
nominees (individually, a "Purchaser Nominee") for election as directors of the
Company.

                     (b) The Management Stockholders, voting as a single class,
shall have the right to designate three (3) nominees (each a "Management
Stockholder Nominee") for election as directors of the Company.

                  4. ELECTION OF DIRECTORS. At each meeting (or written action
in lieu of a meeting) of stockholders of the Company at or by which any
Purchaser Nominee or any Management Stockholder Nominee is to be elected, the
Purchasers and the Management Stockholders shall vote all their Shares to elect
such Purchaser Nominees and/or Management Stockholder Nominees, as applicable.
In the event a Purchaser decides not to designate its Purchaser Nominees,
Management Stockholders may vote all or any of their Shares to elect any person
nominated for election as a director of the Company. In the event Management
Stockholders decide not to designate any Management Stockholder Nominee,
Purchasers may vote all or any of its Purchaser Stock to elect any person
nominated for election as a director of the Company.

                  5. SUCCESSOR DIRECTORS.

                     (a) If any Purchaser Nominee shall cease to serve as a
director for any reason, the Purchaser who designated such Purchaser Nominee
shall have the right to designate a successor Purchaser Nominee.

                     (b) If any Management Stockholder Nominee shall cease to
serve as a director for any reason, the Management Stockholders, voting as a
single class, shall have the right to designate a successor Management
Stockholder Nominee.

                     (c) If (i) a Purchaser notifies the Company that it desires
to remove any of its Purchaser Nominees as a director and/or designate a
successor Purchaser Nominee or (ii) all of the Management Stockholders notify
the Company that they desire to remove a Management Stockholder Nominee or (iii)
the Management Stockholders, voting as a single class desire to designate a
successor Management Stockholder Nominee, the Company shall, at the request of a
Purchaser or the Management Stockholders, as applicable, use its best efforts to
ensure that a meeting of stockholders of the Company is promptly called for such
purpose.

                  6. MANAGEMENT AND CONTROL.

                     (a) Without the prior affirmative vote or consent of at
least six of the seven members of the Company's Board of Directors, the Company
shall not:

                         (i) adopt or effect any plan of sale, merger,
consolidation, dissolution, reorganization or recapitalization of the Company;

                         (ii) increase or decrease the number of directors
constituting the Board of Directors of the Company; or


                                     - 2 -
<PAGE>   3
                         (iii) enter into a significant new line of business
which is unrelated to its then existing business.

                     (b) without the prior affirmative vote or consent of at
least five of the seven members of the Company's Board of Directors, the Company
shall not:

                         (i) sell all or substantially all of the assets of the
Company, provide , however, that any sale of all or substantially all of the
assets of the Company's online advertising business shall require the consent of
Advance;

                         (ii) make any capital expenditures of one million
dollars ($1,000,000) or more which are not included in the Company's capital
budget;

                         (iii) remove, terminate or request the resignation of
the Company's chief executive officer or appoint a new chief executive officer
of the Company, provided that with respect to this subsection (iii), the vote or
consent of at least five directors shall be required only so long as David
Morgan is the chief executive officer of the Company, and at any time that David
Morgan is not the chief executive officer, then the affirmative vote or consent
of at least four of the seven members of the Company's board of directors shall
be required with respect to the actions set forth in this subparagraph (iii).

                     (c) The annual operating budget for the Company shall be
subject to approval by at least four of the seven members of the Company's Board
of Directors. If the Company shall commence operations in a new fiscal year
prior to the adoption of the annual operating budget for such year, then the
Company shall continue to operate under the budget adopted for the immediately
preceding fiscal year until such time as the new operating budget shall be
adopted.

                     (d) The chief executive officer of the Company shall be
responsible for the day-to-day operations and decisions for the Company.

                  7. RIGHT OF FIRST OFFER.

                     (a) If at any time after the date hereof the Company
desires to issue new equity securities other than equity securities issued from
the Reserve (as defined below), the Company shall submit a written notice to
Purchasers including in such notice an offer to sell (the "Offer to Sell") the
equity securities (the "Offered Shares") on terms and conditions, including
price, of the proposed sale, and any other material facts relating to the
proposed sale.

                     (b) Purchasers may, at their election, purchase any or all
of the Offered Shares. The purchase of Offered Shares shall be made by each
Purchaser who elects to purchase any Offered Shares in proportion to its equity
ownership interest in the Company at the time the offer to Sell is given by the
Company, or in such other amounts as they may agree, provided, however, that in
the event a Purchaser shall elect not to purchase any of the Offered Shares (or
an amount less than such Purchasers pro rata share), the other Purchaser may
elect to purchase any or all of the portion of the remaining offered Shares.


                                     - 3 -
<PAGE>   4
                     (c) If a Purchaser elects to purchase any Offered Shares
(the "Accepted Shares," and together with the Shares previously purchased, the
"Purchaser Stock"), such Purchaser shall communicate in writing its election to
purchase all of the Accepted Shares from the Company, within thirty (30) days of
the date the Offer was made. Such communication shall, when taken in conjunction
with the offer, be deemed to constitute a valid, legally binding and enforceable
agreement for the sale and purchase of the Offered Shares. Sales of the Offered
Shares to be sold by the Company pursuant to this Section 7 shall be made at the
offices of the Company on the 45th day following the date the Offer was made (or
if such 45th day is not a business day, then on the next succeeding business
day) (the "Transaction Date"). Such sales shall be effected by the Company's
delivery to each Purchaser of a certificate or certificates evidencing the
Offered Shares to be purchased by such Purchaser, duly endorsed for transfer to
such Purchaser, against payment to the Company of the purchase price therefor by
the Purchasers payable by wire transfer in immediately available U.S. dollar
funds.

                     (d) If the Purchasers do not purchase all of the offered
Shares, any offered Shares which are not purchased by the Purchasers may be sold
by the Company at any time within ninety (90) days after the date the Offer to
Sell was made, subject to the other provisions of this Agreement. Any such sale
shall be made only to a "Permitted Buyer", as hereinafter defined, at not less
than the price and upon such other terms and conditions, if any, which are
substantially the same as, and no more favorable to the proposed buyer than,
those specified in the Offer to Sell. Any offered Shares not sold within such
ninety (90) day period shall continue to be subject to the requirements of this
Section 7, unless otherwise stated in this Agreement. For purposes of this
Section 7, a "Permitted Buyer" shall mean any person or entity other than a
person or entity which is engaged in the business of newspaper publishing,
publishing on the Internet for the primary purpose of selling advertising or
subscriptions, or providing advertising service in competition with PubliGroupe,
S.A.

                     (e) As used in this Section 7, the term "Reserve" shall
mean (i) the shares of capital stock to be issued pursuant to warrants, options,
agreements, subscription rights, convertible or exchangeable securities, or
other commitments of the Company to issue or sell capital stock which are
currently outstanding and disclosed on Schedule 3.1.7 to the Purchase Agreement
and (ii) up to 200,000 shares of capital stock to be issued pursuant to such
options, warrants, rights or other securities which may hereafter be granted or
issued to employees and consultants of the Company with the approval of a
majority of the Board of Directors of the Company.

                  8. RESTRICTIONS ON TRANSFER BY PURCHASERS.

                     (a) Neither Purchaser shall sell, assign, transfer, pledge,
hypothecate, make gifts of or in any manner whatsoever dispose of (other than in
connection with a redemption or purchase by the issuer thereof) or encumber (any
such sale, assignment, transfer, pledge, hypothecation, gift or disposition
being hereinafter referred to in this Section 8 as a "Transfer") any Purchaser
Stock or any interest therein, except pursuant to a Permitted Transfer in
accordance with Section 8(b). Any purported Transfer by a Purchaser in violation
of this Agreement shall be null and void and of no force and effect and the
purported transferee shall have no rights or privileges in or with respect to
the Company.


                                     - 4 -
<PAGE>   5
                     (b) Notwithstanding anything to the contrary contained
herein, a Purchaser may Transfer any or all of its Purchaser Stock pursuant to a
Permitted Transfer (as defined below) if: prior to the consummation of any such
Permitted Transfer (other than a Transfer described by clauses (1) or of the
definition of "Permitted Transfer" below): (i) such Purchaser notifies the
Company in writing of the proposed Permitted Transfer; and (ii) the proposed
transferee agrees in a writing delivered to the Company to become a party to
this Agreement and pursuant to which writing such proposed transferee (A) shall
be bound by the terms and conditions of this Agreement in the same manner and to
the same extent as such Purchaser, and (3) shall be entitled to the benefit of
the provisions of this Agreement in the same manner and to the same extent as
such Purchaser. For purposes of this Agreement, a "Permitted Transfer" shall
mean any Transfer of Purchaser Stock: (1) by a Purchaser in connection with a
public offering by the Company of its common stock in which the Purchaser is
permitted to register Purchaser Stock or (2) by a Purchaser to the Company or
its designated assignees; and (3) by a Purchaser to any subsidiary or affiliate
in which such Purchaser (or its ultimate parent company) owns, directly or
indirectly, at least a majority of the outstanding shares of voting stock of
such subsidiary or affiliate, or any person (other than a corporation) in which
such Purchaser (or its ultimate parent company) owns at least a majority of the
equity interests of such person (provided that such Purchaser (or its ultimate
parent company) continues to beneficially own, whether directly or indirectly,
at least a majority of the shares of voting stock or equity interests of such
subsidiary or other person).

                     (c) Prior to any proposed Transfer of any Purchaser Stock
(other than a Transfer described by clauses (1) or (2) of the definition of
"Permitted Transfer" above), the Purchaser (i) shall give written notice to the
Company describing the manner and circumstances of the proposed Transfer, and
(ii) unless waived by the Company, shall deliver a written opinion of legal
counsel, addressed to the Company and the transfer agent, if other than the
Company, and in customary form and substance to each addressee, to the effect
that the proposed Transfer of the Shares may be effected without registration
under the United States Securities Act of 1933 ("Securities Act") and applicable
state securities laws.

                  9. RESTRICTIONS ON TRANSFERS.

                     (a) No Management Stockholder shall sell, assign, transfer,
pledge, hypothecate, make gifts of or in any manner whatsoever dispose of (other
than in connection with a redemption or purchase by the issuer thereof) or
encumber (any such sale, assignment, transfer, pledge, hypothecation, gift or
disposition being hereinafter referred to in this Section 9 as a "Transfer") any
Shares or any interest therein, except pursuant to a Permitted Transfer in
accordance with Section 9(b). Any purported Transfer by any Management
Stockholder in violation of this Agreement shall be null and void and of no
force and effect and the purported transferee shall have no rights or privileges
in or with respect to the Company.

                     (b) Notwithstanding anything to the contrary contained
herein, a Management Stockholder may Transfer any and all Shares pursuant to a
Permitted Transfer (as defined below) if: (i) prior to the consummation of any
such Permitted Transfer, the Management Stockholder proposing the Permitted
Transfer notifies the Company in writing of the proposed Permitted Transfer; and
(ii) in the case of Permitted Transfers described by clauses (1) and (3) of the
definition of "Permitted Transfer" below, the proposed transferee agrees in a


                                     - 5 -
<PAGE>   6
writing delivered to the Company to become a party to this Agreement and
pursuant to which writing such proposed transferee (A) shall be bound by the
terms and conditions of this Agreement in the same manner and to the same extent
as the Management Stockholder who proposes to Transfer such Shares, and (B)
shall be entitled to the benefit of the provisions of this Agreement in the same
manner and to the same extent as the Management Stockholder who proposes to
Transfer such Shares. For purposes of this Agreement, a "Permitted Transfer"
shall mean any Transfer of Securities: (1) by any management Stockholder who is
a natural person to such Management Stockholder's spouse or children or by will
or the laws of descent and distribution on account of the death of such
Management Stockholder to such stockholder's spouse or descendants; (2) by any
Management Stockholder in connection with a public offering, provide , the
Purchasers are offered the right to participate in such offering on the same
terms and conditions as the Management Stockholders participating in such
offering and each Purchaser is permitted (but not required) to sell in such
offering not less than an amount of such Purchaser's Stock equal to the amount
of such Purchaser's Stock multiplied by a fraction, the numerator of which is
the number of shares of Purchaser Stock then held by such Purchaser and the
denominator of which is the sum of the number of shares of Purchaser Stock then
held by such Purchaser plus the number of Shares to be sold by all Management
Stockholders and the other Purchaser in such offering; (3) by any Management
Stockholder to (I) any corporation, partnership or other business entity in
which such Management Stockholder or Management Stockholders owns, directly or
indirectly, all of the equity interests of such entity (provided that such
Management Stockholder or Management Stockholders, together with any person
described in clause (1) above, continues to beneficially own, whether directly
or indirectly, all of the equity interests of such entity), or (II) to any of
the Management Stockholders on the date hereof; or (III) to any employee or
consultant of the Company at the time of transfer.

                      (c) Prior to any proposed Transfer of any Shares (other
than a Transfer described by clause (2) of the definition of "Permitted
Transfer" above), the Management Stockholder (i) shall give written notice to
the Company describing the manner and circumstances of the proposed Transfer,
and (ii) unless waived by the Company, shall deliver a written opinion of legal
counsel, addressed to the Company and the transfer agent, if other than the
Company, and in customary form and substance to each addressee, to the effect
that the proposed Transfer of the Shares may be effected without registration
under the United States Securities Act of 1933 ("Securities Act") and applicable
state securities laws.

                  10. LEGEND. Each certificate evidencing Shares issued
following the date hereof shall bear a legend substantially as follows:

                  "The shares represented by this certificate are subject to the
                  terms and conditions of a certain Amended and Restated Voting
                  and Stockholders Agreement dated as of April 1998, a copy of
                  which the Company will furnish to the holder of this
                  certificate upon request and without charge."

                  11. NOTICES. All notices or other communications given
hereunder shall be in writing and shall be deemed effective upon delivery at the
address of the party to be notified and shall be mailed by certified or
registered mail, return receipt requested, delivered by courier, telecopied, or
sent by other facsimile method (notices by telecopy or facsimile must be


                                     - 6 -
<PAGE>   7
confirmed by next day courier delivery to be effective), addressed to the
address specified below such party's signature hereto or such other address as
such party may subsequently notify the other parties of in writing.

                  12. ENTIRE AGREEMENT AND AMENDMENTS; TERMINATION OF ORIGINAL
AGREEMENT. This Agreement constitutes the entire agreement of the parties with
respect to the subject matter hereof and supersedes in its entirety the Original
Stockholder's Agreement, Original Voting Agreement and the PUBLIGroupe Stock
Purchase Agreement. The rights and obligations created by this Agreement are in
addition to any rights existing under the Certificate of Incorporation and
Bylaws of the Company. Neither this Agreement nor any provision hereof may be
waived, modified, amended or terminated except by a written agreement signed by
the Company, Management Stockholders holding at least sixty-six and two thirds
percent (66 2/3%) of the Management Stockholders, Shares, and both of the
Purchasers.

                  13. GOVERNING LAW; SUCCESSORS AND ASSIGNS. This Agreement
shall be governed and construed in accordance with the laws of the State of New
York (without giving effect to its conflicts of laws principles) and shall bind
and inure to the benefit of the heirs, personal representatives, executors,
administrators, successors and assigns of the parties. Without limiting the
generality of the foregoing, all covenants and agreements of the Management
Stockholders shall bind any and all subsequent holders of Shares, and the
Company agrees that it shall not transfer on its records any such Shares unless
(i) the transferor Management Stockholder shall have first delivered to the
Company and the Purchaser the written agreement of the transferee to be bound by
this Agreement to the same extent as if such transferee had originally been a
Management Stockholder hereunder, as the case may be, and (ii) the certificate
or certificates evidencing the Shares so transferred bear the legend specified
in Section 10.

                  14. CAPTIONS. Captions are for convenience only and are not
deemed to be part of this Agreement.

                  15. COUNTERPARTS. This Agreement may be executed in two or
more counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.


                                     - 7 -
<PAGE>   8
                  IN WITNESS WHEREOF, the parties hereto have executed this
Voting Agreement as of the day and year first above written.

<TABLE>
<S>                                              <C>
REAL MEDIA, INC.                                 MANAGEMENT STOCKHOLDERS


By:/s/ David Morgan                              /s/ David Morgan
   ----------------------------------------      ----------------------------------
Name:  David Morgan                              David Morgan
Title:  President                                   Address:  334 E. 77th
   Address:  32 East 31st Street                              New York, NY
               9th Floor
               New York, NY  10016

                                                 /s/ Gil Beyda
                                                 ----------------------------------
                                                 Gil Beyda
                                                    Address:  1504 Friends Lane
                                                              Maple Glen, PA  19802

PUBLIGROUPE USA HOLDING, INC.


By:/s/ Walter Annasohn / /s/ Gilles Meilhac      /s/ Mark Pinney
   ----------------------------------------      ----------------------------------
Walter Annasohn/Gilles Meilhac                   Mark Pinney
                                                    Address:  42 West 15th St.,
                                                              #7
                                                              New York, NY  10011
ADVANCE INTERNET, INC.


By:/s/ Donald Perri
   ----------------------------------------



                                                 /s/ Charles Smith
                                                 ----------------------------------
                                                 Charles Smith
                                                    Address:  295 Church St., #4
                                                              New York, NY  10013

                                                 /s/ Joshua Rosen
                                                 ----------------------------------
                                                 Joshua Rosen
                                                    Address:  13-15A Glouchester Street
                                                              London SNIV 20B
                                                              UK
</TABLE>


                                     - 8 -