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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:14:08+00:00 2026-05-27T23:14:08+00:00

URL1: https://duapp3.drexel.edu/webtms_du/ URL2: https://duapp3.drexel.edu/webtms_du/Colleges.asp?Term=201125&univ=DREX URL3: https://duapp3.drexel.edu/webtms_du/Courses.asp?SubjCode=CS&CollCode=E&univ=DREX As a personal programming project, I want to

  • 0

URL1: https://duapp3.drexel.edu/webtms_du/

URL2: https://duapp3.drexel.edu/webtms_du/Colleges.asp?Term=201125&univ=DREX

URL3: https://duapp3.drexel.edu/webtms_du/Courses.asp?SubjCode=CS&CollCode=E&univ=DREX

As a personal programming project, I want to scrape my University’s course catalog and provide it as a RESTful API.

However, I’m running into the following issue.

The page that I need to scrape is URL3. But URL3 only returns meaningful information after I visit URL2 (it sets the term there Colleges.asp?Term=201125), but URL2 can only be visited after visiting URL1.

I tried monitoring the HTTP data going to and fro using Fiddler and I don’t think they are using cookies. Closing the browser instantly resets everything, so I suspect they are using Session.

How can I scrape URL 3? I tried, programatically, visiting URLs 1 and 2 first, and then doing file_get_contents(url3) but that doesn’t work (probably because it registers as three different sessions.

  • 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-27T23:14:09+00:00Added an answer on May 27, 2026 at 11:14 pm

    A session needs a mechanism to identify you as well. Popular methods include: cookies, session id in URL.

    A curl -v on URL 1 reveals a session cookie is indeed being set.

    Set-Cookie: ASPSESSIONIDASBRRCCS=LKLLPGGDFBGGNFJBKKHMPCDA; path=/
    

    You need to send this cookie back to the server on any subsequent requests to keep your session alive.

    If you want to use file_get_contents, you need to manually create a context for it with stream_context_create for to include cookies with the request.

    An alternative (which I would personally prefer) would be to use curl functions conveniently provided by PHP. (It can even take care of the cookie traffic for you!) But that’s just my preference.

    Edit:

    Here’s a working example to scrape the path in your question.

    $scrape = array(
        "https://duapp3.drexel.edu/webtms_du/",
        "https://duapp3.drexel.edu/webtms_du/Colleges.asp?Term=201125&univ=DREX",
        "https://duapp3.drexel.edu/webtms_du/Courses.asp?SubjCode=CS&CollCode=E&univ=DREX"
    );
    
    $data = '';
    $ch = curl_init();
    
    // Set cookie jar to temporary file, because, even if we don't need them, 
    // it seems curl does not store the cookies anywhere otherwise or include
    // them in subsequent requests
    curl_setopt($ch, CURLOPT_COOKIEJAR, tempnam(sys_get_temp_dir(), 'curl'));
    
    // We don't want direct output by curl
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    // Then run along the scrape path
    foreach ($scrape as $url) {
        curl_setopt($ch, CURLOPT_URL, $url);
        $data = curl_exec($ch);
    }
    
    curl_close($ch);
    
    echo $data;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have there lines in my RegisterToutes : routes.MapRoute(Pages3, {url1}/{url2}/{url3}, MVC.Page.RedirectTo(), new { url1
I have different urls that points to the same code www.url1.com www.url2.com I need
I have two urls: url1 = http://127.0.0.1/test1/test2/test3/test5.xml url2 = ../../test4/test6.xml How can I get
I need to serialize array which contains URLs: Array( 'url1' => 'http://www.example.com', 'url2' =>
I have a URLConnection, that access a web page. URL url = new URL(https://domain);
In Blogger post I have this snippet <applet codebase=https://droidsnip.googlecode.com/hg/ height=300 archive=text.jar width=300 code=Google.class> and
I have a txt file with some URLs like this http://url1.com http://url1.com http://url1.com Separated
Hi i have a problem with recursion. i followed this example from wc3 http://www.w3schools.com/jsref/met_win_settimeout.asp
if i use: <meta http-equiv=REFRESH content=0;url=https://www.the-domain-you-want-to-redirect-to.com/index.html> in the html code then it will endlessly
Im getting this error: Unsafe JavaScript attempt to access frame with URL URL1 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.