when we enter a keyword (search term) in amazon kindle book store, search brings a list of books back.
I am trying to scrap the above said amazon kindle book search, i have some basic/usage idea of CURL in php, but i have never posted variables using curl. I tried at my level. but havent succeeded yet. the only thing i know is i should post "key-word" variable to amazon and should grab the result.
The problem with this step is that the key-word is submited to the form and only a part of the page is refreshed everytime key-word is entered.
can somebody help me telling the step required?
which data i will need to post icluding key-word? how can i know about
the header /user agent required for this? what information will be required for this process? which elements will be posted ?
I have tried using fiddler but as i am new to it, i am not getting the concepts.
The link i want to parse is amazon.com
Guideline please, if i get the what needs to be posted, i think i will be able to do the curl process.
Related
This problem is really bugging me, i'm a hobby programmer who right now is trying to follow the simple instructions of Hubspots CRM API documentation.
I've managed to retrieve and POST information from and to Hubspot using cURL/PHP, but now i'm facing an update(PUT) and i can figure it out.
I'm trying to associate a "Deal" with a "Contact" inside the CRM, it seems to be so easy, just fire away a url? :)
The documentation on the API says:
Note: You only need to use this endpoint when updating existing deal records. If you are creating new deals, you can make these associations when creating the record by including the associations data as documented on the create deal page."
src: https://developers.hubspot.com/docs/methods/deals/associate_deal
Do i understand correctly, i tried to use this URL in my browser and expected an update to happen?
https://api.hubapi.com/deals/v1/deal/DEALID/associations/CONTACT?id=CONTACTID&hapikey=MyKey
The response i got in the browsers console was: 405 (Method not allowed).
I tried to fire the url though cURL aswell, but got lost right away because i dont really have any data to send in "CURLOPT" parameters, the data should, if i understand correctly be inside the endpoint url.
If you have any idea of what this hobby programmer doesnt understand, please reply :)
Kind regards,
Simon
There are lot of same queries on Stackoverflow but seems no one covered this. So please go through this question.
I was wondering to post on Instagram from webpage via official API but I got to know that there is no provision to do that. Further researching on this function I got a python script with which I was able to post images. Then also I got PHP script to do the same. But with both I need to attach my actual Instagram credentials (which seems okay because official API don't allow to post so that we can get token) and script isn't verifying the credentials.It will only let you know about wrong credentials when you try to post.
On other hand I found few websites :
http://autogrammer.com
http://onlypult.com
http://buffergram.com/
which are allowing the same feature. They also need actual username and password but they are verifying them and let you know instantly if it's wrong.
I am trying to figure out that how they are doing it with (and which) third party script. If anyone know please share your experience.
UPDATE
Moreover I read few user's comments for python script that Instagram push user to change password because they think user's account is compromised.
My client has a Facebook page which has his latest posts and shows the reviews people have added.
I want to grab these from Facebook, and output them on his website all styled up nicely with my own markup and styles.
I have had this running in JavaScript with the access token pasted in the JS which is obviously not the way to go, and the token will expire. Now im trying to do the same with PHP. I've read & watched more clips than I care to mention, and I cant get my head around one particular part. Every demonstration i've read or watched requires the website user to login to facebook before this data is returned.
I cant expect ever user who goes on the site to do that. Am I missing something? I just want get the data and display it. No Adding, No Deleting, No Updating. Just display the same information on his website.
Sorry if am asking something stupid here, i'm a novice and for all my efforts I am struggling to understand. I kind of need it in laymans terms so to speak.
Thanks in advance.
I am using https://pubsubhubbub.appspot.com/ to subscribe to feeds through well know PubSubHubHub protocol implementation.
I have subscribed to required topic from the following page:
https ://pubsubhubbub.appspot.com/subscribe
I received subscription verification, and I succesfully responded with hub.challenge received in $_GET parameters. I have seen my logs of web server, it shows that POST request of notifications sent fron hub:
http://i.stack.imgur.com/LH44O.png
I have my code setup, which stores any key=>value pairs from $_POST and $_GET in my DB. It has been tested, and works perfectly well.
Q: Is there anyway to know, how the hub is sending the notification feed? (it's not in GET or POST for sure) and how I can parse it in PHP?
I have studied working draft of the protocol as well, unable to figure out something that might work.
https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.4.html#contentdistribution
Have searched through code samples as well, too much complex code and it does not make any sense to me, how I can translate it to simple PHP parse code. (I think links will help you)
https://code.google.com/p/pubsubhubbub/wiki/SubscriberClients
https://code.google.com/p/pubsubhubbub/source/browse/
I luckily had time to do some more research on this problem and also found some relevant results that helped. Just want to share the results here, so that anyone following in future can find resolution to this issue.
The PubSubHubHub.AppSpot hub sends feed update notification instantly via POST along with part of updated feed as part of body text. So, it gets simple to get the updated feed and parse in any language. Just extract page body and parse RSS-xml present as body text.
I wrote following script in PHP to get the updated feed text:
$request_body = #file_get_contents('php://input');
The $request_body contains RSS-xml for updated feed. Process it, and store any information you want out of RSS-xml feed.
Thanks.
Reference link: (that suggested me simple solution)
Pubsubhubbub subscriber callback implementation in PHP
I would like to post my script here, if I get the okay I will post it, or is there another place that I should post my script and link to it?
Please Advise
One typically does not post code to StackOverflow unless one has a specific question about it. You can, however, host your project in a Google Code repository and use the "request a code review" feature.