We help IT Professionals succeed at work.

how to render images to using file_get_contents

shang3000
shang3000 asked
on
4,811 Views
Last Modified: 2009-12-16
hi all,
i asked a question before about making get requests and post requests from a site
and that was the answer :

<?php
$r_default_context = stream_context_get_default
        (
        array
                (
                'http' => array
                        ( // All HTTP requests are passed through a proxy server.
                        'proxy' => 'tcp://192.168.0.222:80', // Make sure IP and port are correct!!!
                        'request_fulluri' => True,
                        ),
                )
        );
 
// Though we said system wide, some extensions need a little coaxing.
libxml_set_streams_context($r_default_context);
?>
<?php
echo file_get_contents(''http://hatem.softwarelab.net');
?>
the code is working perfeclty but have one issue
if there is images with relative pathes it does not appear at all
can any body help me to solve this issue
best regards
HG
Comment
Watch Question

Senior Performance Engineer
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
hi ingwa,
thanks for reply,
can you please give me an example how to use it in this situation and what to search for using strpos?
best regards
HG
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.