# PortalNews PHP - Website Berita dengan Auto Scraping

## Fitur Utama

1. **Auto Scraping Berita** - Mengambil berita otomatis dari berbagai sumber nasional & internasional (CNN Indonesia, Detik, Kompas, BBC, dll)
2. **Sistem Login/Register** - Multi-user dengan role (visitor, user, admin)
3. **Dashboard User** - Bookmark, komentar, notifikasi
4. **Kategori Berita** - Nasional, Internasional, Ekonomi, Olahraga, Teknologi, Hiburan, Kesehatan, Pendidikan
5. **Fitur Interaktif** - Like, share, komentar, bookmark
6. **SEO Ready** - Sitemap XML, RSS Feed, Meta tags
7. **Responsive Design** - Tampilan mobile-friendly

## Cara Install

1. Pastikan sudah install XAMPP/WAMP/Laragon
2. Copy folder `web-run` ke htdocs
3. Buka `http://localhost/web-run/setup.php` di browser
4. Ikuti instruksi setup database
5. Login admin: `admin@portalnews.com` / `admin123`

## Cara Menggunakan

### Auto Scraping
```
http://localhost/web-run/scraper.php?run=true
```

### Sitemap
```
http://localhost/web-run/sitemap.php
```

### RSS Feed
```
http://localhost/web-run/rss.php
```

## Struktur File

```
web-run/
├── config.php         # Konfigurasi database & fungsi helper
├── setup.php          # Setup database (jalankan sekali)
├── scraper.php        # Auto scraping berita
├── sitemap.php        # Generate sitemap XML
├── rss.php            # RSS Feed
├── index.php         # Halaman utama
├── berita.php        # Detail berita
├── login.php         # Halaman login
├── register.php      # Halaman daftar
├── dashboard.php     # Dashboard user
├── logout.php        # Logout
├── api/              # API endpoints
│   ├── bookmark.php
│   └── comment.php
├── assets/
│   ├── css/style.css
│   └── js/main.js
```

## Auto Scraping Sources

- CNN Indonesia
- Detik News
- Tribun News
- Kompas
- Tempo
- TVOne News
- BBC Indonesia
- Reuters Indonesia

## Requirements

- PHP 7.4+
- MySQL 5.7+
- Extension: mysqli, pdo, curl, simplexml

