Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Location
    Providence, RI
    Posts
    1,512

    Retrieve contents from remote URL

    I'm writing some HTML parser for my website because most of the contents are retrieved from a remote location. I construct the remote URL internally and retrieve the remote contents using file_get_contents().

    When I'm testing the website from different computers, the setting changes made by one computer affects the settings of the rest. So I believe regardless of the end users, the retrieval process is done by the web hosting server with the same IP address, and therefore the remote server recognizes all of us as the same person.

    Is there a quick way to get around this?

  2. #2
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,722
    I am not an expert into it, but where do you store those "setting changes made by one computer" on the server or in cookies.
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  3. #3
    Join Date
    Feb 2003
    Location
    Providence, RI
    Posts
    1,512
    It's stored on the remote server.

    Edit: I'm wondering if there is a way to retrieve the remote contents as it is from the end user, not from my hosting server.
    Last edited by Eric Lim; 03-15-2008 at 10:10 PM.

  4. #4
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,722
    So it seems you need to show different content to different users, to achieve that your application should process information like the end users IP, browser, OS, and the end user's settings saved via cookie in his browser if that user is not a registered member, if the user is a registered member his settings can be saved somewhere in a database.

    There may be better solution out there, may be you would like to discuss this on http://www.programmingtalk.com or http://www.codingforums.com
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  5. #5
    You mentioned file_get_contents() and I understood that you use PHP. Well, there's just one PHP executable on the server, processing all user scripts, and that's the thing that actually retrieves content. So the sites that are being retrieved "see" only that PHP executable and its address.

    Little can be done here... You may try to work through different proxies. PHP itself cannot work with proxies, but the CURL extension can. RTFM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •