/    Sign up×
Community /Pin to ProfileBookmark

Submit form with fscokopen()

OK, let’s say my form looks like this:
<form action=’go.php’>

Now, this file go.php needs to ave fsockopen function in it, which will submit the form data onto remote server, for ex.
www.mysite.com/log.php?first=value1&second=value2

And this is the content of log.php file:

[code=php]
<?
$first = $_POST[‘first’];
$second = $_POST[‘second’];

$file = fopen(“data.txt”, “a”);
fputs ($file, ”
First: $first
Second: $secondn”);

fclose ($file);
?>
[/code]

Now, I have tryed using fsockopen() and POST form examples from PHP help, but I couldn’t manage to get it working…
Oh and also, go.php cannot end with fsockopen(), because after that function is over, I need to putt
header(Location: …);
and maybe some other things, so I cannot jump out from go.php with fsockopen()..
If someone could write how the content of go.php would look like, I would appreciate it..

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ExtremeauthorJun 20.2004 — No one can help me with this?
×

Success!

Help @Extreme spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...