Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 17:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] cUrl Login

Discussion on [PHP] cUrl Login within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 319
Received Thanks: 88
[PHP] cUrl Login

So ich hab ein kleines Problem. Und zwar versuche ich für das Browsergame
Space Pioneers einen Bot mit PHP zu schreiben was generell auch kein Problem
wäre, allerdings habe ich ein kleines Problem. Und zwar gibt es zwei möglichkeiten
sich einzuloggen, das wäre einmal auf und einmal der Notfall Login . Nun zu meinem Problem. Das
Einloggen im ersten Link
klappt soweit ganz gut, ich habe meines errachtens auch alle Inputs mit übergeben,
hat mir allerdings keinen Acceskey zugewiesen. Gut, hab ich den zweiten versucht.
Wieder das gleiche Problem, nur meckert der Login jetzt ich müsste Cookies aktivieren
um fortfahren zu können. Cookies sind aktiviert, vielleicht liegt es an meinem Script
ich weiß es nicht. Wäre nett wenn ihr mal drüber schauen könntet den ich finde keinen
Fehler :<

Nur als kleine Anmerkung wieso ich eine Template Klasse eingebunden habe, das liegt
daran das ich das später als GUI verwenden will.

PHP Code:
<?php
if (!function_exists('curl_init')) 
{
  die(
'cUrl ist auf deinem PC nicht installiert');
}
require 
'include/Template.class.php';
$tpl = new Template('template/base.tpl');

$config['email'] = 'xxxx';
$config['username'] = 'xxxx';
$config['password'] = 'xxxx';

$ch curl_init('http://gde.sp.looki.de/glogin.shtml');
curl_setopt ($chCURLOPT_POST1);

curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($chCURLOPT_POSTFIELDS"anmelden=true&pid=0&zz=-60&old=&name=".$config['email']."&passwd=".$config['password']);
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
curl_setopt ($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_COOKIEJAR'cookies.txt');
curl_setopt($chCURLOPT_COOKIEFILE'cookies.txt');

$result curl_exec($ch);
curl_close ($ch);
?>
EDIT: Ups, ausversehen das Script hochgeladen das ich bei myfreefarm
getestet hab :>
Fratyr is offline  
Reply


Similar Threads Similar Threads
Wie Speichert man die Login daten und macht nen Auto Login
07/15/2010 - Metin2 Private Server - 5 Replies
Souh ma wieder ne "Blöde Frage"... wie speichert man die login daten und macht nen autologin für den client wie es hier gemacht worden ist: http://www.elitepvpers.com/forum/metin2-pserver-dis cussions-questions/616285-my-new-client.html Über ne antwort würde ich mich freuen...
Hot ice Down oder login Server down!!Wenn ja sagt wolfi bescheid dass login down ist
01/01/2010 - Metin2 Private Server - 1 Replies
hallo kann jmnd bescheid sagen bitte
[REQUEST] Login server for CoemuV2 errors and login freeze.
07/21/2009 - CO2 Private Server - 6 Replies
http://i564.photobucket.com/albums/ss81/onlyme64/e rror2.jpg I get this error when i try to debug the login server. But strangley when i open the login server from bin/release it opens without any errors. When i open it from bin/debug it crashes. When i open the the good login server and game server and try to log in and i get a login freeze. Here is a screeny: http://i564.photobucket.com/albums/ss81/onlyme64/ error3.jpg What do i do? :(
Login-Error: Cannot login to Server
04/10/2009 - Aion - 8 Replies
It works fine but 1 hour ago gameguard was updated with ggscan.des or something like this and now i have every time following error while login: "Cannot connect to the authorization server" can someone help me?



All times are GMT +2. The time now is 17:40.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.