+ Reply to Thread
Results 1 to 2 of 2

Thread: Header converting & to &

  1. #1
    Learning Programmer rsnider19 is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    30

    Header converting & to &

    I am doing some basic website scraping and I have the following snippet:

    Code:
    ob_start();
    $str "Location: http://www.example.com/?&id=001";
    header($str);
    ob_end_flush(); 
    Obviously this is not the site I am going to, but as an example. So the script then goes to Example Web Page instead. I tried urlencode/urldecode, but neither worked. Any ideas?

  2. #2
    Code Warrior BlaineSch is a name known to all BlaineSch is a name known to all BlaineSch is a name known to all BlaineSch is a name known to all BlaineSch is a name known to all BlaineSch is a name known to all BlaineSch's Avatar
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Age
    20
    Posts
    2,247
    Blog Entries
    8

    Re: Header converting & to &

    The url is wrong. If it's the first variable it does not require the "&" symbol. That is for something 'after' the first variable:

    Code:
    Locationhttp://www.example.com/?&id=001 
    Should be:
    Code:
    Locationhttp://www.example.com/?id=001 
    Example:
    Code:
    Locationhttp://www.example.com/?id=001&iLove=BlaineSch 

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Converting *.swf to *.avi
    By Jackson in forum Software Development Tools
    Replies: 9
    Last Post: 01-03-2010, 05:50 AM
  2. Converting *.swf to *.avi
    By Reji in forum C# Programming
    Replies: 8
    Last Post: 06-18-2009, 02:44 AM
  3. converting C++ into C#
    By sakaesushi in forum C# Programming
    Replies: 0
    Last Post: 06-16-2009, 11:52 PM
  4. DPI Converting
    By Frantic in forum C# Programming
    Replies: 2
    Last Post: 09-22-2006, 06:15 AM