I'm using fopen
to allow webmasters to access data directly from my web servers soon. The problem is my server doesn't see a few things it normally see's when its loading through JavaScript.
So I want to pass a few variables using fopen
or file_get_contents
depending which is quicker performance once I do so benchmarks.
I'm using the example code below
$file = 'http://example.com/get.php?var1=foo&var2=foo';
$fp = fopen($file, 'rb');
fpassthru($fp);
but it doesn't pass the get
variables through. I don't want to use cURL
just encase they don't have it installed and it seems to be slow also. I'm trying to make it very simple for the webmasters. How would I go about passing the variables through?
Update
I found if you have a space in the variable it stops sending the rest of the variable string. How do I allow spaces without it interrupting the rest of the variables? It also real buggy using multiple variables as it doesn't send them all for me.