Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Reposting form fields data from one script to another automatically via a Glype proxy - cURL?

$
0
0

Hey there guys. My current task has presented me with the challenge of using cURL in order to automatically pass form data to an external script via a Glype proxy server.

 

In a nutshell, I've got:

 

1. Normal HTML containing the form fields.

 

2. Browse.php, the main component of Glype.

 

3. The external script that is about to receive the form data ( I have no control over that one ).

 

What I want to achieve is:

 

Instead of simply passing the form fields by submitting them directly to the external script, do it by forwarding them via the "browse.php" file of Glype instead. I am aware that I would have to format the "action" value of the <form> tag in order to access the external script via the proxy instead. However, when I do that, instead of logging me in ( the form data submitted contains a username and a password, along with some hidden fields ), I get redirected to a login page.

 

That obviously happens because the form data is being posted to browse.php, instead of to the external script, and, since browse.php has no idea it has to be resubmitted to the external script, it simply discards it.

 

How would I go about automatically reposting the form fields data to the external script, and displaying the result via browse.php? I assume that would be achieved using cURL, right?


Viewing all articles
Browse latest Browse all 13200

Trending Articles