iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old October 20th, 2007, 08:29 AM   #21
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

good point....



wwwhhhheeeyyyy it woorrkkkss...ish....

umm.. ill pm you the new beta test link.. all the google'S work, but not the wiki's etc.. no error, just doesnt redirect to search, just blank.

man i am anoying you =D
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 22nd, 2007, 08:47 AM   #22
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

It would appear something has gone wrong in your code somewhere as the youTube options are going to google. ;(
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 24th, 2007, 07:44 AM   #23
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

do you have msn or icq or something? :P this is getting queit hard to do over a forum, and we will past the fixed code here after?
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 24th, 2007, 08:53 AM   #24
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

Okay I have cleaned upi your code a little and it should work.

Just keep the $headerSettings['indexes'] in lower case and be mindful of the swicth syntax and all should be well.

Code:
<?php
$headerSettings 
= array();


//  for the sake of simplicity, keep all of the index values in lower case
// eg. $header['myname'] as opposed to $header['myName']



$headerSettings['mp3s']           = ' intitle:"index.of" "parent directory" "size" "last modified" "description" [snd] (mp4|mp3|avi|flac|aac|ape|ogg) -inurl:(jsp|php|html|aspx|htm|cf|shtml|lyrics-realm|mp3-collection) -site:.info';

$headerSettings['albums']         = ' site:zshare.net OR site:rapidshare.net OR site:rapidshare.com OR site:megaupload.com OR site:updownloadserver.de OR site:sharebigfile.com OR site:upload.sc OR site:bigfileupload.com OR site:upload2.net';

$headerSettings['torrents']       = ' site:thepiratebay.org OR site:mininova.org OR site:torrentspy.com OR site:isohunt.com';

$headerSettings['fmovie']         = ' site:stage6.divx.com OR site:veoh.com OR site:flixdump.com OR site:filmzzz.com OR site:freemoviescinema.com OR site:peekvid.com OR site:myeasytv.com OR site:tv-links.co.uk OR site:guba.com OR site:chooseandwatch.com OR site:videohybrid.com OR site:dailymotion.com OR site:jonhs.net OR site:movieflix.com';

$headerSettings['tvmovie']        = ' site:';

$headerSettings['free_uni']       = ' site:mit.ols.usu.edu OR site:cnx.ols.usu.edu OR site:ocw.mit.edu OR site:cnx.rice.edu OR site:sofia.fhda.edu OR site:ocw.jhsph.edu OR site:ocw.usu.edu OR site:www.twocw.net OR site:mit.ocw.universia.net OR site:ocw.osaka-u.ac.jp OR site:ocw.kyoto-u.ac.jp OR site:ocw.dmc.keio.ac.jp OR site:www.ocw.titech.ac.jp OR site:ocw.u-tokyo.ac.jp OR site:webcast.berkeley.edu OR site:en.wikibooks.org OR site:free.ed.gov OR site:firstgov.gov';

$headerSettings['pdf']            = ' filetype:pdf ';

$headerSettings['ringtones']      = ' intitle:"index.of" "parent directory" "size" "last modified" "description" [snd] (mid|midi|imelody|qcp|rtttl|rtx|sckl|ott) -inurl:asp -inurl:htm -inurl:html -inurl:cf -inurl:jsp';

$headerSettings['youtube']        = 'search_type=search_videos&search_sort=video_view_count&search_category=0&search=Search&so=3&start=0&search_query=';

$headerSettings['wiki']           = '';

$headerSettings['youtube']        = 'search_type=search_videos&search_sort=video_view_count&search_category=0&search=Search&so=3&start=0&search_query=';

$headerSettings['askcom']           = '';

$headerSettings['citeseet']       = 'submit=Search+Documents&cs=1&q=';

$headerSettings['googlescholar']           = '';

$headerSettings['somethingelse']           = ' site:answers.google.com';

// convert $_POST['searchType to lower case so we know we'll match regardless of what the user sends

$_POST['searchType'] = strtolower($_POST['searchType']);

if (isset(
$headerSettings[$_POST['searchType']]))
{

    
// have a switch statement to keep it a bit easier
    // to add extras, place
    
    // case 'whatyouwanttomatch' : 
    //          $_POST['searchType'] = 'Location: http://myurl.com/search?que' . rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm');
    //       break;
    // don't touch the default// anything that you want to search with google, just add above, don't add here

    
switch ($_POST['searchType'])
    {
        case 
'youtube' :
            
$_POST['searchType'] = 'Location: http://youtube.com/results?' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
            break;
        
        case 
'wiki' :
            
$_POST['searchType'] = 'Location:  http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
            break;
        
        case 
'citeseet' :
            
$_POST['searchType'] = 'Location:  http://citeseer.ist.psu.edu/cis?' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
            break;
        
        case 
'askcom' :
            
$_POST['searchType'] = 'Location:  http://uk.ask.com/web?q=' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
            break;
        
        case 
'googlescholar' 
            
$_POST['searchType'] = 'Location:  http://scholar.google.com/scholar?q=' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
            break;

// No need to touch the below part at all
        
default :
            
$_POST['searchType'] = 'Location: http://www.google.com/search?hl=en&q=' rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);
    
    }



header ($_POST['searchType']);
exit();
}
?>
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 24th, 2007, 12:14 PM   #25
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

