shang3000
asked on
how to render images to using file_get_contents
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_defaul t_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
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
?>
<?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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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