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

  • Home
  • SEARCH
  • 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 7550043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:06:45+00:00 2026-05-30T10:06:45+00:00

I’m taking an online class with Google’s Apex system, and would like to be

  • 0

I’m taking an online class with Google’s Apex system, and would like to be able to automatically save the data from certain pages. The process of logging in and getting to the content when browsing normally is as follows: open the webapp and login, navigate the course I want to view, click the course. When I click the course I want to work on, it opens a new window with the lessons. This is the part I haven’t been able to do with a program.

The first way I thought of was with PHP, to request the web pages and simply save them. The problem is that there is a login, and a number of javascript events and things that I don’t know how to automate with php. I got as far as logging in with a POST request, but couldn’t figure the rest out.

Today I was trying to do it with Windows Forms, C#, using the dotnet WebBrowser control. I have it log in for me and navigate to the page where I need to choose the course to open, but if I click the link, it attempts to open the webpage in Internet Explorer. If I use the link it opens, I get an error from the site.

Inspecting the link on the page I’m having trouble with, I found the javascript event that opens the new window. It opens it with a redirect link. Using this redirect link in a new tab instead of new window works in Chrome, but I don’t know how to get the redirect link from C#. The a element is inside an iframe, and I have to get the link there. How can I, in C#, retrieve an element from within an iframe?

Also, is there a better way to do this?

  • 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-30T10:06:46+00:00Added an answer on May 30, 2026 at 10:06 am

    Use WebClient class for getting html of url.

    Example 1:

    string htmlTd;
    
            using (WebClient client = new WebClient())
            {
             //or - request.UserAgent = "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US)"; 
             client.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13";
             htmlTd = client.DownloadString(myurl);
            }
    
           GetImagesInHTMLString(htmlTd);
    

    // Get Images from page… it is faulty right now due to my modifications…
    i am working on it, but help you get your target..

     private void GetImagesInHTMLString(string htmlString)
        {
    
            List<string> images = new List<string>();
            string pattern = @"<(img)\b[^>]*>";
    
            Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase);
            MatchCollection matches = rgx.Matches(htmlString);
             string b =@"src=""";
             string c=@"src="""+myurl+"";
    
             //if (matches.Count >1)
             //{
                for (int i = 0, l =matches.Count; i < l; i++)
                 {
    
    
                     string pattern1 =@"s/\s*src='[^']*'//";
                     //    images.Add(matches[i].Value.Replace(b, c));
                     string allmatch = matches[i].Value.Replace(b, c);
                    string patrern1="#(= src=['\"].+[^\"]?)?src=[\"']?([^\"']+)#i";  
                     Regex rgx1 = new Regex(pattern1);
                     MatchCollection matches1 = rgx1.Matches(allmatch);
                     string siya = matches1[0].Value.ToString();
                     //string b = @"src=""";
                     //string c = @"src=""" + myurl + "";
                 }
            // }       
    
            foreach (var item in images)
            {
                Response.Write(item);
            }        
        }
    

    Example from WebClient Class link:

    WebClient client = new WebClient ();
    
            // Add a user agent header in case the 
            // requested URI contains a query.
    
            client.Headers.Add ("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    
            Stream data = client.OpenRead (URl);
            StreamReader reader = new StreamReader (data);
            string s = reader.ReadToEnd ();
            Console.WriteLine (s);
            data.Close ();
            reader.Close ();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

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.