Search the Community

Showing results for tags 'api'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar




Website URL








Found 14 results

  1. I got the code below from W3Schools tutorial on Google maps. I also received an API code from google. When I try to put this on my site I get an error message in what looks like an iframe. I think I am suppose to do something additional with my api code. Google had me set a project name and then just generated a code. I don't know if I am suppose to do something besides generate that code in order for it to work for the specific map I want on my site. Can anyone tell me something obivous I am doing wrong or something that I still need to do on google? <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src=""></script> <iframe width="450" height="250" frameborder="0" style="border:0" src="" allowfullscreen> </iframe>
  2. Hi all, I would like to understand how JS/jQuery can interact with PHP to upload a status and a picture from the HTML5 canvas to Twitter. I set up a similar thing for FB and it works. I don't get how to do it for Twitter and I haven't found much about it. Could you explain to me how it works? I currently have this JS/jQuery code as a starting point: var formData = new FormData(), mimetype = canvas.toDataURL().substring(canvas.toDataURL().lastIndexOf(":") + 1, canvas.toDataURL().lastIndexOf(";")), blob = dataURItoBlob(canvas.toDataURL().split(',')[1], mimetype); formData.append('source', blob); $('#twitter').click( function() { $.ajax({ url: '', type: 'POST', data: formData, processData: false, contentType: false, cache: false, success: function() { $('#twitter').addClass('twitter-success'); setTimeout( function() { $('#twitter').removeClass('twitter-success'); }, 3000); } }); } ); Thank you!
  3. Hi, I am currently trying to implement the posting of a canvas image to a Twitter wall.Below, first you see the JS I came up with.What I can't figure out is how am I supposed to get the keys and tokens provided in the PHP function below that code. Such PHP function is contained in the uploadFile.php file.JS: var base64img = canvas.toDataURL().split(',')[1]; $.ajax({ url: "uploadFile.php", type: "POST", data: base64img, processData: false, contentType: "application/octet-stream", }).done(function(respond) { alert(respond); }); PHP: function _microsite_last_tweets($search) {define('CONSUMER_KEY', 'my key');define('CONSUMER_SECRET', 'my key');define('ACCESS_TOKEN', 'my key');define('ACCESS_TOKEN_SECRET', 'my key');$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);$content = $connection->get("account/verify_credentials");if ($search[0] == '@' && strpos($search,' ') == false) {$user = substr($search, 1);$tweets = $connection->get("statuses/user_timeline", array("screen_name" => $user, "count" => "4"));}else {$search = urlencode($search);$tweets = $connection->get("search/tweets", array("q" => $search . '+exclude:retweets', "result_type" => "recent","count" => "4"));}return $tweets;}
  4. First of all, sorry if this is an inappropriate place to post this thread but I don't really know a better place to post it. This isn't any full time job, more of a partnership. I'm sure for a skilled programmer this would be rather easy.. But I am not one, which is why I'm looking for help.I want someone who can program games, such as a coin flipping game, slot machine game and games like blackjack (although, I have a coin flipping and slot machine game coded, just not by me) and integrate them with the Steam/CS:GO API, allowing users to log in, send CS:GO skins/knives (which can be very valuable) to a bot and then play these games for the chance of winning a lot more skins/knives.If you aren't fully accustomed to the Steam/CS:GO API then there are official Steam API guides. I have a couple more things I would like added which I will discuss if you contact me.Email: csgoroulettebusiness@gmail.comPay: All profits 50/50, a payment at the end could be arranged but I am spending a lot of money on other things important for the website (advertising although it's rather low-key, domains since I'm thinking about switching to a different one, creating a stockpile of skins/knives so that I can actually have the games functioning and not have people spending skins on games with no chance of winning anything and there's more I need to pay for but I hope you understand I'm not just BSing or something). Some of the more popular websites out there already make a lot of money from doing this, so if we improve upon what they've done, add more features, games etc and add a better monetary system, then the pay should be quite a lot, that is if all games/elements are implemented.Why bother helping?: First of all, the domain is already paid for, but like I said, I might buy a new off someone who's selling it. Quite a lot of the website is finished but there's still quite a bit more to do. You get to sleep soundly tonight knowing that you've helped a fellow programmer create something he loves. And, well, all you have to do is do some programming and sit back and watch the money roll in. Might sound too good to be true and although there's quite a bit of programming involved, it really is as simple as that. The websites out there are either basic, scams or just very poor and I hope to change that. I have plenty of new and fresh ideas which would entice a lot of CS:GO gamers and possibly even streamers to my website. I also have a different way for the site to earn money which greatly benefits both the creators and the users.Thanks for reading,Joe
  5. Good day everyone, Do you have a Google Translate script, as much as possible a URL, that returns a JSON format? For example I pass this URL using an AJAX request:〈=english&to=afrikaans maybe it will return: {"translation":"groot"} Thanks in advance! - Regicide Del Feroz
  6. Hi guys I have been experimenting with Google Maps API and I have been able to create 2 different Maps that do what I want 1 map to do. I have a map with pins that I retrieved from a SQL database and another map that has weather layers using KML. Whenever I try to merge these two maps together both the weather layer and the pins fail to load. I think it has something to do with the function that initializes the maps. In lm.html I always used the initialize function to load the body but in the index.html the template uses a load body function. I think this is what causes the errors I am getting. The file index.html has my pins. You will need the config and xml files . It really just uses the tutorial file here This file lm.html is just a maps with my KML weather layers. How can I add weather layers to index.html? config.php index.html lm.html maps_xml.php
  7. I want to do a chess program that record the move and make sure no check was forgotten (it recently happened and we had to restart the game ). I think ECMAScript would be a good option. Each pieces would be assigned its color and type and when moved verify if an attack pattern arrived to the opposite color king. Instead of making function for all of this, I wonder if there would be some grid library or perhaps simply bitmaps that could do the trick.There would be a group A with 3 grids, past pieces positions for each color and new positions, right away the display would show the new positions; then there would group B with the grids for each move, like + for rook and × for bishop.Then the grid for the new move would be put on top of its opposing color past positions then going from its center would check if it reaches/touches something, either the border or a non-king piece and if so stop verifying further that path ; but if the king is reached, right away it the display would highlight the king and stop the verification process. Along with the missed check eye-candy/visuals, there would an alert asking to revert the previous move, and if yes the corresponding grids would be replaced then the highlight dropped.So... do I need to do all of this programmatically, or are there grid function with verification from its center? By programmatically I mean for knight go from new move position 2 positions up then right, is it outside the board limits then is it a king then 2 positions left, etc. By grid function I mean for the same move to be fed for knight possible attacks along with the new position of the knight along the grid of the opposite positions along with a filter options so it only consider kings (although there should only be 1), so it will start from the "x" and check for what's under all the "O"s ; implying its placed over the filtered kings from the opposite positions. Although for the sliding pieces after finding a king, the non-king would then be replaced to see if there was another piece (non-king) between it (king) and the center ("x"). One can also think of those punch-cards test verifiers or teachers use to assign score on an exam. Although in this case its more like students had to use a different color for a single answer and the verifier was--mainly--looking for that color ; I was going to put only instead of mainly but although only would be the case of pieces that doesn't slide from its center, like pawns & knights, for pieces that slide, like queens & rooks, the sliding would stop as soon as a non-king piece would be reached (and the board limit of course) ; so even if the different color (king) was in the punched-through overlay (piece attacks for the moved piece), if the regular color (non-king) was between it and the overlay center, the search wouldn't be successful, actually it could save processing by returning a fail right away (instead of continuing the search).I hope I'm being clear but please let me know which section need clarification (please be precise) and I'll be glad to oblige. Please consider the title. :)Thank you kindly for your help
  8. I was guided toward svg when I found out about vector resizable feature... now that I went through the svg guide on w3school(which was just a guise of it). I come to wonder if I can use that over canvas api?What do you guys think?Gaming propose, which one would be efficient in formatting games?
  9. Does Anybody knows how to do the following,API's and Indexes etc?CREATE TABLE ¿tUSER¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿id§number¿ varchar(20) NOT NULL, ¿first§names¿ varchar(100) NOT NULL, ¿last§name¿ varchar(100) NOT NULL PRIMARY KEY (¿id¿), <<INDEXES>>)CREATE TABLE ¿tPROFILE¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿tUSER§id¿ bigint(20) DEFAULT NULL, ¿tTYPES§id¿ bigint(20) DEFAULT NULL, ¿value¿ varchar(100) NOT NULL, PRIMARY KEY (¿id¿), <<INDEXES>>)CREATE TABLE ¿tTYPES¿ ( ¿id¿ bigint(20) NOT NULL AUTO§INCREMENT, ¿type¿ varchar(100) NOT NULL DEFAULT '', ¿description¿ varchar(255) NOT NULL, ¿deleted¿ tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (¿id¿), <<INDEXES>>) Apply indexes to the above tables, and design a SINGLE query to retrieve a full list of user information based on: 2.A) an ID number 2. a cellphone number (¿Cellphone¿ is a record in the ¿tTYPES¿ table)3. Write a re-usable script for importing information into the above 3 tables, from the example dsv file below: - NB - All data of the same type MUST be stored in the same format - NB2- You may assume that if a column doesn't seem to exist for a piece of data, that data type is listed in the tTYPES table<<BOF>>record§numberöid§numberöfirst nameölast nameömsisdnönetworköpointsöcard numberögender312ö9101011234011öTest JunioröSmithö071 123 4321öMTNö73ö1241551413214444öM313ö9012023213011öBoböSmithö27743334321öVodacomö3ö1231233232323244öM314ö8706055678011öFranköFrankinsonö2771 156 1567ö8taö0ö1231123453214444öM315ö9102078765011öMaryöVan Niekerkö+27(0)711236677öCellCö2ö1278933213214444öF316ö9005074545011öSusanöWilsonö0821121124öCellCö705ö1231233216544444öF317ö9101013232011öKatherineöJeevesö+271233214ö8taö112ö1231233678214444öF318ö9101011234011öMatthewöMatthiasö0711111111öMTNöö1231555213214444öM319ö9103126666011öMichaelöBayö085-6122-161ö8taö63ö1231244413214444öM320ö7506023232300öTyroneöOlivierö711234322öCellCö89ö1234563213214444öM321ö8901020304055öBurtöJacksonö071 4566544öVodacomö1ö4567233213214444öM<<EOF>>4. After the data has been imported, Write a basic API to wrap the Database. Include the following function points: - Add a new User - Update a User's details - Delete a User - Search users5. Describe what the following bash statement does: grep ¿date +%Y-%m-%d --date='1 day ago'¿ /path/to/file/FILE§PREFIX§Ö¿date +%Y%m%d --date='1 day ago'¿.dsv ö grep -v 'ERROR' ö cut -d "ö" -f 2 ö sed 's/Ü0/27/'------------------------------------------------PART II: Interesting Stuff------------------------------------------------1. If a resturaunt serves: - 3 types of starters - 5 types of main - N types of drinks - 3 types of desserts + How many different meals are available, if you can order 1 item of each type? + How many different meals are available, if you can order 1 item of each type, BUT you can order 2 drinks as long as you do not order the same drink twice? + How many different meals are available, if you can only order a dessert OR a starter?2. If you need to profile 1000 users, each with 3 different attributes, and each attribute has 4 possible values - before parsing any of the date: + What can we guarantee about the resultset?3. A wild director appears. He uses "I want to profile my user database using an additional attribute!" - Describe a ¿super-effective¿ method which we can implement, which will allow us to handle an indeterminate number of this type of request.4. If we have two seperate tables, the first detailing a list of registered club members, and the second detailing a list of competition entrants (assuming we have a key we can join on), what do/could the following resultsets represent: - The INTERSECT of the tables - The MINUS of the tables - The UNION of the tables
  10. I am using chrome. why the geolocation wont showing getLocation i checked on my advance setting there is no necessarily checkbox "Send a "Do Not Track" request with your browsing traffic" I am not sure what excalty the file will go through from the document.getElementById("demo"). I checked at it does not help me please help me to success what did i wrong anyone who have experienced this problem before thanks! btw, I am using IDE note++ here the code is <!DOCTYPE html> <html> <body> <p>Click below to get your coordinates:</p> <button onclick="showLocation()">Click</button> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML = "Geolocation is not supported by this browser.";} } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script> </body> </html>
  11. can anyone explain how to use fpdf to coonvert fetched html format into pdf
  12. Hello all, I have tried so many things to get this to work but to no avail, can someon eplease help me out here with a simple script for n XML steam feed. OK NOW THE ISSUE IS: I have a blank webpage which I have placed the above link into, I simply want the contents of the XML feed from the link to appear in my page....... How do I make the contents of that url appear on the same page?? SO I NEED THE SMALL SCRIPT OR HTML CODE TO DO THIS Also I would like to have the background a certain colour and use a certain font like 12point arial with bold headings and lower case text. Can someone please provide me with the html to allow this XML feed to appear on my webpage with a different colour background, arial 12pt font in bold and lowercase Could someone pleasde please help me.......... With regards Mathew
  13. Hey everyone! i am trying to enter data in additional attribute through API in magento shop.I have tried this code but it is not working the data is not entering.. 'additional_attributes' => array ( array( 'key' => 'user', 'value' => 'aneeb')) Please tell me what i am doing wrong or tell me how can i enter data in additional attributes through API in magento shop....
  14. I am using a web service called Geo I/O which lets me locate an IP address and get their Country, State, City and Latitudinal and Longitudinal status.The request that is sent is something like: TOKEN&qt=&d=comma&q=IP ADDRESS The above request sent gives a string like:Calcutta,West Bengal,India,Bcl East,22.5697,88.3697,IN Now I want the above string arranged something like this in the webpage:City: CalcuttaState: West BengalCountry: IndiaLatitude: 22.5697Longitude: 88.3697 Please help me out.