Jump to content

Recommended Posts

Hi.

 

I've been puzzling around with a method, and can't seem to get it working.

 

What I want to do, is to connect to a page (secure / SSL), login to an account and then get the content of a remote file, which is automatically generated by posting a form.

 

Most of it works already, but when my script has posted the login (which is successfully carried out) I can't seem to get/download this file I want, from the account front page.

Problem is that the file is generated (XML) when you click on a <button>, which means I don't really know the exact location of the file.

So I've tried submitting/posting the form <button> the same way I've done it with the login, and that seems to be working, but how do I get the content of the generated XML file? Normally, I mean, a download popup would appear if you submitted/posted the <button> through a web browser, but how do I receive the content with my script and maybe place it in a variable ($XML_fileContent).

 

I've been intensively trying to solve this problem and get it to work for three days now, but really can't seem to figure out a solution. I thought of this forum and I hope that someone can help me out.

 

[using fsockopen, no CURL]

 

Any suggestion? Anyone tried this before who actually made it work?

Link to comment
https://forums.phpfreaks.com/topic/88559-fsock-get-file-from-post/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.