1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Edit and browse through URL's automatically

Discussion in 'Web Design & Development' started by great7, Jun 18, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23
    i want a web browser addon that can edit the url and then go to that url automatically

    the URL will be the same url.. but different number at end.

    example:

    www.example.com/56049301

    that would be the start url. the addon would then go

    www.example.com/56049302
    www.example.com/56049303
    www.example.com/56049304
    www.example.com/56049305
    www.example.com/56049306
    etc etc

    just adding 1 to the end of url each time.

    i have looked all over the net for something like this no luck

    hopefully i will get a result from this website
     
  2. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    1,836
    I don't know of anything like that. If you explain why you want to do that someone may be able to offer an alternative way of doing what you want.
     
  3. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    As colin said, there's nothing out there that will do what you are asking, but if you want those URI's to open in separate windows then it would be a pretty simple thing to hand code in Javascript.

    If you can let us know what you need it for (so that we can suggest an appropriate context), and your level of experience in JS then we can provide a more detailed explanation.

    Danny
     
  4. valis

    valis Moderator

    Joined:
    Sep 24, 2004
    Messages:
    67,550
    what are you going to do when you get a null return?
     
  5. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23
    Thanks for all the responses.

    Want it to browse through logs. just to save me editing the url each time.. frustrating when got to do 100s times manually.

    what you mentioned "but if you want those URI's to open in separate windows then it would be a pretty simple thing to hand code in Javascript." that sounds good. but would it be able to open in tabs instead of new windows?

    well.. ive been wanting to do this for about a month or 2 . i have been trying to learn Php and html since i thought that is what i would need to know how to do this. From your post i now know it isnt needed. so i wasted my time.i have not tried writing java scripts yet.

    would it be possible you could create that script for me ? if its simple and wouldn't be to much trouble for you i would be greatfull, if not will you point me in the right direction to where i can learn to write the script myself ?

    Thank you.
     
  6. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    1,836
    That would be something easy to code in php. But if you have 100's of these to go through opening a new tab for each automatically would probably kill your browser. Probably better with a php page on it with a next button that opens the next log file.
     
  7. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23

    that would be perfect. i could use imacro to record me clicking the next page button and loop it then.

    But i don't know how to do this.

    possible you could create it for me? or could link me to tutorials on how to add a next page button to a web page using php
     
  8. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    Basically you'd need a script, showlogfile.php or similar, which accepts the number of the log file you want to view. The PHP script would then fetch this log (from where ever you store it) and echo this to the page. It would also create the 'next' and 'previous' links by incrementing and decrementing the current value and converting this into the corresponding URI according to your numbering methods. This script could also echo a GOTO field to allow you to enter the number of the log you wanted to jump to...

    All of this should be fairly easy to implement with a basic knowledge of PHP, but if you have any specific questions regarding the implementation then just let us know and we'll see what we can do. I can't speak for Colin, but I don't usually give "Here's your code..." type solutions, I prefer to point people in the right direction and assist further if they get stuck. I just think it helps people to learn that way...

    Danny
     
  9. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    1,836
    I'm with Danny here. Try and code it yourself to start and then come back when you have specific issues that we can help you resolve. It is how I learnt to code php pages and it is a great way of learning.
     
  10. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23
    Okay..

    i just googled "how to create showlogfile.php" i now know i need to get MySQL to create the databases.
    need to learn SQL for the database and PhP to create the webpage. for the PHP i will be using notepad++. for the sql i will be using MySQL.



    been studying SQL & PHP on this website for the last 2hours ... www.w3schools.com doesn't mention how i can start to fetch information from the webpage using php to create the databse with sql though.

    how would i do that? fetch information from a webpage and then put it into the database then create the next page button?

    if someone could direct me to some tutorials that specifically teaches how i do what i am aiming to do instead of information i wont be using. i would appreciate it.

    Just to make clear if it isnt obvious already. i have very little knowledge in scripting/coding.
     
  11. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    How do you store your log files at the moment? If you hold them on file then I'd leave MySQL for another day and just concentrate on the PHP.

    Danny
     
  12. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23
    im not storing them anywhere . logs on a website that i use a lot

    Honestly.. doubt i will be able to figure out how to do this.

    its like learning a new language..


    you know some very good tutorials that explain it in simple terms? or know of a website where there is willing people to do simple scripts for people ?
     
  13. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    What do you type into the address bar of your browser to access these log files? Replace the actual domain with some made up one, but I need everything after the ".com" (for example), punctuation, question marks, the lot. This will tell me whether you are serving up a page that calls the log, or accessing it directly from a stored file.

    Is this your domain (i.e. a domain to which you have server side access), or are we talking some other 3rd party site to which you have no backend access? It makes a difference as to what language we write this script in.

    Get back to me and I'll see what can be done.

    Danny
     
  14. allnodcoms

    allnodcoms

    Joined:
    Jun 30, 2007
    Messages:
    613
    You're after a 'browser feature' that will provide easier navigation of a site over which you have no control.

    This is kind of beyond the realms of what TechGuy is all about, but it's possible and quite an interesting side project, so I'm not going to write the script for you (for reasons I pointed out yesterday), but I will tell you how it can be achieved quite easily with a bit of HTML and Javascript.

    You'll need to create a web page and fill it with an iFrame. Leave a small border (either top or bottom), around 20 - 30 pix high should be good, for your 'pagination' controls. In this border you'll need two buttons (for next and previous) and a text field (to directly enter a log id).

    Here's the gist of it. You have half a URI (the bit up to and including "?id="), and to finish this address you just need to pin a number on the end of it. You can read that number from the text box, add it to the first half of the URI and set the completed string as the "src=" attribute of the iFrame. The next arrow (when clicked) adds one to the current number before adding it to the string, and the previous arrow takes one away, and so on. You could even get really lairy and store the current value as a cookie, so it's remembered for next time.

    Really simple stuff, and all you need to do to view your logs is click a couple of buttons ;)

    Happy coding...

    Danny
     
  15. great7

    great7 Thread Starter

    Joined:
    Jun 18, 2012
    Messages:
    23
    Just want you to know i really appreciate the amount of feed back you are giving me. thank you.

    i did some google searching. came up with this so far..

    <html>
    <body>

    <center>
    <iframe

    src="" style="border:10px #C0C0C0 none;"
    name="myiFrame" scrolling="no" frameborder="10" marginheight="10px" marginwidth="100px" height="300px" width="1000px"></iframe>
    </center



    that brings up the Log in a browser .. what you said "around 20 - 30 pix high should be good," when its set as that its just a tiny square, cant see any of the webpage.. was it meant to be like that? i have adjusted it so i can see more.

    <center><form action="nextpage.html" method="get">
    <input type="submit" value="Next" />
    </form>
    </center>

    {</body>
    </html>

    that script above gives a next button. But when i click the button it doesn't go to the next log. came across that script when i searched for pagination.

    "
    You have half a URI (the bit up to and including "?id="), and to finish this address you just need to pin a number on the end of it. You can read that number from the text box, add it to the first half of the URI and set the completed string as the "src=" attribute of the iFrame. The next arrow (when clicked) adds one to the current number before adding it to the string, and the previous arrow takes one away."

    that part confuses me i don't understand, could you explain it some more?

    how would i get the button to add one to the current log number?

    when i open the script into the browser the url is: file:///C:/Users/username/Desktop/testin1.html
    is that suppose to be like that?
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1057628