#1
  1. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2000
    Posts
    1,058
    Rep Power
    22
    Does anyone have a good alternative to using fopen to read a remote webpage?

    I have a script that has to open a URL and
    read the page, sounds simple enough, huh?

    Here's the twist: it's a secure (https://) URL.

    fopen won't do it, and fsockopen isn't um...
    behaving as expected.

    Any help would be appreciated.

    Scott
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    do you want to just display the page, or actually get the data and make changes, etc...

    would include("https://www.whatever.com/"); work? that would just display it...
  4. #3
  5. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2000
    Posts
    1,058
    Rep Power
    22
    Well....

    It's a little more complicated than that.

    What I'm doing is opening a URL that I'm sending a
    URL-encoded string as part of. I need to
    "read" the resulting page to see if I was
    sucessful in transmitting the data (URL encoded string)
    to the other server.

    I have a way of doing this that works great
    as long as the URL is http://, but it quit
    working when we went "live" with the secure
    server.

    I looking in the fopen-wrappers.c file and
    discovered that https:// just isn't considered
    valid.

    Here's the offending bit of C:
    if (!strncasecmp(path, "http://", 7)) {

    There may well be a good reason for this, but
    it's completely eluding me!

    Thank you for your suggestion, it's given
    me an idea.

    Scott

Similar Threads

  1. CURL vs fopen vs fsocketopen
    By Hero Doug in forum PHP Development
    Replies: 0
    Last Post: January 4th, 2004, 09:44 PM
  2. fopen not working???
    By cabala in forum C Programming
    Replies: 9
    Last Post: December 9th, 2003, 11:13 PM
  3. Doing an fopen on news.google.com
    By jschyun in forum PHP Development
    Replies: 5
    Last Post: October 14th, 2003, 07:42 PM
  4. fopen scan if file exsist
    By Frans-Jan in forum PHP Development
    Replies: 1
    Last Post: February 21st, 2002, 03:53 AM
  5. alternative to fopen, fread
    By tuxpow3r in forum PHP Development
    Replies: 3
    Last Post: January 22nd, 2002, 12:06 AM

IMN logo majestic logo threadwatch logo seochat tools logo