php quick question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex79
    Confirmed User
    • Jun 2002
    • 996

    #1

    php quick question

    anybody know why fopen() function is not working if i try to access a search results page from google?
    for example fopen("http://www.google.com/search?hl=en&lr=&safe=off&q=aaa+bbb&btnG=Search") is returning this error message:

    Warning: fopen(http://www.google.com/search?hl=en&l...bb&btnG=Search): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in
  • azguy
    Confirmed User
    • Nov 2004
    • 5167

    #2
    urlencode it first

    Comment

    • azguy
      Confirmed User
      • Nov 2004
      • 5167

      #3
      or one of the similar functions

      Comment

      • Twe Russ
        Confirmed User
        • Jan 2003
        • 3493

        #4
        Try to Q and A section of GFY.

        Contact information - ICQ: 7.9.0.3.0.0 · AIM: no roach · E-Mail: roachito || @ || gmail || . || com
        [Friend Finder - Geo Targeting & Incredible Site Ratio] - [Credit Card Traffic - Make $65 Per Join]

        Comment

        • alex79
          Confirmed User
          • Jun 2002
          • 996

          #5
          Originally posted by azguy
          urlencode it first
          wtf.. the urlencode() is returning this url http%3A%2F%2Fwww.google.com%2Fsearch%3Fhl%3Den%26l r%3D%26safe%3Doff%26q%3Daaa%2Bbbb%26btnG%3DSearch

          Comment

          • azguy
            Confirmed User
            • Nov 2004
            • 5167

            #6
            Originally posted by alex79
            wtf.. the urlencode() is returning this url http%3A%2F%2Fwww.google.com%2Fsearch%3Fhl%3Den%26l r%3D%26safe%3Doff%26q%3Daaa%2Bbbb%26btnG%3DSearch

            And?

            Comment

            • azguy
              Confirmed User
              • Nov 2004
              • 5167

              #7
              Just use Curl what's the problem

              Comment

              Working...