Hi im doing a billing system for a page. i need to echo a image, ISO/IEC 18004:2000, (PDF?)
Wich is generated using this format:
?re=XAXX010101000&rr=XAXX010101000&tt=1234567890.123456&id=ad662d33-6934-459c-a128-
BDf0393f0f44
They have give me an URL:
www.url.com/webservice/webservice/server32_salesPartner.php?wsdl
Url.com is to hide the real wsdl any, way, i have read here:
http://www.tutorialspoint.com/wsdl/wsdl_example.htm
http://www.tutorialspoint.com/wsdl/wsdl_introduction.htm
And other stuff.. But I can't figure out how to "send" the info, i know info is not really sent, but here is where i get lost
Do i have to build a URL after server32_salesPartner.php??, how?
Like this:
www.url.com/webservice/webservice/server32_salesPartner.php?re=XAXX010101000&rr=XAXX010101000&tt=1234567890.123456&id=ad662d33-6934-459c-a128-
BDf0393f0f44
How do i get the image then? I'm lost here.
i ask here cause the web service provider is really bad, lazy and i have been waiting for an answer for 3 days, and need to move on faster on this.
Sorry im really newbie at wsdl.
You are trying to call a soap service with rest. That won't work. Check if there is any framework for php that read the wsdl and creates a client for you. The other way is to write this client by yourself and call the SOAP with appropriate SOAP protocol.
Related
I want to fetch the response from adobe analytics which I get in network panel of browser and display in it the page. This there any way to read the response through php. I don't have access to core files. i work as third party implementation team.
The short answer is you can't. php is server-side. Assuming you did the standard javascript Adobe Analytics implementation; well that's client-side. Your server can't see that stuff.
The longer answer is redeploying Adobe Analytics through a server-side implementation. Basically you setup the code but have it point to your server and then you forward it to adobe (proxying), and so now it is exposed to you server-side.
The alternative answer is depending on what it is you are actually trying to accomplish, you can make use of Adobe Analytics' s.registerPostTrackCallback function. Basically it lets you register a callback function to be called after every s.t or s.tl call, and it gives you the full/final request URL sent to the AA collection server. You can then make an AJAX request to pass it to your server and do whatever with it. Or since you mentioned displaying it on page, maybe consider using javascript to render it on the page? But if you're looking for actual response stuff (headers, content) well you're out of luck on this option.
The other other alternative answer is.. this almost sounds like you are looking to make some kind of browser plugin? If so, then on a plugin/extension level, the request/response stuff (including header stuff) is exposed on that level. But again, ultimately this is really a client-side solution..
But first step back and more clearly define what it is you are trying to do. Or if you've done that already, then try (more clearly) to convey that here.
I can't figure out what exactly to use for interaction between my site and the Telegram service (first of all - how to get the authentication process done using PHP and other stuff like chat among users).
On this page: https://core.telegram.org/api I haven't got an idea how to use those functions in PHP.
According to this page: https://telegram.org/apps
I have two choices:
1) The CLI-interface (unofficial, by the way): https://github.com/vysheng/tg
and it doesn't have an autentification function among others. In order to authenticate yourself, you need to run:
bin/telegram-cli -k tg-server.pub
and inside of the application you have to enter your cell phone and the secret code sent by SMS - after that you're authorized. Then you install https://github.com/zyberspace/php-telegram-cli-client and run telegram-cli as a daemon:
./bin/telegram-cli -dWS /tmp/tg.sck -k tg-server.pub &
Does it mean that I have to create tg-server.pub manually using PHP for each user which is trying to login?
2) Webogram: https://github.com/zhukov/webogram - but it's written on JavaScript and has very complicated code.
Dear Stackoverflow gurus, maybe you're more attentive than I am and could help me to recognize the right solution (or example, I don't know, the PHP snippet or anything else) for the user's chat based on the Telegram and PHP?
I would greatly appreciate it!
Thank you!
I have posted a step by step guide on getting your AuthKey (VB.net) here
The main challenge with Telegram API is the documentation... but if you can work through the first part - getting an AuthKey then i believe the rest should fall in place ... with some more effort.
Working through some GitHub src might be time consuming, it might be best to get a handle on the documentation and then work your way to building your own code for TelegramAPI from scratch
Most likely, PHP wrapper for Telegram API doesn't exist. I'd wager it's because communicating with Telegram servers from your server-side PHP code defeats both of the core features of Telegram: speed and security.
no speed - a message has to hop through one additional loop (your server) before it reaches the recipient.
no security - browser page will communicate with your server via AJAX or forms, I assume. This means sending data as plain text (unless you're on https), open to the whole world to see (if you were to sit on a public wifi, or something like that).
You can implement the Telegram API, it's a bit involved, but doable. But it's totally pointless, in my opinion.
As an alternative, just embed the webogram in an <iframe> or something :)
Now, you can use MadelineProto https://github.com/danog/MadelineProto - enought powerful PHP client for MTProto Telegram!
Sorry if this is too remedial or repetitive in any way but I need some advice. I'm a PHP guy and I've been asked to create a container-type app to capture our yahoo! store orders data, which is sent as xml using this DTD:
http://help.yahoo.com/l/us/yahoo/smallbusiness/store/order/retrieve/retrieve-20.html
The Y! Store wants us to specify a URL on our web server to send the XML data to, and here is their example:
http://lib.store.yahoo.net/lib/vw/OrderList.xml
But am I missing something here? I've worked with simplexml_load_file() to parse XML files. But what do I need to build a web service here? How do I GET the data? I'm not even sure if Y! is sending it as a POST or how to validate it.
Do I need additional documentation on their end? If anyone can point me in the right direction, I'd appreciate it.
Thanks in advance,
-Bob
I'm never one to answer my own questions but I just thought I'd leave this for someone else some day down the road, considering Y! isn't the best with documentation on this.
The orders export from Y! Store is straight XML, not SOAP. If sent to an Apache server, you're in luck -- it's a simple $_POST. So all you need is:
$variable = file_get_contents("php://input");
In my case, however, things were complicated with IIS so I had to add HTTP verb, open up the folder permissions, etc.
-Good coding, all
Being a PHP guy have nothing to do with understanding webserves. Webservices isn't really have a POST or GET, it sending an envelope (XML), and expecting a response, also in XML.
You need to learn how to use SoapClient on PHP, here is a good place to start:
http://php.net/manual/en/soapclient.soapclient.php
Validation is something you do before sending the soap request, and validation of what is being sent back from Y! is also done by you. Hope this help you get started.
I have some skills in PHP and now I'm planning to develop a connect function for remote login to my web side. I can't find any useful on Google.
Some idees on how to code a API connect button? Something similiar to Facebook connect, Twitter connect etc. BUT this should not rely on facebook api. I'm going to make my own stand alone api.
I know I need to use REST in backend, but I'm missing the knowledge to know how to send / recive the login data, and how to know when a user are online or not.
I also know that the user will need a key of some sort.
My plan was something so easy as this:
yourdomain.com/api?id=xx&key=xxx&what=
then what is should be the action with som parameters like:
if($what == login) {
handle the login part here
return the data
}
I can handle the php on the server side, but don't have a clue on how to handle the rest except the remote site must get the data in json or xml format and save in database.
Then when connect, it sends some data back to my site.
But HOW?? Here I'm stuck.
Also how to figure out when user are online on the other site or not, and how to get the image for a button. Like Facebook have a blue icon.
I guess it's a call back to my site for getting the image from there, right?
Greatfull for any answers on this one.
Its a pretty large topic you have there, you'll need to do some research as there are many many ways and technologies and security aspects related to this.
I'd suggest you go with a secure connection on a SOAP service based off Zend Soap Server and Zend Soap Client. But then again, if you don't want to use ZEND or SOAP, you'll have to look at other methods.
I wouldnt use REST because REST is used to manage data such as PUT/POST = UPDATE/INSERT, DELETE = DELETE, GET = SELECT so i don't really recon this would make sense.
My biggest point i have to make is, MAKE APIS, something simple, you don't want people to have to ask you for help or read documentation on how to access your authentication service. Go something simple, clean, portable and provide API to simplify your user's experience.
My 2 cents :P
I've decided that I'm going to write an API for my music site. Something that I really want is to implement REST when creating my API. If I wanted the functionality to say, play the next song via the API, how would I go about doing this?
As far as my constructed URL would go, would it be something like API/{ID}/NextSong, API/{ID}/?NextSong, or API/{ID}?NextSong. Or would it be something a bit different than that?
As far as the code side goes, I plan on have the web service running in PHP. I would need some sort of authentication step. What would be the best way to authenticate a user with the API? (I'd imagine that there is probably a really good online resource or something for this.)
Finally, the music player is in HTML5 and Javascript/jQuery. What's the best way to get the player to actually go to the next song using the web service? I have a nextSong() javascript function, but I'm not sure how to access it. The only thing I can think of is some sort of polling, be it AJAX long-polling, or just timed polling. Is there any other better, more efficient way of doing this?
Thanks for any help, all I really need is a push in the right direction, a lot of what I know so far is due to my experience with Microsoft's listdata.svc RESTful webservice in Sharepoint 2010. The rest of my knowledge is restricted to this article about REST APIs in PHP.
If you have an URL with "NextSong" in it that would mean you would have to have every users state saved on the server. If I would have a player and work with AJAX against a REST-API I would let the server just be "stupid servant" that does everything I tell it to do and let the logic be on the client side.
For example I would have a service for getting a playlist in JSON or XML format. Parse this on the client. When you listen to a song in that playlist you know where in the playlist you are and when the users or player asks for the next song the musicplayer will look in the playlist (saved in array of objects maybe a linked list where you have properties for previous song and next song?), call the service for start playing song id #####. For example API/{ID}/Play/{SongID} or API/{ID}/Song/{SongID}.
Regards
(EDIT Fixed Typo)