ginocote Posted July 4, 2006 Share Posted July 4, 2006 Hi,I finally find how to read this external file with my search queryhttp://www.sedo.com/search/keysearch.php4?key=keywordBut i'm not finish yet and need some helpHere my search page who query the file belowhttp://www.toolurl.com/testsearchkeywords11.php?url=gamesi enter the word games to show a result, you can enter any word you want.Now i want that all my results become link to go to a external page.[url=http://www.partnerlink.com/search/showdetails.php4?partnerid=12345&language=fr&keyword=games.cx]games.cx[/url][url=http://www.partnerlink.com/search/showdetails.php4?partnerid=12345&language=fr&keyword=games.cg]games.gp[/url]etc....Here the first link target to: http://www.partnerlink.com/search/showdetails.php4?partnerid=12345&language=fr&keyword=games.cxAs you see all link begin the same but the extension after the keyword=change acording to the resultsall link should be blank. Here my php code[code]<?php$file = fopen("http://www.sedo.com/search/keysearch.php4?key=$_GET[url]", "r") or die("Couldn't open file"); $str = fread($file, 400); echo $str = explode('#', $str);echo "<tr align=center><td colspan=3>Keywords return " . sizeof($str) . " results on Sedo auction</br>";foreach($str as $item){ echo $item . "<br>";}?>[/code]How can i link all results to the right extension?BTW, how to remove this "Array" text in my result page? -> ArrayKeywords return .....Tank you for your helpGinowww.toolurl.com Quote Link to comment https://forums.phpfreaks.com/topic/13619-how-to-make-results-clickable/ Share on other sites More sharing options...
Orio Posted July 4, 2006 Share Posted July 4, 2006 I think this is what you mean:[code=php:0]<?php$file = fopen("http://www.sedo.com/search/keysearch.php4?key=$_GET[url]", "r") or die("Couldn't open file"); $str = fread($file, 400); echo $str = explode('#', $str);echo "<tr align=center><td colspan=3>Keywords return " . sizeof($str) . " results on Sedo auction</br>";$prefix="http://www.";foreach($str as $item){echo('<a href="'.$prefix.$item.'" traget="_blank">'.$item.'</a>');}?> Quote Link to comment https://forums.phpfreaks.com/topic/13619-how-to-make-results-clickable/#findComment-52796 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.