Closed Thread
Results 1 to 2 of 2

Thread: Header converting & to &

  1. #1
    rsnider19 is offline Learning Programmer
    Join Date
    Sep 2009
    Posts
    34
    Rep Power
    0

    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. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    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 

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. header
    By shivam in forum HTML Programming
    Replies: 2
    Last Post: 04-04-2011, 03:05 AM
  2. SMTP.H header
    By outsid3r in forum Classes and Code Snippets
    Replies: 16
    Last Post: 10-17-2010, 07:36 PM
  3. Can I add a link in the header?
    By daraclare in forum HTML Programming
    Replies: 10
    Last Post: 07-12-2010, 09:10 AM
  4. about header editing
    By sydetys in forum General Programming
    Replies: 1
    Last Post: 01-26-2008, 08:09 AM

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