SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    make an http request inside php return body as string

    i would like to write a php script to make an http request (not referring to the address of the php script i am trying to write) and return the html to a string, which i can use to do things in the rest of my script
    love u guys ur always so helpful

  2. #2
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,805
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Try this:

    http://php.net/manual/en/function.file-get-contents.php

    Quote Originally Posted by chopficaro View Post
    i would like to write a php script to make an http request (not referring to the address of the php script i am trying to write) and return the html to a string, which i can use to do things in the rest of my script
    love u guys ur always so helpful

  3. #3
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,031
    Mentioned
    152 Post(s)
    Tagged
    2 Thread(s)
    Or have a look at curl
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys
    ill try using file get contents
    i remember trying to use curl at one time but couldnt figure out how to install it


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
  •