Make this script work in DreamHost(Doesn't allow fopen) $30-100 USD Disiarkan hampir 18 tahun yang lalu
$30-100 USD Dibayar semasa penghantaran
My host, dreamhost doesn't allow the usage of fopen, so it probably requires CURL to make this script work, please make it work in dreamhost!
<?php
set_time_limit(0);
$file = "[login to view URL];ned=us&ie=UTF-8&q=blue+shoes&output=rss";
$rss_channel = array();
$currently_writing = "";
$main = "";
$item_counter = 0;
function startElement($parser, $name, $attrs) {
global $rss_channel, $currently_writing, $main;
switch($name) {
case "RSS":
case "RDF:RDF":
case "ITEMS":
$currently_writing = "";
break;
case "CHANNEL":
$main = "CHANNEL";
break;
case "IMAGE":
$main = "IMAGE";
$rss_channel["IMAGE"] = array();
break;
case "ITEM":
$main = "ITEMS";
break;
default:
$currently_writing = $name;
break;
}
}
function endElement($parser, $name) {
global $rss_channel, $currently_writing, $item_counter;
$currently_writing = "";
if ($name == "ITEM") {
$item_counter++;
}
}
function characterData($parser, $data) {
global $rss_channel, $currently_writing, $main, $item_counter;
if ($currently_writing != "") {
switch($main) {
case "CHANNEL":
if (isset($rss_channel[$currently_writing])) {
$rss_channel[$currently_writing] .= $data;
} else {
$rss_channel[$currently_writing] = $data;
}
break;
case "IMAGE":
if (isset($rss_channel[$main][$currently_writing])) {
$rss_channel[$main][$currently_writing] .= $data;
} else {
$rss_channel[$main][$currently_writing] = $data;
}
break;
case "ITEMS":
if (isset($rss_channel[$main][$item_counter][$currently_writing])) {
$rss_channel[$main][$item_counter][$currently_writing] .= $data;
} else {
$rss_channel[$main][$item_counter][$currently_writing] = $data;
}
break;
}
}
}
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
xml_parser_free($xml_parser);
// output HTML
//print ("" . $rss_channel["TITLE"] . "");
if (isset($rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
// for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) {
for($i = 0;$i < 5;$i++) {
if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
//print ("n" . $rss_channel["ITEMS"][$i]["TITLE"] . "");
} else {
print ("n" . $rss_channel["ITEMS"][$i]["TITLE"] . "");
}
print ("" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . ""); }
} else {
print ("There are no new articles.");
}
}
?>
ID Projek: 68861
Tentang projek 7 cadangan
Projek jarak jauh
Aktif 18 tahun yang lalu
Ingin menjana wang? Alamat e-mel Mohon pekerjaan yang serupa Faedah membida di Freelancer Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Ianya percuma untuk mendaftar dan membida pekerjaan
7 pekerja bebas membida secara purata $62 USD untuk pekerjaan ini
Can make this script work. Can I do it now ?
$50 USD dalam 0 hari
3.1 (6 ulasan) We at Varshyl Tech - an ITES helps businesses in their software, database design, website development and other related vertical needs with primary focus on Website Design and Development, Application Development, Custom Tool Development, Flash Animation.
We have a dedicated team of Professional software engineer with expertise in PHP, ASP, .net, PERL, JAVA and XML. Our Programmers have vast experience in open source applications like Bulletin Boards, Blogs, Mambo and ECommerce.
Thanks
Varshyl Tech
$100 USD dalam 5 hari
4.5 (2 ulasan) Please check pm. Thanks, Justin
$100 USD dalam 1 hari
5.0 (1 ulasan) $30 USD dalam 0 hari
0.0 (0 ulasan) GOOD QUALITY WORK WITH INTIME DELIVERY OF THE PRODUCT . 100% GUARANTEED OF HIGH QUALITY PROFESSIONAL WORK, AS WE ARE THE EXPERTISE IN JAVA/J2EE , JSP , EJB, ASP,PHP, STRUTS FRAME WORK RELATED PROJECTS. OUR COMPANY HAS BEEN IN THE SPHERE OF APPLICATION ,WEB PROGRAMMING FOR 4 YEARS ALREADY,ALWAYS PROVIDING ITS CLIENTS WITH EXCELLENT SERVICE ! WE CAN START ASAP,WE CAN DELIVER PRODUCTS IN SHORT TIME,WE ARE THE PROFESSIONAL OF WEB/APPLICATION PROGRAMING. THANKS, INSTANCE SOFTWARE SOLUTIONS. BANGALORE ,INDIA.
$75 USD dalam 5 hari
0.0 (0 ulasan) I have used CURL to Login to restricted sites compare data and post the difference back to the site. No problem at all to fix.
$30 USD dalam 1 hari
0.0 (0 ulasan)