Results 1 to 8 of 8

Thread: Requesting HTTP access

  1. #1
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Requesting HTTP access

    I want to be able to easily fetch a web page, and work with it in my html. However, the pages I'm thinking of produce a different output in my browser's View -> Source command than they do in notepad. The page is generated by the page's code. So, how could I retrieve the generated code, rather than the actual code?

  2. #2
    Join Date
    Jul 2007
    Location
    New Zealand
    Posts
    81
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    You want to be able to easily fetch a web page and work with it in your html - do you mean your html developing program? Or are you wanting to view someone else's source code and modify it to suit your own needs?

  3. #3
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I'm trying to develop a mod for a forum where if you are not logged in, you get a little bar at the top asking to register. I want to be able to detect if the user is logged in, and thankfully, the page generated by the forum is different if you are not logged in. So, I figured that divining that source code would be somewhat easier than turning a frame into a string. Although, if I can make a frame, and then get a string from it, that would be fine too.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Why not just check to see if the session is set (if the user is logged in). If it isn't, then you can modify the output to show that register bar. Without more information about the forum, programming language, etc. there is no real way for us to help you further.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    ajax application.

    call page
    -- server-side processing
    -- return code
    place page where needed


    all the processing of the page should be done on the server-side like any other of your scripts. if you have a sorta of "forum" where the user needs to login, well then this is definitely something that you need to add at the top of the server-side page. The best would probably be to
    PHP Code:
    <?php include("checkSecurity.php"); ?>
    on every page so the session can stay enabled and the user will continue to stay logged in if he/she was ever logged in

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You're going about it the wrong way, I think. Build this into the system, rather than making a strange shell around the whole thing. Check the session, refer to the database, etc etc.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    If the forum you are looking at already has it (all of them do) download the forum install files, and look at them there, in SMF you would want to look at board.index.php and a few others, phpbb is the same, except you will need the .tpl files to view.

    For the Mod, you can just find the if user is not logged parts and add your code to show the registration bar.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am in fact using phpbb.. I was planning on building it into the files, but I couldn't find exactly what I was looking for in the documentation as a function. So I guess I will just poke around the php. Thanks all!

Bookmarks

Posting Permissions

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