...

View Full Version : Need someone who writes me a script :>



Intermezzo
08-24-2006, 05:19 AM
Hello, I need someone who can write an easy php script that fetches ALL login-url's from a given website. A login-url is for example this:

http://Username:Password@theurl.com

Of course the given page has more content except these url's. The script must sort out not needed informations and fetch only the VALID login-url's. After that I want all url's to be in an array so that I can work with them.

And please don't use PHP 5 functions.

Of course I will pay something, but only via PayPal. I think $10 should be enough :thumbsup:

Who is interested?

Regards,
Intermezzo

marek_mar
08-24-2006, 05:49 AM
I think you're going to get a better response in the Paid work offers and requests forum (http://www.codingforums.com/forumdisplay.php?f=36).

Mwnciau
08-24-2006, 08:34 AM
$string = 'http://username:password@theurl.com';
if (preg_match('/(http:\/\/)?(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)/', $string)){
$string = str_replace('http://', '', $string);
list ($username, $string) = explode (':', $string);
list ($password, $string) = explode ('@', $string);
$url = preg_replace('/(\.co\.uk|\.com|\.org)/', '', $string);

echo $username . '<br>' . $password . '<br>' . $url;
}


Is that what you were looking for? (btw I was bored :p )

Intermezzo
08-24-2006, 08:55 AM
Sorry that I posted in the wrong area :mad:

However, thanks Mwnciau for your code. It shows some new functions to me but it is not what i need :eek: I think you can do it Mwnciau. I really need this script. Tell me a (real) price for the script and I will pay it.

Here again - I need this:

Look for example this page... http://www.ultrapasswords.com/
Look at the source code und scroll to the bottom. For example there is this line of code...


... font face=Arial><strong><a href="http://jonkauffma:slipknot@www.adrianasage.com/members/index.php" target="_blank">Adrianasage.com</a></strong></font>...

Now I need the highlighted part. The script should search the whole page for these "logins". Every login should be added to an array.

Understand what mean? :(

Mwnciau
08-24-2006, 09:18 AM
$file = ''; // (file to open)
$contents = file_get_contents($file);
$contents = preg_replace('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', '-=-$0-=-', $contents);
$temp[] = explode('-=-', $contents);
for ($i = 0; $i < sizeof($temp); $i++){
if (preg_match('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', $temp[$i]){
$array[] = $temp[$i];
}
}

that should do it, $array has the values of the urls and you can use my previous post to separate them

btw pay what you feel its worth, tbh your money, i'll pm you the paypal email

Intermezzo
08-24-2006, 09:45 AM
OK. Some cash transfered for the beginning :D

If I use this code...


$file = 'http://www.ultrapasswords.com'; // (file to open)
$contents = file_get_contents($file);
$contents = preg_replace('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', '-=-$0-=-', $contents);
$temp[] = explode('-=-', $contents);
for ($i = 0; $i < sizeof($temp); $i++){
if (preg_match('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', $temp[$i]){
$array[] = $temp[$i];
}
}

the following error occurs...


Warning: preg_match() expects parameter 2 to be string, array given in C:\xampp\xampp\htdocs\fetch-test\index.php on line 49


:confused:

Mwnciau
08-24-2006, 10:08 AM
$file = 'http://www.ultrapasswords.com/'; // (file to open)
$contents = file_get_contents($file);
$contents = preg_replace('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', '-=-$0-=-', $contents);
$temp = explode('-=-', $contents);
for ($i = 0; $i < sizeof($temp); $i++){
$temp2 = $temp[$i];
$temp2 = strip_tags(preg_replace('/\<a (.*?)href="(.*?)"(.*?)\>/', '$1', $temp2));
list ($temp2, $temp3) = explode('"', $temp2);
if (preg_match('/((http:\/\/)(.*?):(.*?)@(.*?)(\.co\.uk|\.com|\.org)((.*?)\.php|\.html)?)/', $temp2)){
$array[] = $temp2;
}
}
for ($i = 0; $i < sizeof($array); $i++){
echo $array[$i] . '<br>';
}

took me a while to figure it out, i think thats has the desired affect.

Intermezzo
08-24-2006, 10:14 AM
Yeah great, it works perfectly! Good job. I've send you some more cash. Hope it's enough ;)

If I need more help for my script I will post here again. Thanks so far.

Mwnciau
08-24-2006, 10:18 AM
ok np :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum