Search box to search another site - javascript

I've been tasked to replicate the search on http://www.hefce.ac.uk/postcode/
in one of our sites and wondered if it's possible to do this by having a search box in our site and every time a user clicks it will pull the results from the HEFCE site and display on ours, or to simply redirect to the HEFCE site with results?
Many thanks!

Well, the easiest thing you can do is just use Google CSE and embed it in your site. It's an easy tool where you can just insert the path of the HEFCE site, and it creates the search engine you need.

Related

Using twitter area search on a website with javascript

I am struggling to find adequate documentation on using the twitter API to create a twitter side-bar on a website. I want the user to enter their suburb and the twitter feed should show tweets about the area.
Im not sure whether the embedded twitter widget can be used dynamically or whether the API is the correct way to address this
Any help or advice in the right direction would be appreciated.
The embedded twitter widget can not be modified as far as I could tell, so the API is the way to go. This would be a good page to visit as it gives you an overview of how to search and gives examples of searching based on location. You also need to find a way to authenticate but that is fairly straight forward (look here).

Social media functionality on website

Im totally new to integrating social media with a website so this is a bit of a scattershot question. There is no doubt questions on here answering this already but as im not sure what im looking for yet, im not sure how to find them.
Okay so my company wants to promote their twitter and facebook profiles as customer service avenues, so users will ask questions on there rather than calling or emailing.
Ive built quite a funky page promoting this, however the links are literally just links to the facebook and twitter pages.
Is there a method to load a window to twitter or facebook from a website link that will prompt a user to type and submit a question to be submitted the the FB/twitter feed? Or is there a way to take content from a text box on site and pass this through to FB/Twitter?
Basically just looking for something slightly cooler and more user friendly than just dumping them on the companies FB or twitter page on click.
Cheers,
Found the solution I was looking for that works for twitter, its simply passing values through a URL, details are here https://about.twitter.com/resources/buttons#mention.
For facebook, seem to be able to do this through the comments module. Seems like a lot of this can be edited through the API so a combination of both should give me what i need:
https://developers.facebook.com/docs/plugins/comments/
use this website as an idea on pushing content into tweets
http://www.sharelinkgenerator.com/
example for twitter: the href on your link would be:
https://twitter.com/home?status=your%20content%20here
if you wanted dynamic content, you would build the url using script.
same rules apply for facebook.
if you wanted to keep it within your website, maybe look into a fixed position div containing an iframe.

show contents of link

I've been searching the internet to get some information about how i can be able to detect and show what a url is about.
Facebook has a good example of what i actually want to achieve:
If you create a update on facebook and paste in a URL, facebook will detect some information about it and show a box with some text and often the right picture.
for instance, take: http://www.ebay.com/itm/Mens-Monk-Strap-Loafers-Suede-Lined-Metal-Buckle-Slip-Casual-Dress-Shoes-New-/311170422772 . then it shows the image of the shoe and headline.
Ive found other services which does this with image services and youtube, but what i need is about getting information of products most of the time, so often urls from shops. So the user pastes in a url, and i can detect what that link is about.
any ideer how this can be done ?
Is it backend code, like c# or javascript ?
Hopefully some of you can point me in the right direction. Thanks in advance!
Facebook scrapes pages for specific metadata in the back-end and uses it to generate the snippets you see, which can either be served along with the initial page load or brought in via JavaScript (front-end). From there it's a matter of using CSS and JS to style the popup to your liking.
Depending on how inter-related your site is with the content you want to display, this can be an easy task or a difficult one.

Loading and running an external webpage

I have been asking this question in different places but couldn't get a real answer.
Here is the problem:
Let say I have a web page which is going to serve like google. I mean it will use google at the bacground but foreground will be my page. It will contain a textbox and a button. So a user will come and enter a text that he wants to search and click the button to submit the query. So my webpage will transfer this search text to the google at the background and search the thing in google. It will return the results to my webpage in a different form. `
So the question is, what is the best way of implementing this and more importantly is it possible.
Many thanks.
You will have to use Google Custom Search API: https://developers.google.com/custom-search/v1/overview
You cannot use classic web crawler techniques to get the data from Google since that violates their TOS.

How do I put adsense ads on my search results page?

I want to show adsense ads on my search results page.
With Google Custom Search this is easy.
However, I have my own search engine for my site, and I want to show adsense ads on the results page. It doesn't look like this is directly possible.
My thought is to show my own search results, and at the same time call Google's search with the same query in an iframe so I can get the ads and put them in my page. Either in their own iframe, or with JavaScript.
Has anyone done something like this? Do you see any problem with it?
What you want is the Google AdSense API. The only caveat is that you're required to have a minimum of 100,000 daily pageviews. My company uses this API and it's quite easy to do what you're talking about.
If your site has less than the minimum number of pageviews, well, it seems that you're stuck with the options available from standard AdSense.
I think that is what you are looking for "AdSense for Search Ads Only"
http://code.google.com/apis/afs-ads-only/

Categories

Resources