I am creating a website that requires me to decode qr codes. I did my research and found out that php does not natively support decoding of qr codes. So, I decided to use the webservices that provide decoding of qr codes. I came across a good webservice, Zxing, which decodes the image submitted to it. The problem that I found was that I could not find enough documentation online with regards to the usage of the Zxing webservices, like how should the parameters be passed to the url of the webservice. The url that I am to access is, http://zxing.org/w/decode.jspx,
but then how should I consume this webservice using SOAP / XML-RPC in php.
I studied the result that is returned when I click on the "Submit" button, and its a simple text document.
Please, do give me guidance as to how should I consume the Zxing webservice, are there any online documentations?
Thanks.
It's not really documented as an API since it's not an API. You are not meant to integrate for use in your own service. It's a site I run as a free courtesy to end users on the web. It's OK to send a few requests at it, but for any significant volume, please run your own.
But the HTML is pretty much all the documentation you need: you can see what URL it posts to, and what parameters it sends. It's really just a POST of image content under parameter 'f', or a GET to the same URL with parameter 'u' specifying a URL to load.
The complete source code is at http://code.google.com/p/zxing, under zxingorg/. You probably want to run your own copy, so you can control it and modify it.
Related
after reading these in below, I still can't see the solution :
Extract data from website via PHP
php extract body tag content
after i using
file_get_contents("https://translate.google.com/#view=home&op=translate&sl=en&tl=fa&text=Help%20Me")
It seems it doesn't contain the words that I typed in box of translator(the words:Help Me)
How can i get all the data from start to end that contains the word that user(myself) typed?
Google Translate uses Javascript to read & display the translated text. It is not available in the source code. You can verify this by viewing the source of the URL you provided yourself (e.g. by copying view-source:https://translate.google.com/#view=home&op=translate&sl=en&tl=fa&text=Help%20Me into your address bar). It's also against their terms of service.
To access Google Translate programmatically you need to use the Cloud Translation API. This API provides $10/month of free usage, which is enough for most hobbyist projects.
Here is more information on pricing and quotas, and even a handy guide to using PHP with it.
I'm trying to get data from a website:
http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do?metodo=listarMesesChuvasMensais (translated via Google Translate)
In Delphi I know working with XML based Webservices (SOAP, WSDL), but this site does not provide such kind of services.
But I do not have knowledge in languages like PHP and HTML, not even web languages in general.
My question is, is there any way to get data from that site with the knowledge I do (not) have? Is there a tool to do this in Delphi? What are the common first steps to study the ability to do this?
Input January and 2014:
http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do?metodo=listarMesesChuvasMensais
Output:
a generic method url
http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do
First you need to use a HTTP client such as Internet Direct (Indy) or Synapse to get the web page as text.
Then you can either a HTML parser library or plain string routines to extract the table data.
How to perform HTTP requests is shown in many articles and Stackoverflow questions.
So, i would like to download youtube videos using a php script. I have googled a lot for now and there where more solutions but the one was using the http://youtube.com/get_video?data url but that is not possible now for a long time. I have found a greasemonkey script which works fine but i don't have a clue how could it work with php.
I have read that i must do something with the info which gives me for example this link:
http://www.youtube.com/get_video_info?video_id=g1SADcP5g1o
The question is what would be the best approach for this?
I would try to get some curl requests going on any of these resources and try to automate it that way.
I have it written in C++, not PHP. But it's not very simple yet not very complicated either. get_video_info output is URL encoded. Decode it and look for the stream_map set of streams. You'll notice a pattern in it. That's your starting point. Contains resolutions and download locations plus extras.
I wouldn't paste the PHP code here even if I had it :) They tend to change it...
I'm fairly new to PHP because i'm an Android programmer but i need to convert a pdf file to html. I don't want to use any external API's because they are way to pricey. Now I would like to use http://www.convertpdftohtml.com to convert my pdf to html. However that site does not have any API and only works manually. According to Tomer W. it is possible to simulate a POST action for the website and doing it automatically. https://stackoverflow.com/questions/9592926/online-pdf-to-html-conversion-api
Now i'm wondering how i would be able to do this. (I don't have a lot of knowledge about PHP) but i know people who might help me to get it working (if i have some kind of pseudo code)
This may soon be unnecessary. Mozilla have incorporated pdf.js into Firefox 19
I am trying to get an introduction to serving files to the iphone. I have watched tutorials on getting files from sites like Flickr and twitter. I need a tutorial to show me how to set up the site that is feeding that information. Most of those sites send you a json file. Can I just keep a dynamic file on a server using php?
PHP has some great json functions. See json_encode, which takes a PHP structure and converts it to a json string, and json_decode, which does the opposite. Make sure you set a Content-type: application/json header, echo the result of json_encode, and your iPhone app should be able to read it. Similarly, you can use json_decode to read JSON data that has been sent to your PHP script using GET or POST (preferably the latter).
All those sites use a web service to achieve the json response, depending on what you are using the ability to send back json responses might be built in to the services framework etc (.net for example), here is a question that talks about using .net to make a webservice iPhone interaction with ASP.NET WebService, im sure you can find many more out there
Found this tutorial once i got a better understanding of what i needed to do. http://davidwalsh.name/web-service-php-mysql-xml-json