Results 1 to 3 of 3

Thread: Automatically mail the page.

  1. #1
    Join Date
    Mar 2005
    Location
    Mumbai,INDIA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Automatically mail the page.

    well,
    I want a html page, on the net, to be automatically mailed to me.Does any one knows where i can find this kind of script.And whether this is possible with the help of cgi script or php script.

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi

    When do you want it mail....
    1)when they fill in some info on the page and hit submit
    or
    2) when they just visit the page??? which would be strange as you could get K's and K's of mail.....
    if 1) look at http://www.smos.co.za/knite.php it might help you.. it even sends them an email as well.... (does not work on this site as coded for another) but you will get the idea....
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    With PHP, yes you can.
    PHP Code:
    $page = <<<END
    Put page here, no escaping or anything fancy necessary.
    END;

    mail($to$subject$page"Content-Type: text/html\r\n"); 
    Or, if it's an existing page...
    PHP Code:
    $file '/home/user/file.htm'// Can also be an url: http://www.site.com/page.php.

    ob_start();
    include(
    $file);
    $page ob_get_contents();
    ob_end_clean();
    $buffer fgets($handle4096);

    mail($to$subject$page"Content-Type: text/html\r\n"); 
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •