/    Sign up×
Community /Pin to ProfileBookmark

Log in script for ASP site

Greetings,

I have encountered with a problem regarding my script done in PHP and is used for logging into a specific site
which is written in ASP.

I want to POST my user name and pass word to that form log-in but it seems like site is ignoring it.
I eceive absolutely no errors.

Anyone got an idea how to solve this?

PS URL username and password in script are coreect and can be used for logging into site.

I really hope someone could help me!

Thank you!

[code=php]
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, ‘http://www.ajpes.si/login/login.asp?f=1&mdres=1’);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, ‘uporabnik=test2012&geslo=test2012’);
curl_setopt ($ch, CURLOPT_COOKIEJAR, ‘cookie.txt’);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);

$store = curl_exec ($ch);

$file = fopen (“1234.txt”, “w”);
fwrite($file, $store);
fclose ($file);

$content = curl_exec ($ch);

$content = curl_exec($ch);
if ($content === FALSE) {
die(curl_error($ch));
}
echo $content . “<br />”;

curl_close ($ch);

?>[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@cinkoauthorAug 13.2012 — I have turned all possible forums upside down via google and couldn't find anything regarding my problem.

So ... a) i am doing something completly wrong or

b) it can not be done in PHP

So if anyone has an idea how to pull this offf please do post about it!

thank you!
×

Success!

Help @cinko 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...