Re: Connection error on URI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Skip Evans wrote:
> Hey all,
> 
> I'm working on someone else's code that tries to read an XML transaction
> from a remote server with the following code.
>     
> $url="http://xx.xx.xx.xx:1972/csp/test/SASS.Web1.cls?soap_method=FindMemBySASSNum&SNum=".$user_sass;
> 
> // $url = urlencode($url);

The previous line would encode the entire url that you are working with.
This isn't the proper use of urlencode().
You should use this function on the values that you are adding as, in this case, the get values that you are submitting as soap_method and SNum

> $xml_response = file_get_contents($url, true);

are you using PHP 6?  if so, then that second argument will limit your search to only looking within your include_path

Take a look at this page, and take note of the warning for the second argument.

http://php.net/file_get_contents

The second argument has been changed, but that will only take effect with PHP6.

> 
> But this transaction times out and returns an empty transaction, even
> with the call to urlencode, which I tried as a quick fix.
> 
> If I paste the identical transaction into a browser it works fine.
> 
> Any suggestions would be greatly appreciated.
> 
> Peace, Love & Curly Fries,
> Skip
> 
> 


-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux