Lukket

Update 1 file in a Wordpress Plugin that downloads .zip file with XML inside

I have a part of a Wordpress plugin (1 file) that I use to read XML files from a remote server and use the data to update a database on the current server. Currently I read the XML data as a text file directly from the remote server using the following code:

===STARTCODE===========================================

function get_the_data_file($url) {

$curl = curl_init();

curl_setopt_array($curl, Array(

CURLOPT_URL => $url,

CURLOPT_USERAGENT => 'spider',

CURLOPT_TIMEOUT => 600,

CURLOPT_CONNECTTIMEOUT => 30,

CURLOPT_RETURNTRANSFER => TRUE,

CURLOPT_ENCODING => 'UTF-8'

));

$data = curl_exec($curl);

curl_close($curl);

return $data;

}

$returnthecontent = get_the_data_file("[url removed, login to view]");

$xmlmani = simplexml_load_string($returnthecontent, 'SimpleXMLElement', LIBXML_NOCDATA);

if(!empty($xmlmani)){

// Check to Make Sure First XML Node Name = stp_trenddaily

$xmlisok = $xmlmani->st_p;

if($xmlisok=="stp_trenddaily"){

$tableName = $wpdb->prefix."stp_trendsugget";

$thecoschpis = 0;

foreach($xmlmani->Post as $PostNode)

{

$us_itemID = $PostNode->itemID;

$us_title = esc_sql(rawurldecode($PostNode->title));

$us_Category = ($PostNode->Category);

$us_primarytype = $PostNode->primarytype;

$us_imagetouse = esc_sql(rawurldecode($PostNode->imagetouse));

$us_linkurl = esc_sql(rawurldecode($PostNode->linkurl));

$us_likes = ($PostNode->likes);

$us_views = ($PostNode->views);

$us_shares = ($PostNode->shares);

$us_comments = ($PostNode->comments);

$us_virality = ($PostNode->virality);

$us_datediscovered = esc_sql(rawurldecode($PostNode->datediscovered));

$us_contentsource = esc_sql(rawurldecode($PostNode->contentsource));

$us_description = esc_sql(rawurldecode($PostNode->description));

===END CODE===========================================

There is 1 thing I need changed.

1) I want to start using a .zip file with the text file with the xml inside of it.

This might mean having to download the file to the server first instead of just reading it remotely. Wordpress has a function that downloads files called download_url() and this might be the best way to go, but I am also open to other suggestions like using a custom function to download the file and process it in one go.

If it is possible to do it all in memory as I am doing it now, that would be good as well, and probably easiest as if we download the file, we have to:

1) download file

2) unzip file

3) read data from file into xml dom

4) delete zip file and unzipped file

Which could get messy but is the only way I have seen in my research to do this as working with zip files seams to require a download. However I am not an expert in zip files in wordpress or php so maybe there is another way!

I would do this myself, just do not have the time. This should be super simple for someone that knows what they are doing. I need this done asap.... So please let me know as soon as possible. I will be picking the first person and a reasonable price that can get this done asap.

Færdigheder: Javascript, MySQL, PHP, WordPress, XML

Se mere: wordpress remote, the best part 1, prefix function, is in a prefix, all the best part 1, wordpress file downloads plugin, wordpress xml data import plugin, wordpress file manager plugin, wordpress plugin update site, wordpress file download manager plugin, wordpress file download plugin, wordpress file transfer plugin, wordpress client files downloads plugin, embed xml inside actionscript file, wordpress plugin user send file

Om arbejdsgiveren:
( 14 bedømmelser ) Hamilton, Canada

Projekt-ID: #10638810

8 freelancers are bidding on average $44 for this job

tlchung

i am a skilled wordpress developer, i have customized lot of wordpress plugins for my clients, i can do the customization for you. let discuss more via private message, thanks.

$30 USD in 2 dage
(332 bedømmelser)
7.6
$39 USD på 1 dag
(531 bedømmelser)
6.6
sptechnocrats

Hi, Greetings of the day! Hope you are doing well!! We have gone through with the requirements. We have a large portfolio of sites built specifically on this platform (you can view my profile which include more th Mere

$131 USD på 1 dag
(99 bedømmelser)
6.6
juanzapico

Send me a message so we can discuss about your requirements. I can help you with your project. Thanks.

$45 USD på 1 dag
(11 bedømmelser)
4.1
gentozl

I warmly welcome. I am interested in your offer - if you still need a solution :) We do not need to mix the solution for Wordpress. If the name of the file inside the zip is known *** - then I suggest you to add Mere

$30 USD in 0 dage
(20 bedømmelser)
4.3
zuk22

Hi. Everything is quite clear. When can we get started? I work on my own host, so you can observe the development process. At final stage I'll give you demo access for plugin testing You can write to me for m Mere

$30 USD in 2 dage
(10 bedømmelser)
4.1
maamekal

Hello I am certified Web designer with experience in design/developed websites and up for all the new challenges in your job listing . I have several years of experience and strong knowledge of Adobe Photoshop, Mere

$25 USD på 1 dag
(4 bedømmelser)
3.1
RedSparrowTechno

Good Day! I am PHP WORDPRESS DEVELOPER. I have read your project requirements very carefully and look forward to further work opportunity on your project. Pricing will be $55 for this project. I have an excellent Web Mere

$55 USD in 2 dage
(1 bedømmelse)
0.8
abainfo

Hello I suggest you doing it using linux crontabs that executes periodically a shell script. My task will be creating the shell script. This is better so that your webserver is not bothered by such tasks.

$20 USD in 10 dage
(0 bedømmelser)
0.0