PHP Experts... help me

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roganoli
    Confirmed User
    • Dec 2004
    • 757

    #1

    PHP Experts... help me

    PHP Code:
    $html = file_get_contents_curl("http://example.com/"); 
    
    How to put <? echo "$url"; ?> via echo in the URL above... is possible?

    I was wondering how to make it work.

    Thanks for help
  • sarettah
    see you later, I'm gone
    • Oct 2002
    • 14297

    #2
    Originally posted by roganoli
    PHP Code:
    $html = file_get_contents_curl("http://example.com/"); 
    
    How to put <? echo "$url"; ?> via echo in the URL above... is possible?

    I was wondering how to make it work.

    Thanks for help
    I am not sure what you are asking but:

    1. do you have a user defined function called file_get_contents_curl ? Because as far as I know PHP does not. It has file_get_contents() or you can use a curl routine for the same thing.

    2. If in the example you gave you mean file_get_contents then that code should end up with all the contents of the example.com page stored in a var called $html.

    3. echo "url"; should probably be echo $url; once you have something in the var called $url.

    So, if you could be clearer about what you want to do, I might be able to answer.

    Hope that helps.

    .
    All cookies cleared!

    Comment

    • Datebizguy
      Confirmed User
      • Nov 2012
      • 241

      #3
      try some othe forum as well

      Comment

      • Fetish Gimp
        Confirmed User
        • Feb 2005
        • 1699

        #4
        Very similar to what you're asking
        http://stackoverflow.com/questions/8...e-get-contents
        Strapon Seduction - femdom blog | Twitter

        Comment

        • sarettah
          see you later, I'm gone
          • Oct 2002
          • 14297

          #5
          Originally posted by roganoli
          PHP Code:
          $html = file_get_contents_curl("http://example.com/"); 
          
          How to put <? echo "$url"; ?> via echo in the URL above... is possible?

          I was wondering how to make it work.

          Thanks for help
          revisiting for a second.

          If what you are tring to do is display the html from example.com then once you have the file_get_contents_curl() changed to file_get_contents() then you would just echo $html.

          So something like:

          $html = file_get_contentsl("http://example.com/");
          echo $html;

          .
          All cookies cleared!

          Comment

          Working...