Jump to content

liquidmind

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

liquidmind's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ....can I pay for help in this forum or would I have to post this in freelancing ?
  2. ....still looking for someone to read my op completely before responding
  3. ....looking for someone to read my op completely before responding
  4. My op asks to ignore preg_match "xxxx" and $link="xxxx". I added ; to the other but no difference. The problem is with the looping.
  5. ..mistakenly reposted within thread.
  6. Here is a quick graphic display of what I want code to do. Right now what the code is doing is giving me the correct preg_matches results for the last item in the list only. If I have one item in the list it will give me the results for that one item. If the list is two items then it will give me the correct results for item 2 while showing null results (0) for 1. If the list is three items, it will give me the results for item 3 while showing null results for 1 and 2...etc. Null results = 0 as directed by $count_matches=0; in code. Please ignore the following lines: ("xxxx" is just in place of actual code I don't want to display). $link="xxxx" preg_match "xxxx" <? if (!isset($_POST['itemlist'])) { ?> <form name="form" method="post"> <textarea rows=5 cols=20 name="itemlist" value="<?=$_POST['itemlist']?>" </textarea> <input type="submit" name="formsubmit" value="Submit!" class="button_style"><br /> </form> <? } else { $itemlist = explode("\n",$_POST['itemlist']); $count = 0; foreach ($itemlist AS $item) { $ab=curl_init(); $link="xxxx" curl_setopt($ab,CURLOPT_URL,$link); curl_setopt($ab, CURLOPT_HEADER, 0); ob_start(); curl_exec($ab); curl_close($ab); $item_results=ob_get_contents(); ob_end_clean(); preg_match "xxxx" $count_matches=$match[1]; if($count_matches=="") $count_matches=0; echo "<br/>".$item." ".$count_matches.""; $count++; } } ?>
  7. count_matches is the found or not found. If it returns matches then found, if not, then not found. No need to add echo "found" or "not found". The count_matches=0 is the "not found". With that in mind there is no point to doing an if statement at preg_match. Right now what it is doing is giving me the correct preg_matches results for the last item in the list only. If I have one item in the list it will give me the results for that one item. If the list is two items then it will give me the results for item 2 while showing null results for 1. If the list is three items, it will give me the results for item 3 while showing null results for 1 and 2...etc. echo "<br/>".$item." ".$count_match.""; Should be echo "<br/>".$item." ".$count_matches."";
  8. Where it says "xxxx" it's a filler to protect the innocent. <? if (!isset($_POST['itemlist'])) { ?> <form name="form" method="post"> <textarea rows=5 cols=20 name="itemlist" value="<?=$_POST['itemlist']?>" </textarea> <input type="submit" name="formsubmit" value="Submit!" class="button_style"><br /> </form> <? } else { $itemlist = explode("\n",$_POST['itemlist']); $count = 0; foreach ($itemlist AS $item) { $ab=curl_init(); $link="xxxx" curl_setopt($ab,CURLOPT_URL,$link); curl_setopt($ab, CURLOPT_HEADER, 0); ob_start(); curl_exec($ab); curl_close($ab); $item_results=ob_get_contents(); ob_end_clean(); preg_match (xxxx) $count_matches=$match[1]; if($count_matches=="") $count_match=0; echo "<br/>".$item." ".$count_match.""; $count++; } } ?>
  9. So I don't need to do $var = array() anywhere ? Right now what it is doing is giving me the preg_match results for the last item in the list only. If I have one item in the list it will give me the results for that one item. If the list is two items then it will give me the results for item 2 while showing null results for 1. If the list is three items, it will give me the results for item 3 while showing null results for 1 and 2...etc.
  10. The list items aren't the same everytime so I can't put array("abc","def","efg"); into the code. The array needs to be taken from $_POST. I have this so far: <? if (!isset($_POST['itemlist'])) { ?> <form name="form" method="post"> <textarea rows=5 cols=20 name="itemlist" value="<?=$_POST['itemlist']?>" </textarea> <input type="submit" name="formsubmit" value="Submit!" class="button_style"> </form> <? } else { $itemlist = explode("\n",$_POST['itemlist']); $count = 0; foreach ($itemlist AS $item) {
  11. The input list needs to be exploded based on new line, and then a preg_match performed using each list item. Loop till last item, then output results. Mostly have trouble how to set up the array, the foreach, and the count to increment. I have the echo down pat.
  12. What do these symbols after index.php mean ? Thx. index.php?a=cat&cc=456 index.php?a=d&id=1925
  13. [!--quoteo(post=363437:date=Apr 10 2006, 04:45 PM:name=Karthikeyan)--][div class=\'quotetop\']QUOTE(Karthikeyan @ Apr 10 2006, 04:45 PM) [snapback]363437[/snapback][/div][div class=\'quotemain\'][!--quotec--] please have a look at this thread [a href=\"http://whitefyre.com/boards/genmessage.php?topic=93&sid=077d21617b41e104ce68aae861478042\" target=\"_blank\"]http://whitefyre.com/boards/genmessage.php...e68aae861478042[/a] [/quote] I actually came across that already. The problem is the thread doesn't show how to code the php so to use the php 4.2.0 proxy script on the php 5.4.0 server. I don't know if that's even possible. Thanks anyhow.
  14. Anyone ? I'm dying here, I'm clueless about php.
  15. I aquired a proxy website recently and when trying to use the proxy this message comes up: [b]Fatal error: Non-static method PHProxy::decode_url() cannot be called statically in /home/xdomain/public_html/PHProxy.class.php on line 276[/b] I think there is a versian issue, as the script uses php 4.2.0, while the hosting service supports php 5.4.0. I have no idea if these things are backwards compatible or what. Can anyone shed some light on this or point me in the right direction ? The site is [a href=\"http://www.proxynut.com\" target=\"_blank\"]http://www.proxynut.com[/a]. Thanks!
×
×
  • 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.