Loading ...

How to update my site with new Regnow products?

Board index / General Chat / Other Products / Ultimate Regnow Affiliate (Deprecated)

Run your own software site...automatically!

Postby djtamuli on Jun 17, 2010 12 am


Hi
My site is up and running now, but my items were from 9th Nov 2009.
When I click update from URA admin, nothing happens.
I just added 2 items manually.
How can get some new products to my site please.
Thanks
Dhruba
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0

Postby Andrew on Jun 17, 2010 4 am


Does it say "0 listings imported"?
PHP Melody v3.0
New Series Module? Publish series and episodes right from PHP Melody's Dashboard -->
https://demo.phpmelody.com/admin/series.php
User avatar
Andrew
Founding Developer
 
Posts: 7504
Joined: Jul 07, 2007 1 pm
Reputation points: 428

Postby djtamuli on Jun 17, 2010 9 am


When I tried updating 1st time, after few minutes it said, "0 listing imported"
But since then when I try.. my admin page something like this after few minutes
http://www.tamleesoft.com/URAScreenshot.png
I am also pasting the update.php from my admin folder

<?php
include('header.php');
define('_UPDATE_PATH','http://www.phpsugar.com/updates/regnowfeed.ura');
if (ini_get('allow_url_fopen') == '1') {

$content = @file_get_contents(_UPDATE_PATH);
if ($content !== false) {
$handle = @fopen('temp.txt','w');
if(!$handle){
echo "<div id=\"error_msg\">";
echo "Could not open temp.txt!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "<br /><strong>Suggestion</strong> : If the file temp.txt doesn't exist in your admin/ directory, create and upload an empty file named 'temp.txt' and then refresh this page";
echo "</div>";
exit();
}
else {
if(@fputs($handle, $content, strlen($content)) === FALSE) {
echo "<div id=\"error_msg\">";
echo "Could not write the file!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "</div>";
exit();
}
}

fclose($handle);
}
else {
echo "<div id=\"error_msg\">";
echo "Could not fetch the update file!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "</div>";
exit();
}
}
else {
// make sure curl is installed
if (function_exists('curl_init')) {
// initialize a new curl resource
$ch = curl_init();
// set the url to fetch
curl_setopt($ch, CURLOPT_URL, _UPDATE_PATH);

// don't give me the headers just the content
curl_setopt($ch, CURLOPT_HEADER, 0);

// return the value instead of printing the response to browser
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// use a user agent to mimic a browser
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');

$content = curl_exec($ch);

// remember to always close the session and free all resources
curl_close($ch);
$handle = @fopen('temp.txt','w');
if(!$handle){
echo "<div id=\"error_msg\">";
echo "Could not open temp.txt!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "<br /><strong>Suggestion</strong> : If the file temp.txt doesn't exist in your admin/ directory, create and upload an empty file named 'temp.txt' and then refresh this page";
echo "</div>";
exit();
}
else {
if(@fputs($handle, $content, strlen($content)) === FALSE) {
echo "<div id=\"error_msg\">";
echo "Could not write the file!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "</div>";
exit();
}
}
}
}

include('class.csv.php');

$csv = new phpCSV();
$csv->open('temp.txt', 'r');
$csv->setFirstRowContainsColumnHeadings(true);

