Posts tagged problem
PHP READING FILES SCRIPT PROBLEM?
Jan 26th
Question by :
PHP Reading files script problem?
I am having trouble with my PHP classes and was hoping someone could help me complete this script because it has me beat. I realize that this is suppose to be very basic, I am just having a very difficult time with it.
So basically, I need to
Read the file line by line, and use the explode and list functions to extract the category, rating, URL, and description. Use that information to write out a web page that contains each link and description, such as the following:
Maps
hopstop.com – A good way to find your way from here to there in major cities.
News
chicagotribune.com – The on the web version of the Chicago Tribune newspaper
Maps
mapquest.com – Find an address on a map or get directions from one place to another. ‘
At the moment I have this, ( I know that the explode command has to be in the wrong place I just dont know what I am missing.
My text file I am reading is named results.txt and everything that depends on it is in the correct place.
An example of the text it has is.
Random|3|google.com|Search Engine
Humor|9|whiteninjacomics.com|The adventures of White Ninja.
Games|5|wowhead.com|For all your WoW needs
Science|9|www.blender3d.com|A free open-source 3d graphics program!
News|8|digg.com|tech news
Random|1|myspace.com|Laugh at em.
The first field being the category the second being the rating and the third is the actual URL.
< ?php
$ filename = "../write/results.txt";
print "
Results.txt”;
if(($ fp=fopen($ filename,”r”))===false)
print(“Couldnt open the file”);
else
{
$ line = fgets($ fp);
while (!feof($ fp))
{
print htmlentities($ line).’
‘;
$ line = fgets($ fp);
}
fclose($ fp);
}
print “
“;
$ line=”games|9|http://www.gamefaqs.com”;
$ a = explode(“|”,$ line);
list($ Category,$ Rating,$ URL) = $ a;
print(“$ Category,$ Rating,$ URL
“);
?>
That really Helped thanks!
Do you know how I would be able to split the data up into their categories and then have them listed by rank ex:
Also how would I make the URLs actual links?
Maps
1 mapquest.com – Find an address on a map or get directions from one place to another.
2 hopstop.com – A good way to find your way from here to there in major cities.
News
5 chicagotribune.com – The on the web version of the Chicago Tribune newspaper
etc.
Read More >>
PROBLEM WITH LIVE SEARCH – JQUERY (OR PHP?)?
Jan 22nd
Question by :
Problem with live search – jquery (or php?)?
Right now, I am designing a web page with a live search engine that fetches data from the database and styles it into a proper search result. The biggest problem I am experiencing is that you have to enter the exact same words in the exact same sequence as in the database, if you want to see the results. However, i.e when you enter keywords in Google, it does not look for exactly the same sequence, but it scans through the database and finds the keywords in a passage.
All in a few words, when the entry in my database is “Database entry”, I have to write “Database entry” in the search bar if I want to get the result. How ever, I want to be able to write “Entry database” and get the same result.
This is the script that I am using:
And here is my php code without the root, admin and password
–>
mysql_select_db(“test1″) or die(mysql_error());
$ partialStates = $ _POST['partialState'];
$ says = mysql_query(“SELECT * FROM says WHERE name LIKE ‘%$ partialStates%’”);
while($ say = mysql_fetch_array($ states)) {
echo
“
“
“
“.
“
“.
“
“
“.
“
“
“.
“
“.
“
“.
“”
;
}
?>
So, that is all. Please help me manipulate my code and make it able to search keywords in a passage.
Read More >>
SEARCH ENGINE REDIRECT PROBLEM?
Jan 2nd
Question by dellick17:
Search engine redirect problem?
Ok I posted a while ago this same question:
http://answers.yahoo.com/question/index;…
After using malware-bytes, TDSSkiller, and following the instructions on multiple different websites using multiple different anti-malware/spyware tools I still cannot get rid of this search engine redirect problem.
I ran TDSSkiller, it took out one file, and then told me to restart. I figured, “cool, my problem is fixed”, only to find that the problem was still there even after TDSSkiller ran.
I tried running through Malware-bytes once again, along with AVG, and spybot, all of which only removed cookies. Search engine redirect is still there.
In addition to this problem, i am unable to boot into safe mode for unknown reasons. Each time i try to boot into safe mode, my personal automatically shuts down after i select to boot into ANY of the safe modes.
For some background information, I used to have an nvidia 8800 GT OC installed via PCI-express slot, but the slot broke. I removed the video card because the slot no longer worked, and my Computer started working after i removed the video card from the broken slot.
Could the broken PCI-express slot be the reason my personal is broken now? It doesn’t seem like it would cause this type of problem.
In addition to this information, any link i click on google goes through a few phases.
When i first click on the link, the loading bars states something about searching, then it states redirecting, and then it goes to a random website that has nothing to do with what i clicked on.
Ok in addition to that, I cannot get on youtube because it is now an unsafe connection. However, instead of saying i am trying to connect to youtube, it states that i am trying to unsafely connect to www.google.com?
Read More >>
HOW DO I FIX MY YAHOO AND GOOGLE SEARCH REDIRECT PROBLEM?
Nov 27th
Question by YoYoYo!:
How do I fix my Yahoo and Google search redirect problem?
Every time I search for something on these two search engines it finds many pages for the subject I am looking for but when you click on the link it redirects you to other different perilous pages. Very frustrating. I have been able to use the search engine called Goodsearch for now. I have run malware and viruscanners and detects and removes some but does not solve this problem. Please help. Thanks.
Read More >>
HOW DO I FIX MY SEARCH ENGINE PROBLEM?
Jan 30th
Question by dazed:
How do I fix my search engine problem?
Almost each time I use a search engine and click on the link it takes me to advertisement (google, yahoo, bing, etc.). I have looked at previous posted questions and did what they suggested. I have run my spyware, anti-virus, and anti-malware but it keep happening. Is there anything I can do before I just give up and begin going back to the library? And no reformatting is not a fix; so real answers only please. TY
Read More >>
OK GUYS BIG BIG PROBLEM WITH REDIRECT VIRUS! HELP?
Oct 3rd

ok so ive had a redirect virus at least 4 times…the koob face (shiver), google redirect, .Zoog, etc.
so look this one is not responsive. i have tried Malwarebytes, Avira, Avast (hate it), Superantispyware, Avg PRo9, spybot S&D, and cccleaner.
NONE OF THEM ARE WORKING FOR ME!! Its not just search engines, but its also when i type in a web site or click on a link. I use fire fox, i have turned off system restore because ive tried it and the virus just follows me. im using the fire fox addons : Adblock Plus, and No Script. I does this on all of my world wide web browsers. WTF is the problem? nd how the hell do i get rid of it?
Read More >>
PHP READING FILES SCRIPT PROBLEM?
Jul 19th
I am having trouble with my PHP classes and was hoping someone could help me complete this script because it has me beat. I realize that this is suppose to be very basic, I am just having a very difficult time with it.
So basically, I need to
Read the file line by line, and use the explode and list functions to extract the category, rating, URL, and description. Use that information to write out a web page that contains each link and description, such as the following:
Maps
hopstop.com – A good way to find your way from here to there in major cities.
News
chicagotribune.com – The on the web version of the Chicago Tribune newspaper
Maps
mapquest.com – Find an address on a map or get directions from one place to another. ‘
At the moment I have this, ( I know that the explode command has to be in the wrong place I just dont know what I am missing.
My text file I am reading is named results.txt and everything that depends on it is in the correct place.
An example of the text it has is.
Random|3|google.com|Search Engine
Humor|9|whiteninjacomics.com|The adventures of White Ninja.
Games|5|wowhead.com|For all your WoW needs
Science|9|www.blender3d.com|A free open-source 3d graphics program!
News|8|digg.com|tech news
Random|1|myspace.com|Laugh at em.
The first field being the category the second being the rating and the third is the actual URL.
< ?php
$filename = "../write/results.txt";
print "
Results.txt”;
if(($fp=fopen($filename,”r”))===false)
print(“Couldnt open the file”);
else
{
$line = fgets($fp);
while (!feof($fp))
{
print htmlentities($line).’
‘;
$line = fgets($fp);
}
fclose($fp);
}
print “
“;
$line=”games|9|http://www.gamefaqs.com”;
$a = explode(“|”,$line);
list($Category,$Rating,$URL) = $a;
print(“$Category,$Rating,$URL
“);
?>
That really Helped thanks!
Do you know how I would be able to split the data up into their categories and then have them listed by rank ex:
Also how would I make the URLs actual links?
Maps
1 mapquest.com – Find an address on a map or get directions from one place to another.
2 hopstop.com – A good way to find your way from here to there in major cities.
News
5 chicagotribune.com – The on the web version of the Chicago Tribune newspaper
etc.
Read More >>