Jump to content

djtozz

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

djtozz's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks a lot amigo! Excactly what I was looking for : - )
  2. Hello, I'm trying to make a remote login connection using curl for easy-share.com I have follwing code: <?php $query = "login=test98&password=test98&remember=1"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.easy-share.com/accounts"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$query); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); print $data; ?> I created following test account: user: test98 pass: test 98 The problem is following, I'm probably using the wrong CURLOPT_URL path to login: http://www.easy-share.com/accounts They are poping up the login window on their mainpage using a script. See: http://easy-share.com/ Can somebody advice me how I can solve this? Thanks
  3. Thanks guys, Schlo_50 : your solution worked for me, thank you Thebadbad: htmlspecialchars was exactly what I was looking for! Thanks a lot!
  4. Hi, I'm using a little scirpt that creates rss feeds for my mysql table. works fine, except for the records that have a "&" in my table. I've tried to following: $caption = str_replace("&","and",$caption); but this doesn't seems to work, can somebody help me with this please ? Are there maybe other functions out there that can do the same? (converting the 'illegal' characters from a variable to the right format for xml) Thanks,
  5. Sorry... I made a typo while copy/paste.... Code above is working! thanks
  6. Thanks a bunch for this excellent info! Excactly what I was looking for.
  7. Thanks for your feedback, I'm not sure what you mean with indexes.. Those variables have following value $stype=" AND `fsize`<>''"; $fxmedia="AND media='avi'"; $fsort="ORDER by `lastcheck` ASC"; $fxtype is empty.
  8. Hi, First I would like to say that php is pretty new for me.. so please don't shoot me if this should be a stupid question! But I'm a little surpized due to following.. I have a search script (very large mysql db) which is working pretty fast for searching! I'm using following querry: $q="SELECT `url`,`caption`, `type`,`fsize`, MATCH (caption) AGAINST ('$kwd2') as score,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` WHERE MATCH (caption) AGAINST ('$kwd2')$stype $fxtype $fxmedia $fsort LIMIT $start,$search_count"; sample: http://www.filemirrors.info Now I would like to display the 30 latest records using following querry: $q="SELECT `url`,`caption`, `type`, `id`,`fsize`,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` Where checked=1 $stype $fxtype $fxmedia $fsort LIMIT 30"; sample: http://www.filemirrors.info/latest.html Now it seems to take much more time (3x) to display the last 30 records then when using the searchbox and enter a keyword... I thought a simple select should be going faster then match against a keyword? Is there an explenation for this or am I missing something? Thanks,
  9. Thanks for the excellent info guy's! Once again, I learned a lot from this post! Keep up the good work
  10. Hi, I'm having problems when trying following: I have: createBar("Download: <b>$kwd</b><Br />", "100%") and I'm trying to display following after $kwd: if(count($info['results'])) print '<div align="center" class="info"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>'; I replaced all double " by /" but this doesn't seems to work. createBar("Download: <b>$kwd</b> if(count($info['results'])) print '<div align=\"center\" class=\"info\"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>'<Br />", "100%") I'm getting following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
  11. Hello, I'm having some probs with the page navigation from http://www.filemirrors.info/new The navigation works, but when selecting certain file host or file type the navigation doesn't works properly: Search example: When searching for 'dvdrip' and selecting ONLY avi files http://www.filemirrors.info/new/index.php?q=dvdrip&type=all&tmedia=avi&search=Search I'm getting the right results but the option 'avi' is not saved/included in the navigation. Page 2 displays all mediatypes. // Options selection box select host & type $stype=" AND `fsize`<>''"; if($_GET['stype']=='checked') $stype=" AND `fsize`<>''"; if(!isset($_GET['type']) || $_GET['type']=="all") $fxtype=""; else { if($_GET['type']>=1 && $_GET['type']<=12) $fxtype="AND type='".$_GET['type']."'"; else $fxtype=""; } if(!isset($_GET['tmedia']) || $_GET['tmedia']=="all") $fxmedia=""; else { if($_GET['tmedia']=='avi') $fxmedia="AND media='avi'"; if($_GET['tmedia']=='mp3') $fxmedia="AND media='mp3'"; if($_GET['tmedia']=='rar') $fxmedia="AND media='rar'"; if($_GET['tmedia']=='zip') $fxmedia="AND media='zip'"; } // end options $kwd=mysql_real_escape_string($_GET['q']); $info['keyword']=$kwd; $info['total_results_count']=mysql_get_first_result("SELECT COUNT(*) FROM `v2links` WHERE MATCH (caption) AGAINST ('$kwd')$stype $fxtype"); // navigation if($_GET['start'] && is_numeric($_GET['start'])) { $start=$_GET['start']; $start=((int)($start/$search_count))*$search_count; } else $start=0; $info['curpage']=ceil(($start+1)/$search_count); $info['total_pages']=ceil($info['total_results_count']/$search_count); $navigation=array(); $navigation[]='<span class="navi navi_current"> -'.$info['curpage'].'- </span>'."\n"; $inc=$dec=$start; $tcnt=0; for($i=0;$i<9;$i++) { $inc+=$search_count; $incp=ceil(($inc+1)/$search_count); $dec-=$search_count; $decp=ceil(($dec+1)/$search_count); if($inc<$info['total_results_count']) { array_push($navigation,'<span class="navi"> <a href="./?q='.$_GET['q'].'&start='.$inc.'"&type='.$_GET['type'].'>'.$incp.'</a> </span> '."\n"); $tcnt++; } if($dec>=0) { array_unshift($navigation,'<span class="navi"> <a href="./?q='.$_GET['q'].'&start='.$dec.'">'.$decp.'</a> </span> '."\n"); $tcnt++; } if($tcnt>=10) break; } $navigation=join("",$navigation); // end navigation Can someone advice me how to fix this plaese? Thanks
  12. Hey Guy's, Thanks for the info, the values are not stored in a table, I used numbers because I didn't now for sure how to make difference between "all" and the file "extension" if the value is a number, I could use if($_GET['tmedia']>=1 && $_GET['tmedia']<=5) $fxtype="AND media='".$_GET['tmedia']."'"; I'm not sure how to replace this. Thanks
  13. Hi I'm having a problem with my search function http://www.filemirrors.info/new/ I added the last selection box (for the filetype) <select name="tmedia"> <option value="all" <? if($_GET['tmedia']=='all') echo 'selected';?>>All</option> <option value="1" <? if($_GET['media']=="avi") echo 'selected';?>>avi</option> <option value="2" <? if($_GET['tmedia']=="mp3") echo 'selected';?>>mp3</option> <option value="4" <? if($_GET['tmedia']=="rar") echo 'selected';?>>rar</option> <option value="5" <? if($_GET['tmedia']=="zip") echo 'selected';?>>zip</option> </select> I've got a table called 'media' that contains the file extension (avi/mp3/exe..) Now I tried following but I don't know how to put the extension (ex. avi) in that ????? field if(!isset($_GET['type']) || $_GET['type']=="all") $fxtype=""; // part for selecting the file host = ok else { if($_GET['type']>=1 && $_GET['type']<=12) $fxtype="AND type='".$_GET['type']."'"; // part for selecting the file host = ok else $fxtype=""; } if(!isset($_GET['tmedia']) || $_GET['tmedia']=="all") $fxmedia=""; // part for selecting the file extension = ok else { if($_GET['tmedia']>=1 && $_GET['tmedia']<=5) $fxmedia="AND media='??????"; // HereI need to get the extension name, and not a value else $fxmedia=""; } $q="SELECT `... FROM `v2links` WHERE MATCH (caption) AGAINST ('$kwd') $fxtype $fxmedia ";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.