Toko baju super murah

www.bajusupermurah.com menjual pakaian berkwalitas dan termurah

iseng bermain regex pada php


hanya sekedar catatan pribadi:

iseng pengen coba comot harga emas dari situs http://antamgold.com/

utak atik akirny jadi juga:

<?php
$fh = fopen(“http://antamgold.com/index.php&#8221;, “r”);

while(true)
{
$line = fgets($fh);
if($line == null)break;

if(preg_match(“/nuke-30/”, $line))
{
$flag=on;
}
if($flag==”on”)
{
if(preg_match(“/LatestPriceTable/”, $line))$line=”<table cellpadding=’2′ border=’1′ cellspacing=’0′ name=’LatestPriceTable’>”;
if($flag==”on”)echo $line;
if(preg_match(“</table>”, $line))$flag=off;
}
if($flag==”off”)break;
}
fclose($fh);
?>

iseng berlanjut🙂

nyoba mau nyomot thread kaskus yg post reply masih <10

bisa di tes di http:www.bajusupermurah.com/kaskus/kaskus.php

berikut codingannya:

<?
$search=$_GET[search];
if($search==””)$search=100;
?>
<div align=”center”><strong>~~PAGE ONE HUNTER~~<br />old kaskus only</strong>
<fieldset><legend>SETTING</legend>
<a href=”kaskus.php?search=100″ <? if($search==”100″)echo ‘style=”background:#33FF00″‘; ?>>100</a> || <a href=”kaskus.php?search=200″ <? if($search==”200″)echo ‘style=”background:#33FF00″‘; ?>>200</a> || <a href=”kaskus.php?search=300″<? if($search==”300″)echo ‘style=”background:#33FF00″‘; ?>>300</a>
</fieldset>
</div>
<table border=”1″>
<tr>
<td>jumlah reply</td><td>jumlah views</td><td>judul thread</td>
</tr>
<?php
$search=$_GET[search];
if($search==””)$search=100;
$fh = fopen(“http://www.kaskus.co.id/forumdisplay.php?f=21&pp=$search&#8221;, “r”);
while(true)
{
$line = fgets($fh);
if($line == null)break;

if(preg_match(‘/”font-weight:bold/’, $line))
{
$flag=”on”;
$tampung[1]=str_replace(‘<a href=”‘,'<a href=”http://www.kaskus.co.id/&#8217;,$line).” “;
}
if($flag==”on”)
{
if(preg_match(‘/Replies/’, $line))
{
//<td title=”Replies: 2,978, Views: 46,861″> ~~ contoh $line
$reply = str_replace(‘<td title=”Replies’,””,$line);

preg_match(‘/:(.*), V\w+/’,$reply,$cocok); // ambil reply
preg_match(‘/\w+: (.*)”>/’,$reply,$views); // ambil views

$cocok[1]= str_replace(“,”,””,$cocok[1]);
if($cocok[1]<10)
{
if($cocok[1]==”0″)echo “<tr><td><font color=’#FF0000′>”.$cocok[1].”</font></td><td>”.$views[1].”</td><td>”.$tampung[1].”</td></tr>”;
else echo “<tr><td align=’center’>”.$cocok[1].”</td><td>”.$views[1].”</td><td>”.$tampung[1].”</td></tr>”;
}
}
if(preg_match(‘/end show threads/’, $line))break;
}
}
fclose($fh);
?>
</table>
<br>
by: snowrex@mei2012</p>

iseng lanjooot lagi,

gak puas dengan old kaskus, ane melirik kaskus beta

ternyata musti id yg udah di invite yg bisa akses ke dalem beta T_T

tapi ane pantang menyerah, stelah muter” pala ckck

akhirnya nemu ide…,,

kan tinggal bikin converter url aja dari url old kaskus ke url beta kaskus

jadi deh

biarpu codingan acek”an yg penting kagak nyontek puny orang hhe😛

cek bekicot

http:www.bajusupermurah.com/kaskus/kaskusb.php

ini codingannya

berantakan mode:on

<?
$search=$_GET[search];
if($search==””)$search=100;
?>
<div align=”center”><strong>~~PAGE ONE HUNTER~~<br />FOR kaskus BETA</strong>
<fieldset><legend>SETTING</legend>
<a href=”kaskusb.php?search=100″ <? if($search==”100″)echo ‘style=”background:#33FF00″‘; ?>>100</a> || <a href=”kaskusb.php?search=200″ <? if($search==”200″)echo ‘style=”background:#33FF00″‘; ?>>200</a> || <a href=”kaskusb.php?search=300″<? if($search==”300″)echo ‘style=”background:#33FF00″‘; ?>>300</a>
</fieldset>
</div>
<table border=”1″>
<tr>
<td>jumlah reply</td><td>jumlah views</td><td>judul thread</td>
</tr>
<?php
$search=$_GET[search];
if($search==””)$search=100;
$fh = fopen(“http://www.kaskus.co.id/forumdisplay.php?f=21&pp=$search&#8221;, “r”);
while(true)
{
$line = fgets($fh);
if($line == null)break;

if(preg_match(‘/”font-weight:bold/’, $line))
{
$flag=”on”;$potong = strlen($line)-strpos($line,’d”>’)-3;

$judul= substr($line,-$potong);

$line = substr($line,85);
$line = substr($line,0,20);
$line = str_replace(‘” ‘,”,$line);
$kode = eregi_replace(‘[^0-9]’,”,$line);
$length=24-strlen($kode);
for($i=0;$i<$length;$i++)
{
$kode = “0”.$kode;
}

}
if($flag==”on”)
{
if(preg_match(‘/Replies/’, $line))
{
$reply = str_replace(‘<td title=”Replies’,””,$line);

preg_match(‘/:(.*), V\w+/’,$reply,$cocok); // ambil reply
preg_match(‘/\w+: (.*)”>/’,$reply,$views); // ambil views

$cocok[1]= str_replace(“,”,””,$cocok[1]);
if($cocok[1]<10)
{
if($cocok[1]==”0″)echo “<tr><td><font color=’#FF0000′>”.$cocok[1].”</font></td><td>”.$views[1].”</td><td><a href=http://livebeta.kaskus.co.id/thread/”.$kode.”/>”.$judul.”</a></td></tr>”;
else echo “<tr><td align=’center’>”.$cocok[1].”</td><td>”.$views[1].”</td><td><a href=http://livebeta.kaskus.co.id/thread/”.$kode.”/>”.$judul.”</a></td></tr>”;
}
}
if(preg_match(‘/end show threads/’, $line))break;
}
}
fclose($fh);
?>
</table>
<br>
by: snowrex@mei2012</p>

yg sebenrnya sih klo mo ngejar pertamax di kaskus mah tinggal

pake url : http://livebeta.kaskus.co.id/forum/21/the-lounge/1?sort=thread&order=desc

yg diatas mah cuma iseng aja utak” atik php biar ap yg di dapet pas kuliah gak lupa

maklum ane lulus kuliah TI, tp jadiny malah wiraswasta🙂

28 Mei 2012 - Posted by | Cuap cuap | , , , , , ,

Belum ada komentar.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: