Results 1 to 5 of 5
  1. #1
    Newbie
    Join Date
    September 29th, 2008
    Location
    Chicago, IL
    Posts
    5
    Did my programmer do it right?
    I've paid a programmer to create a linkshare search engine on my site that's similar to another site (i dont think i can post a url here)
    I signed up for a merchant account and received my ftp info
    According to my programmer he's created a script that would download the files automatically when they were uploaded on the ftp
    However I don't see any ftp info in the file that he created
    I've also been getting this error sometimes

    Code:
    Warning: simplexml_load_file(http://feed.linksynergy.com/productsearch?token=XXXXXXXXXXXXXXXXXXXXXXX&mid=XXXXX&MaxResults=50&keyword=thrillseekers): failed to open stream: Connection timed out in /hsphere/local/home/XXXXXX/XXXXXXXXX.net/wp-content/themes/orange/find.php on line 20 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http%3A%2F%2Ffeed.linksynergy.com%2Fproductsearch%3Ftoken%3Ddcb888a7c4bedd870301538e86df76d57611655e29caa09ee89b9393fe809f71%26mid%3D24506%26MaxResults%3D50%26keyword%3Dthrillseekers" in /hsphere/local/home/XXXXXXX/XXXXXXXXX.net/wp-content/themes/orange/find.php on line 20
    and this is the code for the file he created
    find.php

    Code:
    <?php
    /*
    Template Name: find
    */
    
    // Settable variables
    $token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    $link_mid = "XXXXX";
    $max_results = "50";
    
    get_header();
    
    $keyword = (isset($_POST['keyword'])) ? $_POST['keyword'] : ((isset($_GET['keyword'])) ? $_GET['keyword'] : "");
    if ($keyword != "") {
    	// The LinkSynergy DNS seems to keep going down, so we'll use the IP address.
    	//$feed_host = "feed.linksynergy.com"; // Original domain/host name - often doesn't work.
    	$feed_host = "65.245.193.50";
    	$feed_url = "http://".$feed_host."/productsearch?token={$token}&mid={$link_mid}&MaxResults={$max_results}";
    	$xml_call = simplexml_load_file($feed_url."&keyword=".urlencode($keyword));
    }
    else {
    	$xml_call = false;
    }
    ?>
    <!--START MAIN-->    
    	<div id="main">
           <?php get_sidebar(); ?>
      
    <!--START FIND-->
      <div id="posts">
      <img src="<?php bloginfo('template_url'); ?>/images/content_top.gif">
    <div align="center">
    <form method="get" id="searchform2" action="/find/"><input type="text" value="Type a song and hit enter to find it" name="keyword" id="keyword" class="search-box" style="width: 350px;" onfocus="if (value =='Type a song and hit enter to find it'){value =''}" onblur="if (value ==''){value='Type a song and hit enter to find it'}" /></form>
    </div>
    
    Search results for `<?php echo($keyword); ?>`.<br /><br />
    <table style="width: 100%; border: 0px; padding: 0px; margin: 0px;">
    <?php
    
    if ($xml_call) {
    	foreach ($xml_call as $item) {
    		if (strlen($item->linkurl) > 1) {
    			$link  = $item->linkurl;
    			$title = $item->productname;
    			$imgURL = $item->imageurl;
    
    			// Item price
    			//$price = $item->price;
    
    			// Merchant name
    			//$merchantname = $item->merchantname;
    
    			// Artists name
    			$artist = explode(" by ", $item->description->short, 2);
    ?>
     <tr style="width: 100%;">
      <td valign="top" align="center" nowrap="nowrap">
       <a target="_blank" href="<?php echo($item->linkurl); ?>"><img style="border: 0px;" hspace="4" vspace="1" src="<?php echo($item->imageurl); ?>" /></a>
      </td>
      <td valign="top" align="left">
       <span style="font-size: 14px;">
        <strong><a target="_blank" href="<?php echo($item->linkurl); ?>"><?php echo($artist[1]); ?> - <?php echo($item->productname); ?></a></strong>
       </span><br />
      </td>
     </tr>
    <?
    		}
    		else {
    			// Do nothing
    		}
        }
    }
    else {
    ?>
     <tr style="width: 100%;">
      <td valign="top" align="center" nowrap="nowrap">
       <div align="left" style="width: 75%;">
        Please enter a search term for what you would like to search for;
        <form action="/find/" method="post" enctype="application/x-www-form-urlencoded">
         <input type="text" name="keyword" style="border: solid 1px #000000; width: 70%;" /> <input type="submit" name="submit" value="Find" style="border: solid 1px #000000; width: 30%;" />
        </form>
       </div>
      </td>
     </tr>
    <?php
    }
    ?>
    </table>
    
     </div>
    <!--END FIND-->
    <?php include (TEMPLATEPATH . '/sidebar300.php'); ?>
        </div>
      </div>
    <!--END MAIN-->   
    
    <?php get_footer(); ?>
    Was it done right?
    And can I get it to display the newest files first?

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    England
    Posts
    4,327
    shouldn't you be talking this through with your programmer?

  3. #3
    Newbie
    Join Date
    September 29th, 2008
    Location
    Chicago, IL
    Posts
    5
    Well I want to see what the linkshare experts have to say about it because I'm suspecting my programmer didn't do this right.

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    England
    Posts
    4,327
    these two lines don't look very promising:

    // The LinkSynergy DNS seems to keep going down, so we'll use the IP address.
    //$feed_host = "feed.linksynergy.com"; // Original domain/host name - often doesn't work.

  5. #5
    Newbie
    Join Date
    June 3rd, 2007
    Location
    the Netherlands
    Posts
    46
    It's using the api of Linkshare. It doesn't do anything with datafeeds or ftp and if you take a look at the sample code provided by Linkshare it looks a lot like that.

    http://helpcenter.linkshare.com/publ...questionid=304

    But I do not find anything wrong with the code accept that the exampl e has the wrong mid# but I guess you ddi that on purpose. If I remove that I get a clean xml file as answer that would be procesed.

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Need a programmer
    By tsmgroup2 in forum Member Services
    Replies: 2
    Last Post: May 29th, 2013, 09:55 PM
  2. Anyone Need Programmer Help?
    By justinru in forum Midnight Cafe'
    Replies: 7
    Last Post: February 1st, 2008, 04:13 PM
  3. Anyone Need Programmer Help?
    By justinru in forum Commission Junction - CJ
    Replies: 1
    Last Post: November 4th, 2007, 10:55 AM
  4. I need a programmer
    By SandraR in forum Midnight Cafe'
    Replies: 15
    Last Post: October 27th, 2003, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •