Results 1 to 4 of 4

Thread: Failed to open stream: HTTP request failed

  1. #1
    Join Date
    Jan 2009
    Posts
    79

    Failed to open stream: HTTP request failed

    Hi friends,

    I am trying to run a script that reads images URL from RSS xml and display it but if any image URL has a space on it, it gives a message as HTTP request failed . Even if i try to copy paste the URL and try to displays in the browser over there also i am getting some error message. Can anyone tell me what should i do in this case.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Failed to open stream: HTTP request failed

    Sure i will help you out with this before that can you provide me the code which you are using it and have a check for the same it might happen that the image which you are trying o stream might have some permission set because of which you are not getting HTTP request failed

  3. #3
    Join Date
    Jan 2009
    Posts
    79

    Failed to open stream: HTTP request failed

    I had a check for the same there is no permission set for the image and i am trying to sue the following Php code where i am getting HTTP request failed

    PHP Code:
    <?php


        header
    ("Cache-Control: no-cache, must-revalidate");
        
    header("Expires: Tuesday, 26 Jul 2012 07:15:00 GMT");
          
    header ("Content-type: image/png");

          
    $background imagecreatefrompng("./backround_image1.png");

    $xml file_get_contents("./rss.php?xml=true");

    preg_match_all('/<(artist|song|image)>([^<]+)<\/\\1>/i'$xml$matches);

    list(
    $artist$song$imageurl) = $matches[2];


          
    $insert1 imagecreatefromjpeg($imageurl);
          
    imagecopymerge($background,$insert,45,60,0,0,90,90,100);

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    HTTP request failed in Php

    Try to use the following code and i am sure after using this code you won't be getting HTTP request failed i had a check the code and it's working fine for me hope it works for you too.

    PHP Code:
    str_replace():

    $insert imagecreatefromjpeg(str_replace(' ''%20'$imageurl)); 

Similar Threads

  1. The Security Account Manager failed a KDC request
    By etienne in forum Active Directory
    Replies: 3
    Last Post: 04-01-2014, 10:47 AM
  2. Replies: 4
    Last Post: 20-07-2010, 12:56 PM
  3. NFS world request failed
    By Bhupathi in forum Video Games
    Replies: 5
    Last Post: 20-07-2010, 12:47 PM
  4. "Failed to open stream No such file or directory" error in PHP
    By EULALIA in forum Software Development
    Replies: 3
    Last Post: 13-07-2009, 02:40 PM
  5. HTTP: failed socket_read
    By Dietrich in forum Software Development
    Replies: 5
    Last Post: 10-01-2009, 07:33 PM

Tags for this Thread

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
  •  
Page generated in 1,711,614,011.41826 seconds with 17 queries