$i = 0;
$j = 0;
$ignore_this = array(0, 1, 2, '0', '1', '2');
while(!$csv->getEOF()) {
$result = $csv->fetch();
if($result <> false) {
foreach($csv->attributes['csv']['result']['data'] as $row => $column) {
$q = mysql_query("SELECT * FROM `ura_items` WHERE `ProductID` = '".$csv->getValue($row, 0)."'");
if( !$q )
die(mysql_error());

$i = mysql_num_rows($q);
if( $i == 0 ) {
if( ! in_array($csv->getValue($row, 11), $ignore_this) ){
$trialurl = "";
$trialurl = substr($csv->getValue($row, 15), 0, strlen($trialurl)-5);
mysql_query("INSERT INTO `ura_items` SET
`ProductID` = '".$csv->getValue($row, 0)."',
`ProductName` = '".addslashes($csv->getValue($row, 1))."',
`VendorID` = '".$csv->getValue($row, 2)."',
`VendorName` = '".addslashes($csv->getValue($row, 3))."',
`VendorHomepageURL` = '".$csv->getValue($row, 5)."',
`USDPrice` = '".$csv->getValue($row, 6)."',
`CategoryID` = '".$csv->getValue($row, 11)."',
`ShortDesc` = '".addslashes($csv->getValue($row, 13))."',
`LongDesc` = '".addslashes($csv->getValue($row, 14))."',
`TrialURL` = '".$trialurl."',
`DirectPurchaseURL` = '',
`Boxshot` = '".$csv->getValue($row, 19)."',
`Screenshot` = '".$csv->getValue($row, 20)."',
`Add_Date` = now(),
`status` = '0'")
or die("<div id=\"error_msg\">Could not update database!<br />The reported MySQL error is:<br />".mysql_error()."</div>");
$j++;
}
}
}
}
}
$csv->close();

$handle = @fopen('temp.txt','w');
if(!$handle){
echo "<div id=\"error_msg\">Could not open temp.txt!<br />Dead end in ". __FILE__ ." on line ". __LINE__;
echo "<br /><strong>Suggestion</strong> : If the file temp.txt doesn't exist in your admin/ directory, create and upload an empty file named 'temp.txt' and then refresh this page.</div>";
exit();
}
else {
$content = '';
if(@fputs($handle, $content, strlen($content)) === FALSE) {
echo "<div id=\"error_msg\">Could not write the file!<br />Dead end in ". __FILE__ ." on line ". __LINE__."</div>";
exit();
}
}

fclose($handle);

echo "<h2>Database update</h2>";
if( $j ) {
echo "<div id=\"ok_msg\">Your database has just been updated!<br />".$j." new item(s) were added to your website.</div>";
}
else echo "<div id=\"ok_msg\">Your database is already up-to-date. No update was necessary!</div>";
/*
row[ 0 -- ProductID +
1 -- ProductName +
2 -- VendorID +
3 -- VendorName +
5 -- VendorHomepageURL +
6 -- USDPrice +
11 -- CategoryID +
13 -- ShortDesc +
14 -- LongDesc +
15 -- TrialURL +
16 -- DirectPurchaseURL +
19 -- Boxshot +
20 -- Screenshot +
];
//----------------------------------- */
include('footer.php');
?>

Thanks
Dhruba
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0

Postby djtamuli on Jun 17, 2010 9 am


When I tried updating again today. It gave me the following message as shown in the picture
http://www.tamleesoft.com/URAScreenshot1.png

But still my products are from 9th Nov 2009
Thanks
Dhruba
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0

Postby Andrew on Jun 21, 2010 5 pm


Perhaps you're using an older email Dhruba. I've just replied to your email.
PHP Melody v3.0
New Series Module? Publish series and episodes right from PHP Melody's Dashboard -->
https://demo.phpmelody.com/admin/series.php
User avatar
Andrew
Founding Developer
 
Posts: 7504
Joined: Jul 07, 2007 1 pm
Reputation points: 428

Postby djtamuli on Jun 21, 2010 7 pm


Hi Andrew
I didn't get any email from you since 15th June
Kindly send me again
Thanks

Dhruba
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0

Postby Andrew on Jun 22, 2010 10 am


I'm here now so I will give the same advice.

I suspect the version you're using may be a bit old. Perhaps a re-install will sort this.

I'll have to check a few more things so don't reinstall just yet.
PHP Melody v3.0
New Series Module? Publish series and episodes right from PHP Melody's Dashboard -->
https://demo.phpmelody.com/admin/series.php
User avatar
Andrew
Founding Developer
 
Posts: 7504
Joined: Jul 07, 2007 1 pm
Reputation points: 428

Postby djtamuli on Jun 22, 2010 9 pm


Okay Andrew.. i will wait for your post here :)
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0

Postby djtamuli on Jun 26, 2010 11 am


Hi Andrew
I am still adding new product manually. Any chance I can update from the admin. I am still waiting for your post/email.
Thanks
Dhruba
djtamuli
Verified Customer
Verified Customer
 
Posts: 14
Joined: May 30, 2010 1 pm
Reputation points: 0


Who is online

Users browsing this forum: No registered users and 12 guests

cron