- or download this
# modules for easier debugging and
# better coding standards
use warnings;
use diagnostics;
use strict;
- or download this
# URL that returns list of YBX categories
my $category_list_http = qw !http://api.yellowbrix.com/api/?service=ca
+tegory_list&method=xml&id=verizon&password=xxxxxx!;
- or download this
my $url = qq!http://api.yellowbrix.com/api/?!;
my $common = qq!method=xml&id=verizon&password=xxxxxx;!
...
# URL to weather on yellowbrix server. weather query must be appended.
my $weather_http = $url . qq!service=weather&$common&query=!;
- or download this
# mySQL escape character
my $sql_escape_char = '\\';
...
$data{pub_source} =~ s/(')/$sql_escape_char'/gs;
$data{headline} =~ s/(')/$sql_escape_char'/gs;
$data{summary} =~ s/(')/$sql_escape_char'/gs;
- or download this
sqlStatement ('INSERT articles ('.
'story_id,'.
...
"'$article_data{summary}',".
"'$article_data{summary_url}'".
')');
- or download this
$article_data{summary_url} = "some stuff \'); drop table articles;";
- or download this
sqlConnectToDB;
sqlStatement ("TRUNCATE TABLE articles");
...
# retrieve xml file with all articles
my $headline_xml = getHTTPAddress($category_http_start.uri_escape($cat
+egory_name).$category_http_end);