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 6915219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:26:52+00:00 2026-05-27T09:26:52+00:00

From within the HTML code in one of my server pages I need to

  • 0

From within the HTML code in one of my server pages I need to address a search of a specific item on a database placed in another remote server that I don’t own myself.

Example of the search type that performs my request: http://www.remoteserver.com/items/search.php?search_size=XXL

The remote server provides to me – as client – the response displaying a page with several items that match my search criteria.

I don’t want to have this page displayed. What I want is to collect into a string (or local file) the full contents of the remote server HTML response (the code we have access when we click on ‘View Source’ in my IE browser client).

If I collect that data (it could easily reach reach 50000 bytes) I can then filter the one in which I am interested (substrings) and assemble a new request to the remote server for only one of the specific items in the response provided.

Is there any way through which I can get HTML from the response provided by the remote server with Javascript or PHP, and also avoid the display of the response in the browser itself?

I hope I have not confused your minds …
Thanks for any help you may provide.

  • 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-05-27T09:26:53+00:00Added an answer on May 27, 2026 at 9:26 am

    As @mario mentioned, there are several different ways to do it.

    Using file_get_contents():

    $txt = file_get_contents('http://www.example.com/');
    echo $txt;
    

    Using php’s curl functions:

    $url = 'http://www.mysite.com';
    $ch = curl_init($url);
    
    // Tell curl_exec to return the text instead of sending it to STDOUT
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    
    // Don't include return header in output
    curl_setopt($ch, CURLOPT_HEADER, 0);
    
    $txt = curl_exec($ch);
    curl_close($ch);
    
    echo $txt;
    

    curl is probably the most robust option because you have options for more control over the exact request parameters and possibilities for error handling when things don’t go as planned

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html menu, when one item from it gets clicked I want
My code in myapp_extras.py: from django import template register = template.Library() @register.inclusion_tag('new/userinfo.html') def address():
I copy the following from source of http://jquerymobile.com/demos/1.0/docs/pages/multipage-template.html <!DOCTYPE html> <html> <head> <meta charset=utf-8>
I have two web pages which work basically the same, code-wise, but one of
From within my Java program I want to determine which .NET Framework is installed
From within a DLL that's being called by a C#.NET web app, how do
From within a finally block, is it possible to tell an exception has been
From within a BPL, is it possible to get its own file name? e.g.
From within a servlet, how can I tell if the servlet is being called
From within a webmethod (.net asmx file) - is it possible to determine from

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.