Heyy, thankyooh for that =D


Here it is :

blizma.co.uk.

It does not search properly, it sort of gives the exact same search results every time.
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 24th, 2007, 12:22 PM   #26
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

I think it only searched the google dork, but does not put the searchterm infront :S
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 04:25 AM   #27
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

You need to make sure that the input names if your form match the index names in the $headerSettings array.

In your form for example you have name="wikipedia" but in the $headerSettings array you have $headerSettings['wiki']

Make sure they match or else you'll always end up of google

Cheers,
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 08:03 AM   #28
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

Hey =D


Oh everything is correct. Google opens with the searchType, but not with the searchTerm.

So it would say = inurl:blaaa
but not = searchTerm inurl:blaaa

Its all uploaded, you can check on the website.
I have tried playing around with trial and error, but can't get it to work =[
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 08:16 AM   #29
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

to get the order back the way you want it switch

rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm']);

to

rawurlencode($_POST['searchTerm'] . ' ' . $headerSettings[$_POST['searchType']]);

for all of the google searches.

For anything that doesn't have a big string like the google ones, just use

rawurlencode( $_POST['searchTerm']);
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 09:09 AM   #30
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

soo.....


Code:
 default :

                rawurlencode($_POST['searchTerm'] . 'Location: http://www.google.com/search?hl=en&q=' . $headerSettings[$_POST['searchType']]);




        }

                     


    header ($_POST['searchType']);

    exit();

    }

    ?>
.... =S i have no clue :'(
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 09:15 AM   #31
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

Ummm not quite, sorry.. I should have explained better

Here is what it should look like

Code:

<?php

$headerSettings 
= array();





//  for the sake of simplicity, keep all of the index values in lower case

// eg. $header['myname'] as opposed to $header['myName']







$headerSettings['mp3s']           = ' intitle:"index.of" "parent directory" "size" "last modified" "description" [snd] (mp4|mp3|avi|flac|aac|ape|ogg) -inurl:(jsp|php|html|aspx|htm|cf|shtml|lyrics-realm|mp3-collection) -site:.info';



$headerSettings['albums']         = ' site:zshare.net OR site:rapidshare.net OR site:rapidshare.com OR site:megaupload.com OR site:updownloadserver.de OR site:sharebigfile.com OR site:upload.sc OR site:bigfileupload.com OR site:upload2.net';



$headerSettings['torrents']       = ' site:thepiratebay.org OR site:mininova.org OR site:torrentspy.com OR site:isohunt.com';



$headerSettings['fmovie']         = ' site:stage6.divx.com OR site:veoh.com OR site:flixdump.com OR site:filmzzz.com OR site:freemoviescinema.com OR site:peekvid.com OR site:myeasytv.com OR site:tv-links.co.uk OR site:guba.com OR site:chooseandwatch.com OR site:videohybrid.com OR site:dailymotion.com OR site:jonhs.net OR site:movieflix.com';



$headerSettings['tvmovie']        = ' site:';



$headerSettings['free_uni']       = ' site:mit.ols.usu.edu OR site:cnx.ols.usu.edu OR site:ocw.mit.edu OR site:cnx.rice.edu OR site:sofia.fhda.edu OR site:ocw.jhsph.edu OR site:ocw.usu.edu OR site:www.twocw.net OR site:mit.ocw.universia.net OR site:ocw.osaka-u.ac.jp OR site:ocw.kyoto-u.ac.jp OR site:ocw.dmc.keio.ac.jp OR site:www.ocw.titech.ac.jp OR site:ocw.u-tokyo.ac.jp OR site:webcast.berkeley.edu OR site:en.wikibooks.org OR site:free.ed.gov OR site:firstgov.gov';



$headerSettings['pdf']            = ' filetype:pdf ';



