Paules-PC-Forum.de Anzeige:

Microsoft Windows Intune: PC-Verwaltung und -Sicherheit in der Cloud: Updateverwaltung, Anti-Virus und vieles mehr!


Zurück   Paules-PC-Forum.de > Programmierung > PHP/MySQL

PHP/MySQL Alles rund um die Programmiersprache PHP sowie MySQL.

EM-Tippspiel

Paule bei Facebook


Paule bei Twitter


Letzte Forenthemen
Gehe zum ersten neuen Beitrag PPF - Spiel "Wörter weiter...
Aufrufe: 26887, Antworten: 4218
Gehe zum ersten neuen Beitrag Algorithmen Teil IV...
Aufrufe: 3321, Antworten: 122
Gehe zum ersten neuen Beitrag Von Live CD Windowspfad...
Aufrufe: 299, Antworten: 19
Gehe zum ersten neuen Beitrag Bundesliga-Tippspiel Saision...
Aufrufe: 7635, Antworten: 185
Gehe zum ersten neuen Beitrag Captur 2.2 (Snow Leo)
Aufrufe: 19, Antworten: 0
Gehe zum ersten neuen Beitrag Captur 2.3 (Lion)
Aufrufe: 20, Antworten: 0
Gehe zum ersten neuen Beitrag Acer Aspire 8745ZG fährt...
Aufrufe: 54, Antworten: 6
Gehe zum ersten neuen Beitrag Rechner fährt herunter,...
Aufrufe: 144, Antworten: 9
Gehe zum ersten neuen Beitrag avs4you_com Lizenz oder Abo?
Aufrufe: 69, Antworten: 4
Gehe zum ersten neuen Beitrag PPF - Shoppingwahn
Aufrufe: 50939, Antworten: 1395
Zeige:





Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 29.12.2008, 13:18   #1 (Direktlink)
Stammuser
 
Registriert seit: 14.02.2007
Alter: 19
Beiträge: 491
Standard cURL Probleme

Zitat:
<?php

curl_login('URLBLABLABLA?action=login2','user=USER NAME&passwrd=PASSWORT','','off');
echo curl_grab_page('URL.de/blablablabla','','off');

function curl_login($url,$data,$proxy,$proxystatus){
$fp = fopen("cookie.txt", "w");
fclose($fp);
$login = curl_init();
curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($login, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($login, CURLOPT_TIMEOUT, 40);
curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
if ($proxystatus == 'on') {
curl_setopt($login, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($login, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt($login, CURLOPT_PROXY, $proxy);
}
curl_setopt($login, CURLOPT_URL, $url);
curl_setopt($login, CURLOPT_HEADER, TRUE);
curl_setopt($login, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($login, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($login, CURLOPT_POST, TRUE);
curl_setopt($login, CURLOPT_POSTFIELDS, $data);
ob_start(); // prevent any output
return curl_exec ($login); // execute the curl command
ob_end_clean(); // stop preventing output
}

function curl_grab_page($site,$proxy,$proxystatus){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if ($proxystatus == 'on') {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
}
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_URL, $site);
ob_start(); // prevent any output
return curl_exec ($ch); // execute the curl command
ob_end_clean(); // stop preventing output
}
curl_form('URL.de/blablabla;sa=add;cat=1','title=TEST&file=test&file url=test','','off');
function curl_form($url,$data,$proxy,$proxystatus){
$form = curl_init();
curl_setopt($form, CURLOPT_URL, $url);
curl_setopt($form, CURLOPT_HEADER, TRUE);
curl_setopt($form, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($form, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($form, CURLOPT_POST, TRUE);
curl_setopt($form, CURLOPT_POSTFIELDS, $data);
ob_start(); // prevent any output
return curl_exec ($form); // execute the curl command
ob_end_clean(); // stop preventing output
curl_close ($form);
unset($form);
}
?>
Er loggt sich ein, jedoch füllt er dann nicht das 2. Formular aus!!
Er sagt dann immer man muss dafür eingeloggt sein...
Was ist falsch an meinem Script?
Vielen Dank
MfG
Destruction ist offline   Mit Zitat antworten
Werbung

Windows 7 Tipps und Tricks in Bildern

Alt 09.01.2009, 18:57   #2 (Direktlink)
Stammuser
 
Registriert seit: 14.02.2007
Alter: 19
Beiträge: 491
Standard

Erledigt
Destruction ist offline   Mit Zitat antworten
Antwort

  Paules-PC-Forum.de > Programmierung > PHP/MySQL

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen erlaubt, neue Themen zu verfassen.
Es ist Ihnen erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
css probleme über probleme.. Spatenpeter Computerspiele 0 17.05.2008 14:26
Probleme über Probleme Karamalzjunkie Hardware - Problemlösungen 7 25.05.2005 08:47
Probleme über Probleme LanSpieler Software - Allgemein 1 13.12.2004 01:02
Probleme über Probleme Scharfrichter Hardware - Problemlösungen 1 09.07.2004 19:35
Computer aufgerüstet, Hardware Probleme o. Software Probleme Der_Gast Hardware - Problemlösungen 7 23.07.2003 17:35



Alle Zeitangaben in WEZ +2. Es ist jetzt 02:26 Uhr.


Powered by vBulletin® Version 3.8.7 (Deutsch)
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Powered by vBCMS® 2.7.0 ©2002 - 2012 vbdesigns.de
(c) Paules-PC-Forum.de

::: Impressum :::

Search Engine Optimization by vBSEO 3.3.2