SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to convert php to asp

    <?php
    if($_REQUEST['url']!='')
    {
    function get($a,$b,$c)
    { // Gets a string between 2 strings
    $y = explode($b,$a);
    $x = explode($c,$y[1]);
    return $x[0];
    }
    $url=@get_meta_tags("".$_REQUEST['url']."");
    ?>
    <div class="result">
    <div class="title pad"><?php echo get(file_get_contents(''.$_REQUEST['url'].''), "<title>", "</title"); ?></div>
    <div class="pad"><strong>Description: </strong><i style="color:#008000;"><?php echo substr($url["description"], 0, 50); ?></i></div>
    <div class="pad" style="font-size:10px; color:#999;"><strong style="color:#333;">Url: </strong><?php echo (''.$_REQUEST['url'].''); ?></div>
    </div>
    <?php
    }
    ?>

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    $_REQUEST ... Request
    explode() ... Split
    get_meta_tags ... Nothing; you would need to use an XML component and create your own method

    http://msdn.microsoft.com/en-us/libr...(v=vs.84).aspx

    But why try reinventing the wheel? http://www.google.co.uk/search?q=asp+screen+scrape
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru View Post
    $_REQUEST ... Request
    explode() ... Split
    get_meta_tags ... Nothing; you would need to use an XML component and create your own method

    http://msdn.microsoft.com/en-us/libr...(v=vs.84).aspx

    But why try reinventing the wheel? http://www.google.co.uk/search?q=asp+screen+scrape
    file_get_contents in asp will require xml object

  4. #4
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's a site that convert php to asp..

    http://www.me-u.com/php-asp/

    Then after conversion the program states the functions it couldn't translate..

  5. #5
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MY suggestion is use convert tool


    http://www.asp.net/downloads/archive...t/overview.htm

  6. #6
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That's ASP.NET not ASP. And your link is wrong.

    http://www.asp.net/downloads/archive.../php-to-aspnet
    Ian Anderson
    www.siteguru.co.uk

  7. #7
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hai...why you need to convert php to asp ?? is it really necessary ??


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •