Jump to content

Sending GET variables thru https using fopen


dragunu

Recommended Posts

dear all,

 

i am currently writing an online transaction system.

 

I am using the following code:

 

$url = "https://site.com?username=test&password=test 

     $handle = fopen( $url, "r");
     if ($handle)
   {
         while (!feof($handle)) 
	  {
            $buffer = fgets($handle, 4096);
            $saver = $buffer;
	    strval($string);
          }
        fclose($handle);
       }

 

please note that the actual url has more variables and the variables i am sending for testing are correct.

 

the problem is that its not working. Now im not sure if the error code im getting is something from the payment gateway's side or the code is not correct.

 

any suggestions please?

 

thanks

dragunu

yes ok. i did the " and the semicolon. just forgot to put them in code section :)

 

so the code is ( without pasting mistakes :) )

 

$url = "https://site.com?username=test&password=test";

     $handle = fopen( $url, "r");
     if ($handle)
   {
         while (!feof($handle)) 
	  {
            $buffer = fgets($handle, 4096);
            $saver = $buffer;
	    strval($string);
          }
        fclose($handle);
       }

 

suggestions?:)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.