- pens to comrade, pens ... - dajver
- oneHashCode, very definitely. - knes
|
2 answers
Children , do not use this code. It is added solely to show the PRINCIPLE of the actions of all such sites and does not claim to be complete or safe.
<form action="exchange.php"> <input type="text" value="http://" name="link" /> <button type="submit">Добавить ссылку</button> </form> <?php $filename = 'links.txt'; $sitename = 'http://example.com';//адрес нашего сайта $handle = fopen($filename,'a'); fwrite($handle,$_GET['link']."\n"); fclose($handle); $links = file($filename); $good_links = array(); foreach ($links as $link){ $content = file_get_contents($link); if(strpos($content,$sitename)!==false){ $good_links[] = $link; printf('<a href="%s">%s</a><br />',$link,$link); } } file_put_contents($filename,implode("\n",$good_links));
|
It is unlikely that you can build a CMS, you need to hire a programmer, and, for speed, use a web framework, for PHP - kohana, well, or on rails. If you need development, you can write me on Skype: johniek_comp
|