Learn How to Extract Data From Websites with PHP

You will turn websites into data provider that you can consume whenever you want with PHP. Write your own data collector
4.3 (10 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
151 students enrolled
$60
Take This Course
  • Lectures 21
  • Contents Video: 2.5 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 3/2015 English

Course Description

  • Did you need any data from a website?
  • Did you try to fetch and extract data from a website with PHP?
  • Did you write any aggregator and scheduled a cron job before?
  • What about extraction data from HTML, Did you try before?
  • Do you want to collect data from websites and build yours?

Fetching data from a website has endless possibilities: exchange rates, country names, product titles, product images, customer comments, song names, links, emails etc... Did you know that you can do it with PHP?

In this course you will learn how to fetch data from websites and how to play with it like play dough. You will learn extracting data within HTML which you has been already fetched.

It is okey that your target websites has an API, but if they don't have, you can turn that websites into convenient data provider that you can consume whenever you want with PHP.

Collect your data put them into Word, Excel or Convert it to PDF or write another HTML on your own way. And also, you can create your brand new web site contains data which you fetched and extracted with PHP.

To make being clear everything in your mind, we will create an PHP project towards to end of training. We will be using cron jobs to make everything will be working in auto pilot.

What are the requirements?

  • Basic PHP programming experience
  • PHP editor

What am I going to get from this course?

  • Understand What is Scraping and API
  • Fetch Data From Websites with PHP
  • Extract Data From Websites with PHP
  • Save Extracted Data to MySQL
  • Use cronjob in Linux

What is the target audience?

  • Intermediate or above PHP Developers

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
02:04

You will learn that what is the content of the whole course. What will you learn, need etc..

Section 2: API vs Scraping
04:09

In this lesson,You will learn that what scraping is. After lesson you will have comprehensive understanding of content scraping, What is it, where you can use it. what's the benefits.

02:50

In this lesson,You will learn that what API is, how it works, what' is the basic benefits. After lesson you will have general idea about API.

04:43

In this lesson we will compare API and Scraping. After lesson you will be known basic pros and cons API and Scraping.

Section 3: Fetching Data
02:56

In this lesson we will learn usage of file_get_contents() PHP function. We will use HTTP Headers with the function.

05:22

In this lesson you will learn cURL functions at PHP and some tricks about fetching content from websites. We will talk about securely connecting to websites.

04:15

In this lesson we will talk about hiding yourself from remote servers when you make requests frequently. You will learn that how to protect your code banning from remote server.

02:56

In this lesson we gonna talk about HTTPS request with curl. End of the lesson you will be making https requests and know about certificate issues. Sometimes your https request fails, you will learn that why?

04:56

In this lesson we will talk about usage of cookie, encoding and custom headers with cURL. Let's start with cookie usage.

01:55

In this lesson we will talk about json encoding. You will learn that what is JSON and JSON encoder and decoder functions at PHP.

Section 4: Data Extraction
05:21

In this lesson you will learn that how to find patterns in html or other semi structured content.

12:23

In this lesson you will learn that What Regex (Regular Expressions) is and why we need it?

08:43

In this lesson you will learn preg_match() function of PHP.

04:59

In this lesson you will learn preg_match_all() function of PHP.

07:41

In this lesson you will learn that extraction data from a local file. We will use file_get_content and preg_match_all functions of PHP to extract data. As an example, we will extract data from Wikipedia.

08:46

In this lesson you will learn that extraction data from a remote web site. We will use file_get_content and preg_match_all functions of PHP to extract data. As an example, we will extract data from Trulia.

20:00

In this lesson you will learn that extraction data from a remote web site. We will use cURL and preg_match_all functions of PHP to extract data. I want to get weather information of London. So, We'll use Yahoo's weather page to extract data.

16:02

In this lesson you'll learn how to use an open source, easily learned parser, to read, modify, and spit back out HTML from external sources. Using Foyow's products as an example, you'll learn how to get a list of all the products on the site's homepage and display them.

Section 5: Cron Jobs
12:16

In this lesson you will learn what cron jobs is. Cron Jobs are used for scheduling tasks to run on the server. They're most commonly used for automating system maintenance or administration. However, they are also relevant to web application development. There are many situations when a web application may need certain tasks to run periodically. You can use cronjob to fetch webpages in schedule. You will learn about cronjobs at linux.

04:29

In this lesson you will learn that how to make single instance of your cron script.

In some cases you may have frequent running cron jobs, and you may not want them to collide if they take longer to run than the frequency itself.

For example, you may have a cron job running every minute. Yet, every once in a while it may take longer than one minute to run.

This can cause another instance of the same cron script to start running before the previous one finishes. You will learn that how to prevent it.
Section 6: Bonus
07:01

In this lesson I will introduce you 2 services for your quick scraping needs.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Orhan Doğan, Software Developer, Instructor

Orhan is an software developer and entrepreneur with much experience from different projects and many different programming languages.

Worked for heavy loaded web sites like eBay / Gittigidiyor, Sahibinden, Secretcv, Foyow, etc.

Orhan has 16 years experience at Software Development and Internet business and skilled with: PHP, MySQL, ZendFramework, Smarty, Java, Spring Framework, Solr / Lucene, Sphinx, MongoDB, Redis, Memcache, Git, SVN. I love working on High Available systems.

Research-Development and Teaching has been my passion since a long time. My aim to learn, use and teach technology the way it is used in industry and professional world.

I've decided to share my experience with the world via udemy. I'm waiting you at my cources.

Ready to start learning?
Take This Course