Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. file_get_contents work with direct typed url and not with automatically obtained url
  2. $url = $result_from_webservice->url;
  3.  
  4. if( file_get_contents( $url ) ){
  5.     echo 'ok';
  6. }
  7. else{
  8.     echo 'error';
  9. }
  10.        
  11. echo $result_from_webservice->url;
  12.        
  13. $url = 'https://site.com/page.php?foo1=bar1&foo2=bar2';
  14.        
  15. $url = $result_from_webservice->url;
  16.     $url = urldecode( $url );
  17.        
  18. $url = (string)$result_from_webservice->url;