Jump to content

Search the Community

Showing results for tags 'api'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

  1. Dear pals, I really love your REST based library , from URL :https://github.com/deepeshmalviya/simple-rest simple and understandable . But I need an authentication mechanism in it. I plan to use api for User based access . I need to take data we must use GET method . Passing username/password as GET (or even as POST) is not safe . Do you can suggest a good solution for this library . I am waiting for your fast reply. Thanks, Anes
  2. Hi All, Please anyone help me to write api for a portal sites. I am new to api services. Please anyone tell me how to use REST. Also i would like to know what is the difference between rest and soap. Why should not use soap ?. Please show me some examples to write api for a site. is it safe to write api in rest ?
  3. I am working on Instagram module Now I want like counts of the photos. For example I have account in Instagram and I want to know how many I likes the photos with my account. Is there any Instagram API thats help me regarding my quertion. Any ideas or suggestions? Thanks.
  4. Hi, I am working in PHP from few years.Currently working Web Services from mobile development. I have some complex situation.I describe in steps. 1. Mobile device call a Web Service Method with few parameters. 2. It will hold (stop execution) for given params seconds (e.g 30 Seconds). 3. In this given time if any other request arive from same device ,this "step 1 " process should not execute ahead. Can any expert guide me this process. I am not sure that how it will work ? Regards, Uresh Patel
  5. Hi, I receive this information from mandril webhook: POST /n1rhtpn1 HTTP/1.1 X-Mandrill-Signature: nV34UwrCtKCj5/Vue396jBhWx+8= User-Agent: Mandrill-Webhook/1.0 Host: requestb.in Content-Type: application/x-www-form-urlencoded Content-Length: 4043 Connection: close Accept: */* mandrill_events=%5B%7B%22event%22%3A%22click%22%2C%22msg%22%3A%7B%22ts%22%3A1365109999%2C%22subject%22%3A%22This+an+example+webhook+message%22%2C%22email%22%3A%22example.webhook%40mandrillapp.com%22%2C%22sender%22%3A%22example.sender%40mandrillapp.com%22%2C%22tags%22%3A%5B%22webhook-example%22%5D%2C%22opens%22%3A%5B%7B%22ts%22%3A1365111111%7D%5D%2C%22clicks%22%3A%5B%7B%22ts%22%3A1365111111%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fmandrill.com%22%7D%5D%2C%22state%22%3A%22sent%22%2C%22metadata%22%3A%7B%22user_id%22%3A111%7D%2C%22_id%22%3A%22exampleaaaaaaaaaaaaaaaaaaaaaaaaa%22%2C%22_version%22%3A%22exampleaaaaaaaaaaaaaaa%22%7D%2C%22ip%22%3A%22127.0.0.1%22%2C%22location%22%3A%7B%22country_short%22%3A%22US%22%2C%22country%22%3A%22United+States%22%2C%22region%22%3A%22Oklahoma%22%2C%22city%22%3A%22Oklahoma+City%22%2C%22latitude%22%3A35.4675598145%2C%22longitude%22%3A-97.5164337158%2C%22postal_code%22%3A%2273101%22%2C%22timezone%22%3A%22-05%3A00%22%7D%2C%22user_agent%22%3A%22Mozilla%5C%2F5.0+%28Macintosh%3B+U%3B+Intel+Mac+OS+X+10.6%3B+en-US%3B+rv%3A1.9.1.8%29+Gecko%5C%2F20100317+Postbox%5C%2F1.1.3%22%2C%22user_agent_parsed%22%3A%7B%22type%22%3A%22Email+Client%22%2C%22ua_family%22%3A%22Postbox%22%2C%22ua_name%22%3A%22Postbox+1.1.3%22%2C%22ua_version%22%3A%221.1.3%22%2C%22ua_url%22%3A%22http%3A%5C%2F%5C%2Fwww.postbox-inc.com%5C%2F%22%2C%22ua_company%22%3A%22Postbox%2C+Inc.%22%2C%22ua_company_url%22%3A%22http%3A%5C%2F%5C%2Fwww.postbox-inc.com%5C%2F%22%2C%22ua_icon%22%3A%22http%3A%5C%2F%5C%2Fcdn.mandrill.com%5C%2Fimg%5C%2Femail-client-icons%5C%2Fpostbox.png%22%2C%22os_family%22%3A%22OS+X%22%2C%22os_name%22%3A%22OS+X+10.6+Snow+Leopard%22%2C%22os_url%22%3A%22http%3A%5C%2F%5C%2Fwww.apple.com%5C%2Fosx%5C%2F%22%2C%22os_company%22%3A%22Apple+Computer%2C+Inc.%22%2C%22os_company_url%22%3A%22http%3A%5C%2F%5C%2Fwww.apple.com%5C%2F%22%2C%22os_icon%22%3A%22http%3A%5C%2F%5C%2Fcdn.mandrill.com%5C%2Fimg%5C%2Femail-client-icons%5C%2Fmacosx.png%22%2C%22mobile%22%3Afalse%7D%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fmandrill.com%22%7D%2C%7B%22event%22%3A%22click%22%2C%22msg%22%3A%7B%22ts%22%3A1365109999%2C%22subject%22%3A%22This+an+example+webhook+message%22%2C%22email%22%3A%22example.webhook%40mandrillapp.com%22%2C%22sender%22%3A%22example.sender%40mandrillapp.com%22%2C%22tags%22%3A%5B%22webhook-example%22%5D%2C%22opens%22%3A%5B%7B%22ts%22%3A1365111111%7D%5D%2C%22clicks%22%3A%5B%7B%22ts%22%3A1365111111%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fmandrill.com%22%7D%5D%2C%22state%22%3A%22sent%22%2C%22metadata%22%3A%7B%22user_id%22%3A111%7D%2C%22_id%22%3A%22exampleaaaaaaaaaaaaaaaaaaaaaaaaa%22%2C%22_version%22%3A%22exampleaaaaaaaaaaaaaaa%22%7D%2C%22ip%22%3A%22127.0.0.1%22%2C%22location%22%3A%7B%22country_short%22%3A%22US%22%2C%22country%22%3A%22United+States%22%2C%22region%22%3A%22Oklahoma%22%2C%22city%22%3A%22Oklahoma+City%22%2C%22latitude%22%3A35.4675598145%2C%22longitude%22%3A-97.5164337158%2C%22postal_code%22%3A%2273101%22%2C%22timezone%22%3A%22-05%3A00%22%7D%2C%22user_agent%22%3A%22Mozilla%5C%2F5.0+%28Macintosh%3B+U%3B+Intel+Mac+OS+X+10.6%3B+en-US%3B+rv%3A1.9.1.8%29+Gecko%5C%2F20100317+Postbox%5C%2F1.1.3%22%2C%22user_agent_parsed%22%3A%7B%22type%22%3A%22Email+Client%22%2C%22ua_family%22%3A%22Postbox%22%2C%22ua_name%22%3A%22Postbox+1.1.3%22%2C%22ua_version%22%3A%221.1.3%22%2C%22ua_url%22%3A%22http%3A%5C%2F%5C%2Fwww.postbox-inc.com%5C%2F%22%2C%22ua_company%22%3A%22Postbox%2C+Inc.%22%2C%22ua_company_url%22%3A%22http%3A%5C%2F%5C%2Fwww.postbox-inc.com%5C%2F%22%2C%22ua_icon%22%3A%22http%3A%5C%2F%5C%2Fcdn.mandrill.com%5C%2Fimg%5C%2Femail-client-icons%5C%2Fpostbox.png%22%2C%22os_family%22%3A%22OS+X%22%2C%22os_name%22%3A%22OS+X+10.6+Snow+Leopard%22%2C%22os_url%22%3A%22http%3A%5C%2F%5C%2Fwww.apple.com%5C%2Fosx%5C%2F%22%2C%22os_company%22%3A%22Apple+Computer%2C+Inc.%22%2C%22os_company_url%22%3A%22http%3A%5C%2F%5C%2Fwww.apple.com%5C%2F%22%2C%22os_icon%22%3A%22http%3A%5C%2F%5C%2Fcdn.mandrill.com%5C%2Fimg%5C%2Femail-client-icons%5C%2Fmacosx.png%22%2C%22mobile%22%3Afalse%7D%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fmandrill.com%22%7D%5D I want to decode it into a array, like this site: http://requestb.in/n1rhtpn1?inspect Thanks!
  6. Ok , there is an issue with the rotten tomatoes API , It gives developers the ability to set a limit of movies to return from the API from a specific category , like the movies in the box office are pulled dynamically, but when I set the limit to 50 , or even 10 movies , it only returns an array containing 3 movies instead of 10 or 50 or whatever the limit of movies is in the API call ... What could be causing that ? is there maybe something wrong with the way I am using the file_get_contents function $box_office_movies = file_get_contents('http://api.rottentomatoes.com/api/public/v1.0/lists/movies/box_office.json?limit=50&country=us&apikey=[key]',FILE_USE_INCLUDE_PATH); $box_office_movies = json_decode($box_office_movies, true); var_dump($box_office_movies); // returns only 3 movies ..
  7. Sample json query : https://api.datamarket.azure.com/Bing/Search/Web?$format=json&Query=%27Xbox%27 . If you click on the link you are prompted for a username and password. both fields just require you to insert your Bing API. How can I send the password with the query attached? I'm using cURL to send the query. I have tried using the normal method outlined by bing to receive the search results but it doesn't seem to work for me.
  8. I'm just trying to retrieve results using bing API. All I have done so far is copy the example for the bing user manual. https://skydrive.live.com/view.aspx?resid=9C9479871FBFA822%21112&app=Word&authkey=%21ANNnJQREB0kDC04 but I'm getting an error with the scope of the variable. The variable in question is $context Warning: file_get_contents() [function.file-get-contents]: SSL: fatal protocol error in /home/msc2012/12254822/public_html/MetaSearchV1/bing_basic.php on line 35 Service Operation <?php $acctKey = 'xPx9I4rWqBBFRGO4+5aZai7x/KrqSMuM/jLIchClJ6I'; $rootUri = 'https://api.datamarket.azure.com/Bing/Search'; $contents = file_get_contents('index.html'); //contents therefore has basic in it as words? if ($_POST['query']) { $query = urlencode("'{$_POST['query']}'"); $serviceOp = $_POST['service_op']; $requestUri = "$rootUri/$serviceOp?\$format=json&Query=$query"; // Encode the credentials and create the stream context. $auth = base64_encode("$acctKey:$acctKey"); $data = array( 'http' => array( 'request_fulluri' => true, // ignore_errors can help debug – remove for production. This option added in PHP 5.2.10 'ignore_errors' => true, 'header' => "Authorization: Basic $auth") ); $context = stream_context_create($data); // Get the response from Bing. $response = file_get_contents($requestUri, 0, $conext); $jsonObj = json_decode($response); $resultStr = ''; foreach($jsonObj->d->results as $value) { switch ($value->__metadata->type) { case 'WebResult': $resultStr .= "<a href=\"{$value->Url}\">{$value->Title}</a><p>{$value->Description}</p>"; break; case 'ImageResult': $resultStr .= "<h4>{$value->Title} ({$value->Width}x{$value->Height}) " . "{$value->FileSize} bytes)</h4>" . "<a href=\"{$value->MediaUrl}\">" . "<img src=\"{$value->Thumbnail->MediaUrl}\"></a><br />"; break; } } $contents = str_replace('{RESULTS}', $resultStr, $contents); } echo $contents; ?>
  9. Good afternoon, I am able to retrieve results from yahoo with my API key, using the instructions found here: http://developer.yahoo.com/boss/search/boss_api_guide/codeexamples.html# Code: <?php require("OAuth.php"); $cc_key = "your consumer key here"; $cc_secret = "your consumer secret here"; $url = "<http://yboss.yahooapis.com/ysearch/news>,web,images"; $args = array(); $args["q"] = "yahoo"; $args["format"] = "json"; $consumer = new OAuthConsumer($cc_key, $cc_secret); $request = OAuthRequest::from_consumer_and_token($consumer, NULL,"GET", $url, $args); $request->sign_request(new OAuthSignatureMethod_HMAC_SHA1(), $consumer, NULL); $url = sprintf("%s?%s", $url, OAuthUtil::build_http_query($args)); $ch = curl_init(); $headers = array($request->to_header()); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $rsp = curl_exec($ch); $results = json_decode($rsp); print_r($results); ?> However the output of results is very bizarre, for example, if I search for elephant, I get the following results (partial copy and paste): stdClass Object ( [bossresponse] => stdClass Object ( [responsecode] => 200 [images] => stdClass Object ( [start] => 0 [count] => 35 [totalresults] => 108000 [results] => Array ( [0] => stdClass Object ( [clickurl] => http://0.tqn.com/d/goafrica/1/0/Y/Q/IMG_1592.JPG [size] => 2.2MB [format] => jpeg [height] => 2432 [refererclickurl] => http://goafrica.about.com/od/africanwildlife/ss/The-Big-5-Images-Facts-And-Information-About-Africas-Big-Five_2.htm [refererurl] => http://goafrica.about.com/od/africanwildlife/ss/The-Big-5-Images-Facts-And-Information-About-Africas-Big-Five_2.htm [title] => African Elephant - One of the "Big Five" - African Elephant Image ... [url] => http://0.tqn.com/d/goafrica/1/0/Y/Q/IMG_1592.JPG [width] => 2591 [thumbnailheight] => 150 [thumbnailurl] => http://ts2.mm.bing.net/th?id=H.4700108340594617&pid=15.1&H=150&W=160 [thumbnailwidth] => 160 ) [1] => stdClass Object ( [clickurl] => http://images.nationalgeographic.com/wpf/media-live/photos/000/004/cache/african-elephant_435_600x450.jpg [size] => 54.1KB [format] => jpeg [height] => 450 [refererclickurl] => http://animals.nationalgeographic.com/animals/photos/elephants/ [refererurl] => http://animals.nationalgeographic.com/animals/photos/elephants/ [title] => Elephant Pictures - National Geographic [url] => http://images.nationalgeographic.com/wpf/media-live/photos/000/004/cache/african-elephant_435_600x450.jpg [width] => 600 [thumbnailheight] => 120 [thumbnailurl] => http://ts2.mm.bing.net/th?id=H.5058106677789309&pid=15.1&H=120&W=160 [thumbnailwidth] => 160 ) [2] => stdClass Object ( [clickurl] => http://www.splendidwallpaper.com/wp-content/uploads/2010/03/baby_elephant_1024x768.jpg [size] => 149.4KB [format] => jpeg [height] => 768 [refererclickurl] => http://www.splendidwallpaper.com/baby-elephant-2102/ [refererurl] => http://www.splendidwallpaper.com/baby-elephant-2102/ Please bear in mind that I am very new to php, and programming in general. I am completing a fast track learning course where we don`t have time to learn the basics, we are in the deep end! Does anyone have suggestions on how to display the results properly? Thanks! Note: I had tried to do it this way (which worked with the Google API - although the links were not clickable).. It did not work at all with Yahoo: foreach ($results->{ 'items' } as $item ) { echo $item->{ 'title' }.": ".$item->{ 'link' }."\n\n"; echo $newline; }
  10. Hi guys I'm happy to be a member of this forum i am wondering if there is a way to get new notifications using Twitter API this exists in facebook (i use facebook-sdk) , Twitter has some libraries for that too , but i can't find anyone that can get Twitter new notifications so any suggestions ? and does twitter work like facebook ? i mean does it have notifications too ? because i don't use it at all thanks
  11. I would like to be able to login to facebook without being there so I can post to facebook from rss files and a database. I can retrieve the access token using curl and I can see the feed. I want to able to post messages using either the api or better still using curl
  12. I've downloaded the PHP client library for Google Adwords API. I need to insert my login details in/src/Google/Api/Ads/AdWords/auth.ini. One of the variable is developerToken . It is said here: https://developers.google.com/adwords/api/docs/signingup that in order to get this variable, you need to log into the MCC, and Navigate to My Account -> AdWords API Center. But I don't see the link to "Adwords API Center" under "My Account". Can someone help me please to get the API access? Thanks in advance
  13. hi guys, I'm searching for a CMS that doesn't break his API too often and when it does it must be done without the need to restart from scratch(like Drupal ) I really like the stability of the wordpress API and I'm searching for a CMS that have some API stability too. It's not that wordpress is bad, it's just too popular and because of that it's a big target for hackers. Do you have some recommendations? Thank's for your time and have a good day
  14. I am trying to build a SOAP call in php which should make a request to a c#/asp.net based API. The request is in the format of an XML. *XML contains Arabic Characters. If the XML contains only English Characters everything works fine. I also tried to hit the Webservice endpoint via a SOAPUI with Arabic characters and it works fine.So it confirms that the system accepts Soap calls with Arabic Characters. The code I use to hit the EndPoint is shown below. $soapvar = new SoapVar($retrieveXYZRequest, XSD_ANYXML); $this->client->__soapCall('RetrieveXYZ',array($soapvar)); $retrieveXYZRequest is the SOAP Request built in the form of Text(with Arabic characters in certain elements). RetrieveXYZ is the method name that should be called. Any kind of input will be much appreciated.
  15. I'm working through some code to display a tumblr blog on a website. Each of Tumblr's post types are easy enough to get to... <ul id="reblog"> <? foreach ($xml->posts->post as $post) { ?> <li> <? // REGULAR POSTS if ($post['type'] == "regular" ){ echo "This is a regular post"; } // PHOTO POSTS if ($post['type'] == "photo" ){ echo "This is a photo post"; } // LINK POSTS if ($post['type'] == "link" ){ echo "This is a link post"; } // AUDIO POSTS if ($post['type'] == "audio" ){ echo "This is an audio post"; } ?> </li> <? } ?> </ul> What I'm trying to do is to check and see if certain tags are used on a post, and the based on that I'll be formatting the entry a little different. I can list all of the tags, but I'm stumped on how to check the existence of a certain tag in $post->{'tag'} $xml = simplexml_load_file('http://applesold.com/assets/cache/tumblrposts.txt'); <ul id="reblog"> <? foreach ($xml->posts->post as $post) { ?> <li> <? // REGULAR POSTS if ($post['type'] == "regular" ){ echo "type of post: regular<br>"; // THIS DOESN'T WORK -- if ($post->{'tag'} == "infographic") { echo "INFOGRAPHIC"; } else { echo "non-INFOGRAPHIC"; } } ?> </li> <? } ?> </ul>
  16. I am trying to include the latest post from a tumblr blog in my website, which works fine. I can't figure out how to choose a specific size of photo from the API, such as the 500px photo. <?php $numPosts = 3; $feedURL = "http://jeffhui.tumblr.com/api/read/?num=$numPosts"; $xml = simplexml_load_file($feedURL); foreach($xml->posts->post as $post){ $title = (string) $post->{'regular-title'}; $posts = (string) $post->{'regular-body'}; $photo = (string) $post->{'photo-url'}; $caption = (string) $post->{'photo-caption'}; echo"<h2>".$title."</h2> <p>".$posts."</p> <p><img src=".$photo."></p> <p>".$caption."</p>"; } ?> Some one posted this online and say it has to loop through them like this, but I dont know how to apply the bellow script into my. <?php $xmlResult = file_get_contents($tumblr_url_aktuell); $xml = simplexml_load_file($tumblr_url_aktuell); foreach($xml->posts->post->{'photo-url'} as $photoURL){ if((string)$photoURL['max-width'] == '500'){ $image = $photoURL; } } ?>
  17. I have been doing PHP for a while and am able to do e-commerce and CMS with coding; however, I can't quite figure this issue out right now. I am currently working on a project that will allow people to text photos and information to a website and have the text saved into a database that can then show up on the webpage when someone views it. I know how to get the text information by using APIs but can not figure out how to save it into a MySQL Database! If you have any ideas I would appreciate the help.
  18. Hi PHP expert, I am trying to read the post date from my tumblr api with the following code. $date = $xml->posts->post ['date']; echo '<p>'.$date.'</p>'; This is what I get from the above code "Wed, 21 Nov 2012 13:32:00" My question is, are there anyways I can get the date with out the hour, min and seconds? for example "Wed,21 Nov 2012"?
  19. Hello everyone, Hope we all had a great NYE and Christmas . Anyway - I'm seriously stuck - yet motivated to get an API on my site. I am hoping a few of you can point me in the right direction based on my issues listed below. I've tried to provide as much information as possible so you can see what I have tried and where I am comming from . As a side note - any section I have doubts about what I am saying I have also put a ? next to the heading or text. And please do correct me if I an wrong anywhere. Background I am attempting to make a PHP based RESTful API hosted on https://api.mydomain.com/1.0/ which would interact with a mySQL database and/or file storage. The API once out of BETA would power the service itself - much like Twitter and be accessible externally through oAuth 2.0 connections. Initially I wish to only support JSON and not XML. PHP MySQL JSON oAuth 2.0 References These are the existing APIs I have been using as references when deciding how to construct the calls for my API. http://developer.linkedin.com/apis https://dev.twitter.com/ https://developers.f.../reference/api/ oAUth Library I will be using one of these two oAuth libraries: https://github.com/fkooman/php-oauth https://github.com/b...uth2-server-php RESTful Operations as CRUD From my understanding I have four HTTP methods at my disposal whic translate something like this (HTTP = CRUD = SQL): POST = CREATE = INSERT GET = READ = SELECT PUT = UPDATE (Modify) = UPDATE DELETE = DELETE = DELETE Example URL(s)/URI(s) So these are a few example calls I want to be able to make to test and trial this: https://api.mydomain.com/1.0/me (NB: me = current logged in user/user authenticated through oAuth) POST = ? GET = Get informaiton on current user, such as full name, age, etc PUT = Update information on current user, such as full name, age, etc DELETE = Delete current user https://api.mydomain.com/1.0/johndoe POST = Create a new user 'johndoe' ? GET = This would return data on a specific user - in this case 'johndoe'. PUT = ? DELETE = ? https://api.mydomain...es/254855781571 (NB: Every file uploaded is given a unique number and this number is stored in a mySQL database which stores information against the file such permissions and a log of access.) POST = Upload file GET = Get file and display or download PUT = Change permisisons DELETE = Delete file Sample of https://api.mydomain.com/1.0/me So this is a sample of output from /me Much like Facebook does now I wish to use 'fields' to refine and join queries. Sample of https://api.mydomain...e?fields=groups So this is a sample of output from /me I understand that 'fields' could be acieved through https://api.mydomain.com/1.0/me/groups but this would not allow me todo https://api.mydomain...s=groups,gender I hope and intend to support both https://api.mydomain.com/1.0/me/groups and https://api.mydomain...s=groups,gender style calls. Detecting (Capture) RESTful Operations Server-Side ? The next few sections are broken down a fair bit in seperate headings. Obviously on the server-side (https://api.mydomain.com/1.0/) I need a file at index.php which handles/captures the calls made to the URL. Now my understanding is that the oAuth library will generate and managed the 'access token'. Further my site (internally) should be able to use any API call without an 'access token' or will it need one itself? So, anyway, start from the beginning . What does the code look like the captures the calls made? And how does it handle the 'access token' in terms of knowing it needs one or not. So as far as I can gather part of the code would need to determine the functuion (me, johndoe, etc) then the action (CRUD) and the informaiton that goes with it if needed by certain CRUD functions. How would that code then process the function etc? What code do I write to return user info etc as per the examples in the sections above? Making the Call - Client/Developer Side ? Finally what code does a developer use to call the API and get the data in a $variable as json. Again always assuming PHP. End As you can see I have tried to put a fair bit of thought and work into the post in a bid to show what i do understand and get some structured answers to help me out. But if anything makes nosense or needs clarification please ask and I'll do my best to clarify what I have written. More specific questions on how to do the 'fields' may follow later if I cannot figure it out. Thanks guys and gals. I'm off to implement one of those oAuth libraries now AussieRhods
  20. Hi, I have an API script provided to people fetching data from my website. Other than stats information, how can I get to know that which websites are connecting my website's API? Any php function that I can include in my API script to get their domain names then insert into my database? I am php newbie. It would be appreciated if you can post your complete function codes here. Thanks, Richard
  21. i'm building a little apllication , it's a nusic videoclip streaming service ,i have my database setup , i have my videobackend setup also , but i have an API that i suppose to use to be able to retrieve a video base on an unique id when i click on an anchor tag . I'm new with PHP, i'm buildling this just to be able to do something with all the knowledge i accumulate an example of the website . also here a link of the API .. i just need some help to finish the integration. thanks.
  22. im working with instagrams api and im not sure what to do next ... i so far have there access_token , but i dont know how to get the rest of the users information. the code below is given to me by instagram to retrieve the users information but i dont know what language to use it with , i have tried php but i dont know what to do with it ? please help thank you i have the access token , client id , client secret , and redirect uri. but do i change the CODE to a variable for the token ? curl \-F 'client_id=CLIENT-ID' \ -F 'client_secret=CLIENT-SECRET' \ -F 'grant_type=authorization_code' \ -F 'redirect_uri=YOUR-REDIRECT-URI' \ -F 'code=CODE' \https://api.instagram.com/oauth/access_token
  23. phphelpme


    alright , do you know how to get the section from the url , the token part and turn that into a variable ? example would be like this they instert the url here <form action="list.php" method="post"> <input name="token" type="text" style="width:200px;"/> <input type="submit" class="btn btn btn-info btn-mini" value="Login" /> </form> and then on list.php it seperates the token and makes it a variable the url looks like this http://localhost/instalike/code.php#access_token=263222910.4d15ef2.0b42098ba3b845b9940af5b46i just need the access_token i just need the access_token each access token will be different
  24. Howdy, I just started experimenting with Goutte - found here on Github: https://github.com/f...ore-information I followed the examples almost exactly but here is my code anyways: <?php require_once 'goutte.phar'; use Goutte\Client; $client = new Client(); $crawler = $client->request('GET','http://www.cnn.com/'); $nodes = $crawler->filter('.error_list'); if ($nodes->count()) { // die(sprintf("Authentication error: %s\n", $nodes->text())); } // This part of the code I havent even changed yet being I can't get passed this problem :/ printf("Nb tasks: %d\n", $crawler->filter('nb_tasks')->text()); ?> Here is what is displayed on the page when running the php code: ????????G?? Fatal error: Class 'Goutte\Client' not found in /Applications/XAMPP/xamppfiles/htdocs/scrape.php on line 7. I have used PHP in the past but im a bit rusty, my apologies if it is something simple. I checked the Github issues and their doesn't appear to be any issues related to the problem I am currently having. I have the goutte.phar file in the same directory as the file with the code above so I am unsure why the fatal error is occurring on not finding the Client class? Thanks for the help!
  25. I have a company that needs php tweaking. (My previous programmer couldn't be found anymore) The client e-mailed me this "Basically what we need is for you to provide us with an http rest API where we will provide the tracking code and in return you will return to us a JSON object with the status of the delivery As an example: TRACKING CODE: ABCDEFGHIJ URL: http://mydomain.com/track.php?code=ABCDEFGHIJ METHOD: GET RESPONSE: {"status":2} where 2 is the code for the status shipment which is defined by 1 - GOOD 2 - BETTER 3 - BEST" How and where do I place this? What's "HTTP REST API" and "return to us a JSON object" It's all gibberish to me! Some web guru answer me pls? Thanks in advance!
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.