Hi friends I have a rdl file and they have given me the service url & username and password details.
In my php webpage i must place a run link for this rdl file.When the user clicks the rdl file the reports must be shown in my php webpage.
I have a googled and found this link http://ssrsphp.codeplex.com/ useful but could not able to figure out where to start.They have given a lot of procedures for this.I do notwant all those things.
I just want to run the rdl file and show its results
How can i achieve this?
It sounds like you are making this more complicated than it needs to be. You can access Reporting services with the URL and have a web page or stream for some other file type returned to your php page, which you can send on to the user.
The .rdl file needs to be uploaded to the SSRS service one time, before you can request that it is rendered. Use the service url you were provided with, and make sure that you see the report there. Then test that you can run the report and see results. Now you can make calls to the service and get those results which can be used as needed.
(Note that the default url for SSRS management is usually similar to https://servername/reports/ but the service is accessed at https://servername/reportserver/
Take a look at "URL Access" for a simple way of consuming SSRS:
http://technet.microsoft.com/en-us/library/ms153586.aspx
Look into the URL Access for displaying SSRS Reports directly from the SSRS Server.
For example:
http://serverName.local/ReportServer?/example/testReport&rs:Command=Render&rs:Format=HTML4.0&rc:Toolbar=False
Will display your specified report in a browser. You can easily hook this into another website.
Related
I just need to show my own music on my website. So mine is not an "app" which other users will use. I simply want a PHP script that queries Spotify from time to time, perhaps once every day, and finds if there's a new song added to my playlist. If so, it adds that to my website and shows it on my site.
For this I'd like a very simple script that allows me to authenticate myself in a server side code (which will be executed via cron) and bring back all the tracks in a specific playlist. I'd prefer not to use any library etc, just plain PHP code.
But I'm not sure which 'Authorization API' here I should use. Curl is just for testing, yes? Not for actual code especially with GET as that would be insecure? Would appreciate any pointer to any code sample for this. Thank you.
By using Moodle Web Service (REST) call core_user_get_users_by_field I successfully get my user details. One of the returned fields is profileimageurl that links to my user profile picture and look like this:
http://my_moodle_server/pluginfile.php/89/user/icon/f1
Unfortunately that link works only in a browser where I have already logged in, otherwise it will redirect to a standard user icon (the grey anonymous face).
So in order to get the actual picture form a client app that is using moodle web services I think I have to call core_files_get_files and pass correct values. So I tried to remap that link to calls paramenters like this:
contextid: 89
component: "user"
filearea: "icon"
itemid: 0
filepath: "/"
filename: "f1.png" (also tryed without .png)
and of course my valid token
but all I get is:
{"parents":[],"files":[]}
Parameters seem to be formally correct (otherwise I would get an exception) however I only get empty response which tells me that some values are not correct.
Ok I found the solution to my problem. I'm posting the answer here also because there's not much information about Moodle web service around...
First of all, core_files_get_files is not the way... it will only show files information, it won't give you the actual file contents (binary).
Fortunately, there's an equivalent URL to be used when calling from external client app:
http://my_moodle_server/webservice/pluginfile.php
It accepts the same parameters/format as http://my_moodle_server/pluginfile.php and in addition you can also pass your token for web service authentication.
So profileimageurl field returned by core_user_get_users_by_field which looks like this:
http://my_moodle_server/pluginfile.php/89/user/icon/f1
can be turned into
http://my_moodle_server/webservice/pluginfile.php/89/user/icon/f1?token=my_web_service_token
Also note that appending ?token= parameter is required
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.
Not sure if this is even possible but since Verizon does not have an API set for this I thought I would look for an alternative.
As a verizon customer I can login to myverizon.com and from there they have a link to download an .XLS sheet with all of my recent history.
I would like to automate this process somehow but not sure if there is a way to create a session on another site with a valid username/password and then process to pull the file once credentials have been verified?
Right now I have to manually downlaod the XLS sheet and import into an application.
Thanks,
You need to use the CURL Library for this in PHP. It will allow you to post login credentials and save the cookie.
Login CURL Example
The above link demonstrates a login to Ebay using CURL
Well, there should be a way.
I cannot give you an instruction since I am not a Verizon customer. But you could start by trying to automate the XLS retrieval with Selenium.
Then, if you want to do it via PHP/cURL (as is suggested by your tags), you could translate the Selenium file to corresponding cURL requests.
Update: Also, please make sure that this is okay according to the terms and conditions of your contract with Verizon.
I wanted to find out how to login to another site via PHP... I don't know the proper term for it, but basically, I want a user to be able to enter their login information for another website on mine, and interact with it through mine.Is there any tutorial?
thanks
There are few ways to do the job (actually, you just need to send POST data to the other site).
You can use :
curl (example: http://davidwalsh.name/execute-http-post-php-curl),
stream context (example: http://php.net/manual/en/function.stream-context-create.php),
or directly with sockets (example: http://www.jonasjohn.de/snippets/php/post-request.htm).
curl will do that PHP, cURL post to login to WordPress
but you will need that installed on the server which is sometimes not an option. There is however loads of scripts that can do the same thing as curl without the curl libs installed, eg: cakephp's HttpSocket class
as already stated, Curl will do that.
But you can also check out this PHP Class that makes everything easier and gives you a lot of automation out of the Box
Including Prefilling of CSRF Token, finding of all input fields, retrieving of details from the designated site. etc
the class can be found Here. Crawl Engine