Continue with behavioral marketing. Tweets. Reports. Homework: capture tweets project.

Slides:



Advertisements
Similar presentations
Adding Dynamic Content to your Web Site
Advertisements

Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
FILE UPLOADS CHAPTER 11. THE BASIC PROCESS 1.The HTML form displays the control to locate and upload a file 2.Upon form submission, the server first stores.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Chapter 10 Publishing and Maintaining Your Web Site.
Creating Databases applications for the Web Reprise. Basic HTML review, forms Preview: Server side vs client side Classwork: create HTML forms and check.
PHP: Hypertext Processor Fred Durao
August Chapter 1 - Essential PHP spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science and Technology.
CSC 318 WEB APPLICATION DEVELOPMENT.  Introduction to Server Scripting language  Client VS Server  Introduction to PHP  PHP Files and Syntax  Function.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
Chapter 9 Using Perl for CGI Programming. Computation is required to support sophisticated web applications Computation can be done by the server or the.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
PHP == ‘ Hypertext Preprocessor ’ Open-source, server-side scripting language Used to generate dynamic web-pages PHP scripts reside between reserved PHP.
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
PHP : Hypertext Preprocessor
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Chapter 4 – The Building Blocks Data Types Literals Variables Constants.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
JavaScript & jQuery the missing manual Chapter 11
University of Sunderland Lecture 1 Internet Software Architectures Lecture 1: Introduction.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
INTERNET APPLICATION DEVELOPMENT For More visit:
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
USING PERL FOR CGI PROGRAMMING
CS146 Database Systems &Team Projects Spring 2009.
Cross Site Integration “mashups” cross site scripting.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Overview: 1. Discussion of the basic architecture of a web application. 2. Discussion of the relevance of using MySQL and PHP in a web application.
Creating Databases for Web Applications Twitter example Classwork/homework: Projects.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Creating databases for Web Applications php basics. ing. phpMyAdmin to set up MySQL. Homework: Use phpMyAdmin. Make posting with [unique] source on.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
Introduction to Web Programming. Introduction to PHP What is PHP? What is a PHP File? What is MySQL? Why PHP? Where to Start?
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
PHP Open source language for server-side scripting Works well with many databases (e.g., MySQL) Files end in.php,.php3 or.phtml Runs on all major platforms.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
Creating Databases for Web applications Server side vs client side PHP basics Homework: Get your own versions of sending working: both html and Flash!
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Chap 2 – Getting Started COMP YL Professor Mattos.
Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Display Page (HTML/CSS)
PHP Syntax You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain.
PHP Form Processing * referenced from
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
PHP Overview. What is PHP Widely available scripting language Free Alternative to Microsoft’s ASP Runs on the Web Server; not in the browser Example:
IST 210: PHP Basics IST 210: Organization of Data IST2101.
PHP using MySQL Database for Web Development (part II)
JavaScript and Ajax (Ajax Tutorial)
Creating Databases Local storage. join & split
Intro to PHP & Variables
Web Browser server client 3-Tier Architecture Apache web server PHP
Intro to PHP.
Presentation transcript:

Continue with behavioral marketing. Tweets. Reports. Homework: capture tweets project.

Reports Identify 5 cookies: owner & data How accurate was the geolocation program for you using …

Capturing tweets Background: request from senior project student I found a wrapper for the official Application Programming Interface (API) twitter-api/ –I downloaded and then uploaded to my site –NOTE: I did not bother to study/understand the whole thing! ASSIGNMENT for you (you can work in teams): build your own twitter capture program. –Probably will require you to work with incomplete understanding (like I did).

Client - Server HTML5 JavaScript program to run on the client, invokes php program to run on the server, which accesses twitter programs

Another Purchase server Was not necessary, but I have had to put other php programs on socialsoftware.purchase.edu so I put these there, also. Why? –Server programs can … change programs, files on server, so CTS restricts certain operations. reading & writing & uploading files

Quick overview php A php program (script) on server –takes input from the html script that invoked it, most typically form input –does something: often invoking SQL on a database, and here invoking programs on twitter –creates html to send back to browser, to be interpreted in normal way.

NOTICE Upload to server and test. NO test on your own computer –unless…. You can't see the source of a php program, but only the source of the html it produces

php quirks Variables start with $ -> used for associative array components –similar to dot notation in JavaScript. More when we do JSON. (dot) is used for concatenation Use combination of single and double quotation, along with \ for producing strings with quotation marks. Go into and out of php. Everything 'outside of php' is part of the html document sent to the browser.

My twitter example(s) html presents a form. Invokes php script php uses wrapper functions to get data –NOT instantaneous. Need to set up to wait for data php uses data to produce (echo) html.

Capture tweets meyer/twittersearch.htmlhttp://socialsoftware.purchase.edu/jeanine. meyer/twittersearch.html meyer/twittersearchfilter.htmlhttp://socialsoftware.purchase.edu/jeanine. meyer/twittersearchfilter.html Note: Danielle's program is much nicer than mine! Note: she wanted the program to repeat…

<?php header('Content-type: text/html; charset=utf-8'); require_once 'class.twitter.php'; ?> Finding tweets for a specified tag function init() { window.setTimeout(function() {location.reload(true);},5000); };

<?php $t = new twitter; $tag = $_GET['key']; print "Searching for $tag..."; $s = new summize; $data = $s->search($tag); $data = $data->results; ?> <?php foreach($data as $d){ $st2= substr($d->text,0,2); $st1 = substr($d->text,0,1); if ((strcasecmp($st2,"RT") !=0) && { //case insensitive compare to RT ?>

profile_image_url; ?>" alt="" ', $d->text); ?> by from_user; ?>"> from_user; ?> created_at; ?> from source); ?>

Homework Create new folder on your students.purchase.edu site download from moodle and then upload the class.twitter.php file plus my two files test NOW make changes! –you may always search for the same thing or put in a choice or …. –you can change what is displayed. You also can search and find other twitter helper programs.