No edit summary |
imported>DrOwl m (deSpam) |
||
Line 1: | Line 1: | ||
How to grab URLs from IRC channels ,save them to mysql, and display them on a webpage: |
|||
<a href="http://get-nude-girls.com/"> http://get-nude-girls.com/ </a> |
|||
http://get-nude-girls.com/ |
|||
<a href="http://fuck-your-self.com/"> http://fuck-your-self.com/ </a> |
|||
[http://rufus.o-town.de/eggdrop/pub/scripts1.x/urlgrab.tcl urlgrab.tcl v0.7] by RufusDE <Thomas.Koester@rz.Uni-Osnabrueck.DE> |
|||
http://fuck-your-self.com/ |
|||
already handles all the [RegularExpressions regex]'ing nicely, and because [HackerAttitude no problem should ever be solved twice], we just take this one to start with. |
|||
<a href="http://sexy--asians.com/"> http://sexy--asians.com/ </a> |
|||
http://sexy--asians.com/ |
|||
It only logs to a text file though, but we have [http://rufus.o-town.de/(en)/eggdrop/pub/mysql/libmysqltcl.so-linux-glibc2-x86.tar.gz libmysqltcl] installed (on s23.org) so we can add MySql commands like this: |
|||
<a href="http://sexy-photo-pics.com/"> http://sexy-photo-pics.com/ </a> |
|||
http://sexy-photo-pics.com/ |
|||
<pre> |
|||
<a href="http://funny--sex.com/"> http://funny--sex.com/ </a> |
|||
# added sql insert by mutante |
|||
http://funny--sex.com/ |
|||
set db [mysqlconnect -host localhost -user <user> -password <password> -db ircurls] |
|||
<a href="http://sex--winner.com/"> http://sex--winner.com/ </a> |
|||
mysqlexec $db "INSERT INTO urlgrab SET url="$url",chan="$lchan",nick="$nick",date=now()" |
|||
http://sex--winner.com/ |
|||
puthelp "privmsg mutante :Added to sql-db : url: $url chan: $lchan nick: $nick date: $ctime" |
|||
<a href="http://sex-in-bmw.com/"> http://sex-in-bmw.com/ </a> |
|||
mysqlclose $db |
|||
http://sex-in-bmw.com/ |
|||
</pre> |
|||
<a href="http://hot-sex-pics-here.com/"> http://hot-sex-pics-here.com/ </a> |
|||
http://hot-sex-pics-here.com/ |
|||
i inserted this between row 51 - 57 in the original script. |
|||
<a href="http://fucking--sucking.com/"> http://fucking--sucking.com/ </a> |
|||
http://fucking--sucking.com/ |
|||
replace <user> and <password> with your mysql user / pass. |
|||
<a href="http://sex-on-public.com/"> http://sex-on-public.com/ </a> |
|||
http://sex-on-public.com/ |
|||
You need to create a database "ircurls" with a table "urlgrab" or whatever you like, |
|||
<a href="http://247--sex.com/"> http://247--sex.com/ </a> |
|||
http://247--sex.com/ |
|||
and the table structure is : |
|||
<a href="http://nice-nude-sluts.com/"> http://nice-nude-sluts.com/ </a> |
|||
http://nice-nude-sluts.com/ |
|||
<pre> |
|||
<a href="http://sexy-girl-toying.com/"> http://sexy-girl-toying.com/ </a> |
|||
Table structure for table `urlgrab` |
|||
http://sexy-girl-toying.com/ |
|||
<a href="http://sex-orgy-now.com/"> http://sex-orgy-now.com/ </a> |
|||
http://sex-orgy-now.com/ |
|||
CREATE TABLE urlgrab ( |
|||
<a href="http://busty--sluts.com/"> http://busty--sluts.com/ </a> |
|||
id int(5) unsigned NOT NULL auto_increment, |
|||
http://busty--sluts.com/ |
|||
url varchar(255) default NULL, |
|||
<a href="http://group-sex-dvd.com/"> http://group-sex-dvd.com/ </a> |
|||
nick varchar(32) default NULL, |
|||
http://group-sex-dvd.com/ |
|||
chan varchar(64) default NULL, |
|||
<a href="http://ass-sex-vids.com/"> http://ass-sex-vids.com/ </a> |
|||
date datetime NOT NULL default '0000-00-00 00:00:00', |
|||
http://ass-sex-vids.com/ |
|||
PRIMARY KEY (id) |
|||
<a href="http://sex-for-bucks.com/"> http://sex-for-bucks.com/ </a> |
|||
) TYPE=MyISAM; |
|||
http://sex-for-bucks.com/ |
|||
</pre> |
|||
<a href="http://get-world-sex.com/"> http://get-world-sex.com/ </a> |
|||
http://get-world-sex.com/ |
|||
*Now to the output part / webinterface: |
|||
<a href="http://sex--mission.com/"> http://sex--mission.com/ </a> |
|||
http://sex--mission.com/ |
|||
You can use f.e. php (or perl) to read from mysql: |
|||
<a href="http://porn-in-life.com/"> http://porn-in-life.com/ </a> |
|||
http://porn-in-life.com/ |
|||
Example: |
|||
<a href="http://sex-porn-club.com/"> http://sex-porn-club.com/ </a> |
|||
http://sex-porn-club.com/ |
|||
<pre> |
|||
<a href="http://real-xxx-porn.com/"> http://real-xxx-porn.com/ </a> |
|||
<?php |
|||
http://real-xxx-porn.com/ |
|||
<a href="http://crazy--fuckers.com/"> http://crazy--fuckers.com/ </a> |
|||
$db = mysql_connect("localhost", "<user>", "<pass>"); |
|||
http://crazy--fuckers.com/ |
|||
<a href="http://sex--nation.com/"> http://sex--nation.com/ </a> |
|||
mysql_select_db("ircurls",$db); |
|||
http://sex--nation.com/ |
|||
<a href="http://ultra-sex-videos.com/"> http://ultra-sex-videos.com/ </a> |
|||
$result = mysql_query("SELECT * FROM urlgrab",$db); |
|||
http://ultra-sex-videos.com/ |
|||
$urlnum=0; |
|||
<a href="http://blowjob--sex.com/"> http://blowjob--sex.com/ </a> |
|||
http://blowjob--sex.com/ |
|||
while ($myrow = mysql_fetch_row($result)) { |
|||
<a href="http://cock--sex.com/"> http://cock--sex.com/ </a> |
|||
http://cock--sex.com/ |
|||
printf("%s <a target="new" href="%s">%s</a> %s %s %s |
|||
<a href="http://anal--lovers.com/"> http://anal--lovers.com/ </a> |
|||
", |
|||
http://anal--lovers.com/ |
|||
$myrow[0], $myrow[1], $myrow[1], $myrow[2], $myrow[3], $myrow[4],$myrow[5]); |
|||
<a href="http://hardfucking-sluts.com/"> http://hardfucking-sluts.com/ </a> |
|||
http://hardfucking-sluts.com/ |
|||
$urlnum++; |
|||
<a href="http://after-party-sex.com/"> http://after-party-sex.com/ </a> |
|||
} |
|||
http://after-party-sex.com/ |
|||
<a href="http://sexy--nurses.com/"> http://sexy--nurses.com/ </a> |
|||
echo "<tr><td colspan="5">Total URLs found: $urlnum</td></tr>"; |
|||
http://sexy--nurses.com/ |
|||
echo "</table></body></html>"; |
|||
<a href="http://perfect--sex.com/"> http://perfect--sex.com/ </a> |
|||
</pre> |
|||
http://perfect--sex.com/ |
|||
<a href="http://mature-sex-action.com/"> http://mature-sex-action.com/ </a> |
|||
which,if you play more with it, looks something like: |
|||
http://mature-sex-action.com/ |
|||
<a href="http://bdsm--sex.com/"> http://bdsm--sex.com/ </a> |
|||
http:// |
http://mutante.s23.org/urllog.php |
||
<a href="http://incest--lovers.com/"> http://incest--lovers.com/ </a> |
|||
While creating all this i found out Rufus already offers [http://rufus.o-town.de/eggdrop/pub/mysql/ mysql_urlgrab.tcl] , DOH!!! |
|||
http://incest--lovers.com/ |
|||
<a href="http://young--fuckers.com/"> http://young--fuckers.com/ </a> |
|||
So you could as well just use that ,but i didnt check it out yet ;) |
|||
http://young--fuckers.com/ |
|||
<a href="http://very-sex-ladies.com/"> http://very-sex-ladies.com/ </a> |
|||
Rufus is also the maintainer of libmysqltcl himself it seems, so he should know pretty good. |
|||
http://very-sex-ladies.com/ |
|||
<a href="http://fucking--pussy.com/"> http://fucking--pussy.com/ </a> |
|||
mutante |
|||
http://fucking--pussy.com/ |
|||
<a href="http://my-sexy-syster.com/"> http://my-sexy-syster.com/ </a> |
|||
http://my-sexy-syster.com/ |
Revision as of 20:25, 1 February 2005
How to grab URLs from IRC channels ,save them to mysql, and display them on a webpage:
urlgrab.tcl v0.7 by RufusDE <Thomas.Koester@rz.Uni-Osnabrueck.DE>
already handles all the [RegularExpressions regex]'ing nicely, and because [HackerAttitude no problem should ever be solved twice], we just take this one to start with.
It only logs to a text file though, but we have libmysqltcl installed (on s23.org) so we can add MySql commands like this:
# added sql insert by mutante set db [mysqlconnect -host localhost -user <user> -password <password> -db ircurls] mysqlexec $db "INSERT INTO urlgrab SET url="$url",chan="$lchan",nick="$nick",date=now()" puthelp "privmsg mutante :Added to sql-db : url: $url chan: $lchan nick: $nick date: $ctime" mysqlclose $db
i inserted this between row 51 - 57 in the original script.
replace <user> and <password> with your mysql user / pass.
You need to create a database "ircurls" with a table "urlgrab" or whatever you like,
and the table structure is :
Table structure for table `urlgrab` CREATE TABLE urlgrab ( id int(5) unsigned NOT NULL auto_increment, url varchar(255) default NULL, nick varchar(32) default NULL, chan varchar(64) default NULL, date datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id) ) TYPE=MyISAM;
- Now to the output part / webinterface:
You can use f.e. php (or perl) to read from mysql:
Example:
<?php $db = mysql_connect("localhost", "<user>", "<pass>"); mysql_select_db("ircurls",$db); $result = mysql_query("SELECT * FROM urlgrab",$db); $urlnum=0; while ($myrow = mysql_fetch_row($result)) { printf("%s <a target="new" href="%s">%s</a> %s %s %s ", $myrow[0], $myrow[1], $myrow[1], $myrow[2], $myrow[3], $myrow[4],$myrow[5]); $urlnum++; } echo "<tr><td colspan="5">Total URLs found: $urlnum</td></tr>"; echo "</table></body></html>";
which,if you play more with it, looks something like:
http://mutante.s23.org/urllog.php
While creating all this i found out Rufus already offers mysql_urlgrab.tcl , DOH!!!
So you could as well just use that ,but i didnt check it out yet ;)
Rufus is also the maintainer of libmysqltcl himself it seems, so he should know pretty good.
mutante