EXACT,ALOT,PSC,URL,latest,code,from,wwwpscode
Quick Search for:  in language:    
EXACT,ALOT,PSC,URL,latest,code,from,wwwpscode
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
PHP Stats

 Code: 73,711 lines
 Jobs: 9 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for PHP
PWGen
By Flinn Mueller on 10/19


URHere
By Flinn Mueller on 10/19


MySQL Database Wrapper
By Merlin Corey on 10/16


Click here to see a screenshot of this code!PHP Calender System
By Charles Chadwick on 10/14

(Screen Shot)

Click here to see a screenshot of this code!A1 counter
By Michael Goh on 10/10

(Screen Shot)

Backup MySql
By Keyur Itchhaporia on 10/9


An Important Note About .inc Files
By Charles Chadwick on 10/9


^ A time Saver Script
By Darryl Porter on 10/9


A 1337 Phrase Maker
By Jason DeLuca on 10/8


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Planet Source Code Latest Code *UPDATE #3*

Print
Email
 
VB icon
Submitted on: 10/30/2000 11:05:48 AM
By: Demian Net  
Level: Advanced
User Rating: By 1 Users
Compatibility:PHP 3.0, PHP 4.0

Users have accessed this code 3544 times.
 

(About the author)
 
     Get the latest code from www.pscode.com (Planet Source Code), from any world. Makes use of looping & regular expressions (the hard part), since psc's latest code ticker had the code on 2 lines & had to use 2 regular expressions & 2 loops for each code, not easy. But bettter than most codes you see that will just grab the whole ticker code, mine parses & just takes the links. *UPDATE*, I changed it form lngWID=# to world=# (just seems easier), & now you dont just have to put the number in, you can put like: world=vb or world=c . *UPDATE #2*, Does the EXACT same thing as the first update but I changed it so it doesnt have the code to get & parse the source 9 times, I made it into a funtion (psccode) so it can just do psccode(number); example: psccode(1); would be for vb. Cuts the code down ALOT, bout 1/3 the size now. *UPDATE #3* lets you choose what PSC URL you want to use (only changed function and how it is used). hopefully ill get it working where you can choose how many urls you want to get & have 0 get them all done soon.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    //**************************************
    //     
    // Name: Planet Source Code Latest Code 
    //     *UPDATE #3*
    // Description:Get the latest code from 
    //     www.pscode.com (Planet Source Code), fro
    //     m any world. Makes use of looping & regu
    //     lar expressions (the hard part), since p
    //     sc's latest code ticker had the code on 
    //     2 lines & had to use 2 regular expressio
    //     ns & 2 loops for each code, not easy. Bu
    //     t bettter than most codes you see that w
    //     ill just grab the whole ticker code, min
    //     e parses & just takes the links. *UPDATE
    //     *, I changed it form lngWID=# to world=#
    //     (just seems easier), & now you dont just
    //     have to put the number in, you can put l
    //     ike: world=vb or world=c . *UPDATE #2*, 
    //     Does the EXACT same thing as the first u
    //     pdate but I changed it so it doesnt have
    //     the code to get & parse the source 9 tim
    //     es, I made it into a funtion (psccode) s
    //     o it can just do psccode(number); exampl
    //     e: psccode(1); would be for vb. Cuts the
    //     code down ALOT, bout 1/3 the size now. *
    //     UPDATE #3* lets you choose what PSC URL 
    //     you want to use (only changed function a
    //     nd how it is used). hopefully ill get it
    //     working where you can choose how many ur
    //     ls you want to get & have 0 get them all
    //     done soon.
    // By: Demian Net
    //
    //This code is copyrighted and has    // limited warranties.Please see http://
    //     www.Planet-Source-Code.com/xq/ASP/txtCod
    //     eId.224/lngWId.8/qx/vb/scripts/ShowCode.
    //     htm    //for details.    //**************************************
    //     
    
    <?
    // Planet Source Code Latest Code *UPDAT
    //     E #3*
    // Writer: Max - Demian Net
    // E-Mail: Max@Wackowoh.com
    // WebSite: http://www.DemianNet.com htt
    //     p://www.Wackowoh.com
    // Language: PHP
    // Usage:
    // include("psc.php?world=World+Number+o
    //     r+Name");
    // or
    // require "psc.php?world=World+Number+o
    //     r+Name";
    // examples
    // include("psc.php?world=1");
    // require "psc.php?world=vb";
    // Worlds:
    // Visual Basic = 1 or vb
    // Java/Javascript = 2 or java
    // C/C++ = 3 or c
    // ASP/VBScript = 4 or asp
    // SQL= 5 or sql
    // Perl = 6 or perl
    // Delphi = 7 or delphi
    // PHP= 8 or php
    // PSC URLs:
    // www.planet-source-code.com
    // www.planetsourcecode.com
    // www.pscode.com
    // www.1aspstreet.com
    // www.1activeserverpagesstreet.com
    // www.1cstreet.com
    // www.1cplusplusstreet.com
    // www.1delphistreet.com
    // www.1javastreet.com
    // www.1javascriptstreet.com
    // www.1perlstreet.com
    // www.1phpstreet.com
    // www.1sqlstreet.com
    // www.1vbstreet.com
    // www.1visualbasicstreet.com
    // www.cpluspluscode.com
    // Variables:
    $url = "www.planet-source-code.com";
    // None of this needs to be edited
    function psccode($sec, $thesite) {
    $buffer = implode("", file("http://".$thesite."/vb/linktous/ScrollingCode.asp?lngWId=".$sec));
    preg_match_all("|(<a target[^>]+>)|U", $buffer, $psccodeurl, PREG_PATTERN_ORDER);
    preg_match_all("|([a-zA-z].*</a></b></font>)|U", $buffer, $psccodename, PREG_PATTERN_ORDER);
    $i = 0;
    echo "<base href=\"http://".$thesite."\">\n";
    for ($i = 0; $i < count($psccodeurl[1]);$i++){
    echo "{$psccodeurl[1][$i]}{$psccodename[1][$i]}<br>\n";
    }
    }
    if ((1 > $world) or ($world > 8)) {
    if ($world == "vb") {
    psccode(1, $url);
    } elseif ($world == "java") {
    psccode(2, $url);
    } elseif ($world == "c") {
    psccode(3, $url);
    } elseif ($world == "asp") {
    psccode(4, $url);
    } elseif ($world == "sql") {
    psccode(5, $url);
    } elseif ($world == "perl") {
    psccode(6, $url);
    } elseif ($world == "delphi") {
    psccode(7, $url);
    } elseif ($world == "php") {
    psccode(8, $url);
    } else {
    echo "No World or Invalid World Entered. Format:<BR>\nhttp://".$HTTP_HOST.$PATH_INFO."?world=(World Number)";
    }
    } else {
    psccode($world, $url);
    }
    ?>


Other 11 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments

 There are no comments on this submission.
 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | PHP Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.