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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:37:27+00:00 2026-05-27T02:37:27+00:00

How do I get the HTML code of another site it wants cookies to

  • 0

How do I get the HTML code of another site it wants cookies to be enabled?
I just need to parse this page www.fx-trend.com/pamm/rating/

I’m using javascript jquery (jQMobile) and sometimes PHP.(I prefer to use js)

here is a sample with PHP:

<?php
$url = 'url';
$html = file_get_html($url);
//$html = file_get_contents($url);
echo $html;
?>

here is a sample with js:
How to get data with JavaScript from another server?

OR

$(this).load(url);
alert($(this)); //returns object Object

server answer:

Cookies must be enabled in your browser! Try to clear all cookies, if
cookies are enabled.

code samples are welcome.

  • 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-27T02:37:28+00:00Added an answer on May 27, 2026 at 2:37 am

    Try using Curl and enable cookies. The code sample below is snagged from this page.

    <?php
    /* STEP 1. let’s create a cookie file */
    $ckfile = tempnam ("/tmp", "CURLCOOKIE");
    
    /* STEP 2. visit the homepage to set the cookie properly */
    $ch = curl_init ("url");
    curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
    $output = curl_exec ($ch);
    
    var_dump($output);
    

    Edit: You might have to fake a browser by changing the default user agent header.

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

Sidebar

Related Questions

example: at this domain http://www.example.com/234234/go.html is only one iframe-code how can i get the
I would like to get the HTML code from a page with PHP. So
I used the code from http://www.rgagnon.com/javadetails/java-0580.html to get Motherboard Id, but the result is
i get the html from another site with file_get_contens , my question is how
I've used this code in another site I've made and it works absolutely fine
I am trying to get a working regular expression to convert standard HTML code
I've got PHP and HTML code stored in a database table. When I get
I'm trying to get a HTML source of a website through C# code. When
I have the following code in html, I cannot get the Function call back
I have ASP.Net code generating my button's HTML for me using divs to get

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.