Jetzt muss das nur in PHP übersetzt werden(Das kann ich leider nicht)
Aber danke für die Freigabe !
Wenn das jemand in PHP übersetzen kann, würde ich das im SSBG verbauen.
Jetzt muss das nur in PHP übersetzt werden(Das kann ich leider nicht)
Aber danke für die Freigabe !
Wenn das jemand in PHP übersetzen kann, würde ich das im SSBG verbauen.
Geändert von Uranjitsu (26.05.2016 um 17:58 Uhr)
Der Code von 1stAid macht eigentlich nix anderes, wie die ID des Links zu extrahieren, dann bei Share-Online einloggen und im Login Bereich eine Statusprüfung mit der ID abzusenden. Dann vom Ergebnis den Bildnamen auslesen und entsprechend on oder off zurückgeben.
Ist ja auch nix anderes als auf der Webseite
Die Ordnerid wird auf der Webseite gesucht, da die Unique sind, bleibt 1 Ordner der wird auf der Webseite gecheckt. Dann die Webseite nach dem .png unten geparst.
Der Code funktioniert seit 4-5 Jahren ohne Probleme.
Der Login wird überwunden und nur der gesuchte Ordner ausgegeben.
Aber
zeigt keine Funktion.... und zeigt dementsprechend den generierten Code nicht an.Code:&chkFolder[]=XXXX&op=stimg_png&submit=los
PHP-Code:<?php
$username = 'xxx';
$password = 'xxx';
$loginUrl = 'http://share-links.biz/login';
//$sl_unique_link = str_replace("http://share-links.biz/", "", "http://share-links.biz/_ird5u7o6soto");
$sl_search_file = "9512058699fc04289f4f84e7f";
//init curl
$ch = curl_init();
//Set the URL to work with
curl_setopt($ch, CURLOPT_URL, $loginUrl);
// ENABLE HTTP POST
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
//Set the post parameters
curl_setopt($ch, CURLOPT_POSTFIELDS, 'remember_me=1&user='.$username.'&pass='.$password.'&submit=Login');
//Handle cookies for the login
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
//Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL
//not to print out the results of its query.
//Instead, it will return the results as a string return value
//from curl_exec() instead of the usual true/false.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//execute the request (the login)
$store = curl_exec($ch);
//the login is now done and you can continue to get the
//protected content.
//set the URL to the protected file
curl_setopt($ch, CURLOPT_URL, 'http://share-links.biz/manage?search='.$sl_search_file.'&chkFolder[]=XXXX&op=stimg_png&submit=los');
//execute the request
$content = curl_exec($ch);
//save the data to disk
//file_put_contents('~/download.zip', $content);
echo $content;
Wo holst du dir den die
<input type="checkbox" name="chkFolder[]" value="6970000" class="chkFolder vtext-middle">
diese Value(value="6970000" )?
Die musst du dir nach dem suchen der nach der Ordnerid "ird5u7o6soto" holen
danach sendest du die 2 Parameter
'op=stimg_png'
'chkFolder[]=' + match.Value
an die Seite
an der Stelle hast du nur xxxx stehen statt der gesucht/gefundenen OrdnerNummer
XXX habe ich hier nur ersetzt.
- Das Script logt sich ein
- Das Script sucht nun anhand der ID nur den ordner "ird5u7o6soto"
- Dann soll ja der BBCode generiert werden:
Das Problem ist aber, dass der Submit viaCode:http://share-links.biz/manage?search=ird5u7o6soto&chkFolder[]=6979733&op=stimg_png
stattfindet.Code:onclick="javascript:return submitForm();"
Sonst würde der Aufruf im Browser mit:
genügen. Das funktioniert ja ebenfalls nicht.Code:http://share-links.biz/manage?search=ird5u7o6soto&chkFolder[]=6979733&op=stimg_png
PHP-Code:$username = 'XXX';
$password = 'XXX';
$loginUrl = 'http://share-links.biz/login';
$sl_unique_link = str_replace("http://share-links.biz/_", "", "http://share-links.biz/_ird5u7o6soto");
//init curl
$ch = curl_init();
//Set the URL to work with
curl_setopt($ch, CURLOPT_URL, $loginUrl);
// ENABLE HTTP POST
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
//Set the post parameters
curl_setopt($ch, CURLOPT_POSTFIELDS, 'remember_me=1&user='.$username.'&pass='.$password.'&submit=Login');
//Handle cookies for the login
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
//Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL
//not to print out the results of its query.
//Instead, it will return the results as a string return value
//from curl_exec() instead of the usual true/false.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//execute the request (the login)
$store = curl_exec($ch);
//the login is now done and you can continue to get the
//protected content.
//set the URL to the protected file
curl_setopt($ch, CURLOPT_URL, 'http://share-links.biz/manage?search='.$sl_unique_link.'&chkFolder[]=6979733&op=stimg_png&submit=los');
//execute the request
$content = curl_exec($ch);
//save the data to disk
//file_put_contents('~/download.zip', $content);
echo $content ;
Geändert von Uranjitsu (27.05.2016 um 17:05 Uhr)
Das ist ein POST Request der da abgeschickt wird, kein GET Request. Deshalb klappts auch nicht wenn dus nur über die URL machen willst. Also Formualr abschicken mit neuen Fields und dann die Ergebnisseite nach dem PNG durchsuchen und Online oder Offline zurückgeben, je nachdem welches PNG gefunden wird.
Du kannst das Bild nicht einfach so über ne URL oder ID einbinden. Das geht nicht.