Jump to content

Artiom

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Artiom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just in case yet another noob gets caught on this. The thing is HTML stream is gziped, gz_ group of functions has to be used. A valid code would be [code] <?php $str="http://anidb.info/perl-bin/animedb.pl?show=search&noalias=1&sa.name=Cowboy+Bebop&sa.ty pe=4&sa.airdate0=2001&sa.atts=0&do.search=Search"; $f=gzopen($str, "r"); while(!gzeof($f)) { $out=gzgets($f); echo $out; } ?> [/code]
  2. When these wrapers are disabled, PHP issues a wanrning (i've just checked on another host). In my case it actually returns some data, yet it is wrong. 
  3. Sure :) Here it is [code] <?php $str="http://anidb.info/perl-bin/animedb.pl?show=search&noalias=1&sa.name=Cowboy+Bebop&sa.type=4&sa.airdate0=2001&sa.atts=0&do.search=Search"; $f=file_get_contents($str); //$out=fgets($f); echo $f; ?> [/code] I've tried using file(), fopen() with "rb" or "r" - the result slightly differs, but it is still garbage. :( 
  4. I need to recieve the resulting page of http://anidb.info/perl-bin/animedb.pl?show=search&noalias=1&sa.name=Cowboy+Bebop&sa.type=4&sa.airdate0=2001&sa.atts=0&do.search=Search as pure HTML code. Yet, when I use standard PHP file functions, they return garbage. Where do I do wrong? Help please! Is it possible to work this around with standard PHP functions (without extentions)?
  5. Wow, million of thanx! This works just fine!
  6. [code] <?php $d="INSERT INTO PlaceholderInfo(PlaceholderInfoID, MsgClassName, Placeholder, Description, Sample, ListPrefix, UserArc, DateArc ) VALUES (5,'Trouble Ticket Notification','Ticket_Level_Description','General ticketinfo : Description of ticket Support Level','Front Level of Support',NULL,0,0);"; $a=addslashes("VALUES\s\([\d]+,'([\w\s\d]+)','[\w\s\d]+','([\w\s\d\:]+)"); ereg ('VALUES\s\([\d]+\',\'([\w\s\d]+)\',\'[\w\s\d]+\',\'([\w\s\d\:]+)', $d, $regs); echo "$regs[2] $regs[1]"; //echo $a; ?> [/code] I have a code, the goal is to get the second and fourth elements from the DB querry. As the result of operation $regs should contain the necessary elements, but it is empty :( I've checked the regular expression in Espresso - it works just fine. Hepl please! Pure regexsp as I had checked in Espresso VALUES\s\([\d]+\',\'([\w\s\d]+)\',\'[\w\s\d]+\',\'([\w\s\d\:]+)
×
×
  • 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.