Google Kix editor - how to send data using POST? - php

Can I include this text editor for Google Docs to my project?
https://github.com/benjamn/kix-standalone
or this is illegal?
I suspect that this person just steal the code. If this legal how can I send the data using POST to PHP? The HTML code does not have a textarea to send it, and I couldn't find a way to send the data.

I think it's illegal because this code is not provided by Google. One reason is that it is heavily based on server-side components see this
https://groups.google.com/forum/?fromgroups=#!topic/closure-library-discuss/SeZdenR-2vA
and the link you provided contains the obfuscated code and you will have no support if you use it.
hope this help

Related

Getting Google Translate's html codes in php

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.

How can I use PHP to return database data to an existing HTML page?

I am new to PHP. I know a little JavaScript, HTML, MySQL and lots of non-web computer programming.
I know how to create an HTML page with a form, use a button to call an external PHP file (with $_POST) which sends an email and records that forms data (names and email addresses) into a MySQL database.
Now, I'd like to create a new HTML page that calls an external PHP file (so the code is hidden) that will return the MySQL data (names and email addresses) for display on that existing HTML page (with all its CSS formatting and menus). In otherwise, I'd like to modify an existing HTML page with data (but hide the PHP code in an external file).
If this can be done (I'm new to this), can some please help by giving me at least the general idea so that I can build upon it. The textbooks that I've flipped through simply explain how to "echo" data back to the screen (a blank screen) with a .php extension in the address bar.
Thank you very much for your time and any help. I appreciate it!
Since you already have the html to echo part, you'll just need to plug it into the database.
Using a good ORM can help with this. For PHP, I recommend starting with Propel:
http://propelorm.org/
Once you get a bit more comfortable with that, you might want to try using a PHP framework, like Symfony, to help you structure the project in a more uniform way. However, there are many other PHP frameworks out there, so try to evaluate the top ones before settling on a favorite.
Furthermore, the examples provided in PHP framework documentations will guide you through many of the common solutions (as a framework is just a toolkit built by people who have had to solve such problems over and over).
For example, here is the cookbook for symfony that outlines many solutions to common issues.

Simple PHP web crawler to submit form and store the returned results

For a system I am developing I need to programmatically go to a specific page. Fill out one field in the form (I know the id and name of the input element), submit it and store the results.
I have seen a few different Perl, python and java classes that do this. However I would like to do this using PHP and havent found anything as of yet.
I do have the permission to do this from the site i am getting the information from as well.
Any help is appreciated
Take a look at David Walsh's simple explanation.
http://davidwalsh.name/curl-post
You can easily store the response (in this example, $result) in your database or logfile.
Usually PHP crawlers/scrapers use CURL - http://php.net/manual/en/book.curl.php.
It allows you to make a query from the server where PHP runs and get response from the website that you need to crawl. It returns response data in plain format and parsing it is up to you. You can manually check what does the form submit when you do it manually, and do the same thing via curl.
You also may try phpcrawl (http://phpcrawl.cuab.de), seems to fit all your needs.
(See "addPostData()"-method)

PDF-To-HTML Post Action

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

Using Zxing online qr code decoder using php

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.

Categories