Jump to content

Boxerman

Members
  • Content Count

    275
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Boxerman

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  1. Thanks mate! It was alot simpler than i thought and your code has actually taught me how to set cookies in php so thanks for that! +1
  2. Hey dude I completely understand, there is no key or anything, the API, I'd rather not sure due to forum rules but for example; the URL is blah.com/user-api/thing?latest If I'm logged in that link works and it displays; however if I'm not logged in and I go to that URL it directs me to the login page. There's no api key at all simply that URL works when logged in but not if you're a 'guest' There is no manual to read but it's still the best API I have found. I'm at a loss on what else to try. Hope this makes sense, I know this reply is like throwing your head again
  3. Evening all! I'm running into an issue where a site i have signed up to provides an API, however when I try to decode it on my server it outputs: The PHP script being used: $url = file_get_contents("http://apiwebsite.com/blah?latest"); $json = json_decode($url, true); // decode the JSON into an associative array echo '<pre>' .var_dump($json, true). '</pre>'; When i try to browse to this site on my server it redirects to a website. Is there a way to bypass the login? or actually login to get the API? Thanks everyone
  4. Hi all, Just a quick one, i would like to monitor an API for changes, so the first run on the API would be to grab all 315 pages and enter them into my database, once added, i want to set up a cron job (i can do that) to monitor if anything gets added, im not sure whats the best way to go about that? Anyone have any ideas to point me in the right direction please?
  5. Whoops, got that fixed: for people in the future: $genres = explode(",",$genre); foreach($genres as $value){ echo $value . ", "; } My question for people, how do i remove the comma from the last one?
  6. Hey all, I'm trying to strip commas and put the single words into an array: for example: output will be like: action, comedy, horror, war What i need to do is strip the comma and add the single words into an array called genres.. is this possible? I got the stripping done like so: $genres = str_replace(',',' ',$genre); but as you can see it only adds a space, i want to have them as single words so i can hyperlink them to different pages. Any help in pointing me the right way would be amazing! Thanks ALL
  7. Hi all, I'm annoyed because i cant figure this out, I want to crawl a website scan for links to the videos, not 100 percent if it can be done. The code dump is below; not 100 percent whats going wrong, i cant figure out what stage its failing. Can someone provide a poke please? <?php class Movie2k{ public $curl = null; public $misc = null; public $domain = "[redacted]"; function __construct(){ $this->curl = new Curl(); $this->misc = new Misc(); } public function getEmbeds($show,$season,$episode){ $show_url = $this->getShowUrl($show); $res = array(
  8. Hey guys, Sorry to annoy you all with something so simple, but its truly causing hair to fall out (I'm running out as well!) The script below is the core of what im running, however, in the example below you can see array inside array, i've tried everything such as: $feed_to_array['entry'][0]['title]; This is literally confusing me intensely, all i want to do is grab title and content, that is all! Why am i so stupid! Thanks in advance all! <?php error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); $feed = 'http://**deleting**?format=xml'; $feed_to_array
  9. Muddy! You da man! It's removed total, but still displaying the blank line at the bottom I'm missing something just not sure what!
  10. Thanks for the reply! however i'm getting the following error: Notice: Undefined offset: 0 Here is the entire foreach: foreach($servers as $server) { $connection = ssh2_connect($server['ip'], 22); if (ssh2_auth_password($connection, $server['user'], $server['pass'])) { $stream = ssh2_exec($connection, 'showvv -d'); stream_set_blocking($stream, true); //Set var for output to be stored in $data = ''; //loop the buffer and store output to $data while($buffer = fread($stream, 4096)) { $data .= $buffer; } //c
  11. Sorry, the full output (i cut it down to save spamming repeats) but at the end of the list, there is a blank line and then the word total: admin name.boot name.0 name.1 name.boot name.boot name.boot name.boot name.boot evaluation evaluation.name.ro evaluation-NoChanges evaluation.name.ro total Also, my aim is to insert this into the database a new row for every line in the output. as you pass it to $items[1] wil that not just create one row with everything inside? Thanks again for your help!
  12. That works perfectly! thank you so much. One last thing, the output has the word "total" on the output the last time, is there a way to remove that and the black line above?
  13. Hey guys, So a short write of what i'm trying to do, i'm trying to SSH connect to a SAN to grab details about the virtual volumes on the SAN and display them on a page. The final aim is to have this run as a cron and inserted into MySQL. However, I have the script below with connects perfectly and displays the information i need, however, i am at a loss on how to actually break the output up into tables.. for example (the exact output): Id Name Rd Mstr Prnt Roch Rwch PPrnt PBlkRemain -----VV_WWN----- -----CreationTime------ 0 admin RW 2/3/1 --- --- --- --- -- 500name0405
  14. Posted in wrong section, ever so sorry!
  15. Hey guys, So a short write of what i'm trying to do, i'm trying to SSH connect to a SAN to grab details about the virtual volumes on the SAN and display them on a page. The final aim is to have this run as a cron and inserted into MySQL. However, I have the script below with connects perfectly and displays the information i need, however, i am at a loss on how to actually break the output up into tables.. for example (the exact output): Id Name Rd Mstr Prnt Roch Rwch PPrnt PBlkRemain -----VV_WWN----- -----CreationTime------ 0 admin
×
×
  • 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.