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,888
    Mentioned
    74 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
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

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

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    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
  •