As i have small requirement regarding tracking information from different parts of a flash file using php mysql. Means in a flash game i will be having preloader part, more games button and logo inside the game. As i want to track that how many clicks are getting from these places using php mysql. Can anyone give me any ideas.
Use the URLRequest/URLLoader classes of ActionScript to send a request to your website. Parse the request with PHP, extract the GET or POST variables and insert them into your database.
Related
I have a landing page which embedded in many websites. It's role is to collect users data. I want to track these data to know from where each user come?
how can I do this tracking using PHP ?
There are Multiple ways to Check From which source user has submitted data. This is basically used in Analytics Platforms to gather statstics. Below are few of them
1) Put Google Analytics Code in the Landing page which is further embeded in to other sites. Later on Google Analytics Report you will be trace it. Also you will get other usefull reports too.
2) customised way - Fully under your control
A) Distribute your landing page in a way so every other site which embed your page get Unique Code and When submit the data you will get back that source along with other data this way you will be able to build your own tool
B) using $_SERVER['HTTP_REFERER'] to trace the routed page from anywhere along with appropriate query string
Other ways include throguh Javascript you can pass XHR request on load of your iframe but that will be complicated way if you can handle it properly than only go for it.
I'm building a web application using PHP & MySQL. A user profile displays MySQL data using a select query like so:
SELECT a.name_first,a.name_last,b.bio_category,b.bio_short,b.bio_full,b.profile_img
FROM stars_login a, stars_data_bio b
WHERE a.id_s=b.id_s
AND a.id_s='$select_id'
The $select_id variable is defined using ?id= in the URL like so:
http://localhost/public_html/profile/profile.php?id=1
I'm also looking at turning the web application into a phone app. I don't have much experience creating native apps as I'm more of a web designer.
I have however used Adobe PhoneGap before (cheating kinda, I know).
My question: is there a way to display a user profile in an Adobe PhoneGap app using a similar method to my exploded URLs in PHP?
Eg: there will be a search bar on my PhoneGap App home screen, where a user can search for a username. When they hit the search button they will be redirected to the profile view (similar to the profile.php page on my website). The PhoneGap profile page will then show the SQL data for the corresponding user.
I'm not sure if this is possible, but if it is, could you let me know how to go about it?
Also - how would I display the data that is stored server side on my local app?
I'm fairly new to all of this - I'm 18 and self teaching for a personal project of mine. All help is appreciated!
You can do this in your Hybrid app:
Create an HTML form which will serve as the front end to user
Use AJAX to send input from the user to your server
Process whatever pass parameter/s in that ajax request (such as the query you mentioned).
Return the result as json/jsonp then display the result back to the front end (no.1)
I want to fetch data from live stock market to my web site. By using php and jQuery.
Has the source got an API you can work with to fetch the data? If so read their docs and implement it.
If not you could possibly do a Curl request and parse the data you need if your allowed.
More importantly you need to be more specific with your question if you want to get good answers, if any at all :-).
You need to find a web service that offers a stock market feed in the form of JSON or XML, so that your computer would be able to parse it. Not a website. Most of those feeds are paid - especially those that are close to real-time.
Then, once you have such a feed, you should be able to access it via your browser - just by typing in the URL. For example, http://www.quotewebsite.com/symbol=MSFT
This will help you understand what your server side script is supposed to do. Then, in your PHP script (PHP is a server-side programming language), issue a CURL request to download that specific page into your website's database (ex. MySQL). This will allow you to have historical data inside your own system. Then you get to render that data back to your own customers by querying your own database.
I'm creating a social networking site for books (like Goodreads) and I'd like to include a feature whereby a user can scan the barcode of a book using the webcam and get information about that book.
The functionality for finding the information is already complete. I just need to know how to make the webcam read the ISBN and output it as a string, which I can then feed into my script which fetches the information. At the moment this is just done by filling in a form with the IBSN.
My website is built using PHP.
I can't seem to find a working solution online.
Any ideas of how I could go about implementing this?
Idea would be to use Flash barcode scanner. I've seen flash software that recognizes gestures and so on, so barcode shouldn't be that hard.
Here you can see it implemented: http://gurulib.wordpress.com/2007/12/28/a-flash-based-webcam-barcode-reader/
I am making an offline website that needs to sync every night with a server. Our employees work outside and sometimes underground and need to access the site for its database. But once home they must send us their findings.
The first time they connect, I check with google gears if they have the sqlite database and if not I run a script to insert it. Once they have it, I sync their next appointments to their local database.
When they are done, the next day, they connect to send us every thing and to download their new appointments.
For now i was able to create the sqllite database and insert new values inside thanks to google gears. But i haven t found a way to read the database with php to sync it with our online database.
To go from online to off, with PHP I can write an array in a hidden field and then read that field with JavaScript. But in the other way i was wondering if there was on other way then creating a form with DOM and submitting it in JavaScript to read the values with PHP?
I need to sync a Lot of values, do you know if there is an easier way?
Thanks for your help
I have found vortex, a powerfull script for gear that helps sync everything from files to data. It will definitely help me.
Here is the link to the developer's blog. The download link is in there.
I will come back when the website works to help the interested.
You should use Ajax for posting your new data to the PHP server.
You could use jquery (or any other framework), their lootle of resources how to post data to php on the web.
Your webpage could have a button hidden when offline, this button would enable user to start a synchronization.
Here a tutorial from PHP and jquery!