Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nbproject/
12 changes: 6 additions & 6 deletions crawler/PHPCrawl/libs/PHPCrawlerUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PHPCrawlerUtils
*/
public static function splitURL($url)
{
// Protokoll der URL hinzuf�gen (da ansonsten parse_url nicht klarkommt)
// Protokoll der URL hinzufügen (da ansonsten parse_url nicht klarkommt)
if (!preg_match("#^[a-z]+://# i", $url))
$url = "http://" . $url;

Expand Down Expand Up @@ -71,13 +71,13 @@ public static function splitURL($url)
$domain = substr($host, $pos+1);
}

// DEFAULT VALUES f�r protocol, path, port etc. (wenn noch nicht gesetzt)
// DEFAULT VALUES für protocol, path, port etc. (wenn noch nicht gesetzt)

// Wenn Protokoll leer -> Protokoll ist "http://"
if ($protocol == "") $protocol="http://";

// Wenn Port leer -> Port setzen auf 80 or 443
// (abh�ngig vom Protokoll)
// (abhängig vom Protokoll)
if ($port == "")
{
if (strtolower($protocol) == "http://") $port=80;
Expand All @@ -87,7 +87,7 @@ public static function splitURL($url)
// Wenn Pfad leet -> Pfad ist "/"
if ($path=="") $path = "/";

// R�ckgabe-Array
// Rückgabe-Array
$url_parts["protocol"] = $protocol;
$url_parts["host"] = $host;
$url_parts["path"] = $path;
Expand Down Expand Up @@ -523,7 +523,7 @@ public static function sort2dArray(&$array, $sort_args)
{
$args = func_get_args();

// F�r jedes zu sortierende Feld ein eigenes Array bilden
// Für jedes zu sortierende Feld ein eigenes Array bilden
@reset($array);
while (list($field) = @each($array))
{
Expand All @@ -539,7 +539,7 @@ public static function sort2dArray(&$array, $sort_args)
}
}

// Argumente f�r array_multisort bilden
// Argumente für array_multisort bilden
for ($x=1; $x<count($args); $x++)
{
if (is_string($args[$x]))
Expand Down
26 changes: 14 additions & 12 deletions crawler/admin/home.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php $home="";include("login.php");?>
<?php $home = "";
include("login.php");
?>
<form method="POST">
<input type="text" name="url[]" placeholder="URL1" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL2" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL3" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL4" size="50"/><br/>
<button>Crawl</button>
<input type="text" name="url[]" placeholder="URL1" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL2" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL3" size="50"/><br/>
<input type="text" name="url[]" placeholder="URL4" size="50"/><br/>
<button>Crawl</button>
</form>
<?php
if(isset($_POST['url']) && array_search("", $_POST['url'])===false){
$crawlToken=418941;
$url4Array=$_POST['url'];
print_r($url4Array);
include("../crawl.php");
<?php
if (isset($_POST['url']) && array_search("", $_POST['url']) === false) {
$crawlToken = 418941;
$url4Array = $_POST['url'];
$dir = realpath(dirname(__FILE__));
include $dir . '/../crawl.php';
}
?>