$headerSettings['ringtones']      = ' intitle:"index.of" "parent directory" "size" "last modified" "description" [snd] (mid|midi|imelody|qcp|rtttl|rtx|sckl|ott) -inurl:asp -inurl:htm -inurl:html -inurl:cf -inurl:jsp';



$headerSettings['youtube']        = 'search_type=search_videos&search_sort=video_view_count&search_category=0&search=Search&so=3&start=0&search_query=';



$headerSettings['wiki']           = '';



$headerSettings['youtube']        = 'search_type=search_videos&search_sort=video_view_count&search_category=0&search=Search&so=3&start=0&search_query=';



$headerSettings['askcom']           = '';



$headerSettings['citeseet']       = 'submit=Search+Documents&cs=1&q=';



$headerSettings['googlescholar']           = '';



$headerSettings['somethingelse']           = ' site:answers.google.com';



// convert $_POST['searchType to lower case so we know we'll match regardless of what the user sends



$_POST['searchType'] = strtolower($_POST['searchType']);





    
// have a switch statement to keep it a bit easier

    // to add extras, place

    

    // case 'whatyouwanttomatch' : 

    //          $_POST['searchType'] = 'Location: http://myurl.com/search?que' . rawurlencode($headerSettings[$_POST['searchType']] . $_POST['searchTerm');

    //       break;

    // don't touch the default// anything that you want to search with google, just add above, don't add here



    
switch ($_POST['searchType'])

    {

        case 
'youtube' :

            
$_POST['searchType'] = 'Location: http://youtube.com/results?' rawurlencode$_POST['searchTerm']);

            break;

        

        case 
'wiki' :

            
$_POST['searchType'] = 'Location:  http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=' rawurlencode($_POST['searchTerm']);

            break;

        

        case 
'citeseet' :

            
$_POST['searchType'] = 'Location:  http://citeseer.ist.psu.edu/cis?' rawurlencode($_POST['searchTerm']);

            break;

        

        case 
'askcom' :

            
$_POST['searchType'] = 'Location:  http://uk.ask.com/web?q=' rawurlencode($_POST['searchTerm']);

            break;

        

        case 
'googlescholar' 

            
$_POST['searchType'] = 'Location:  http://scholar.google.com/scholar?q=' rawurlencode($_POST['searchTerm']);

            break;



// No need to touch the below part at all

        
default :

            
$_POST['searchType'] = 'Location: http://www.google.com/search?hl=en&q=' rawurlencode($_POST['searchTerm'] . ' ' $headerSettings[$_POST['searchType']]);

    

    }







header ($_POST['searchType']);

exit();



?>
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 11:44 AM   #32
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

OK.
I spent the last hours filling all of that in. all the radio buttons, and cases etc.

BUT *swears, punches stuff* it doesnt work i checked everything. it just comes with test.php blank page. Im guesing there is 1 tiny mistake someone like a dash to much, or missing a dash, for the entire page not to work =[.

Im going to find and download a php debugger see if that gets me further.
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 02:26 PM   #33
WebForumz Member
 

Join Date: Oct 2007
Location: room
Age: 19
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 jahphill is on a distinguished road
Re: Radio Button Response! :(

Hmm...

Everything works now!! YAYYYAYAYAYAYYAYYAYAYYAYAYAYAYAYAYAYYAYAYAYAYAYAY


=D man was that a long project =D for me anyway... probably a 1minute job for most people...

There is one final question/error..

when goin to
Code:
blizma.co.uk
on iexplorer there are black boxes around the radio buttons =[, on firefox it works fine... is this ment to be?

Also.. most of y scripts are on this forum now.... and can be found by google because the search term blizma is very uncommon, bringing all my posts up on the search.
any way to hide these posts from google?
jahphill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 25th, 2007, 06:15 PM   #34
Highly Reputable Member
SuperMember
 
Rakuli's Avatar
 

Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold Rakuli is a splendid one to behold
Re: Radio Button Response! :(

There is an option to hide your thread from google if you are a Webforumz Supermember.

Glad it's working
__________________
Luke Dingle . com
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Automatic Checkbox/Radio Button Checking Stuart JavaScript 8 November 8th, 2007 09:55 PM
[SOLVED] Selected radio button value Pugger JavaScript 8 November 3rd, 2007 09:16 AM
[SOLVED] large radio button form submit chriscant JavaScript 7 October 25th, 2007 05:03 AM
Any way to use an image for a radio button? masonbarge HTML, XHTML and CSS 23 January 6th, 2007 05:06 AM
Help Please - Radio Button Labels not showing sandyb Flash and ActionScript 0 January 16th, 2006 06:56 PM


Search Engine Optimization by vBSEO 3.2.0 RC8